which is the set of notes off of which the melody is based?

To determine the set of notes off of which a melody is based, the key or scale of the melody needs to be identified. The specific notes within that key or scale then form the set of notes used in the melody.