How would I extract a monophonic (single notes) melody from a song? I'm thinking in particular from ABC notation, but that doesn't matter. Is it reasonable to always take the highest pitch when the notes are polyphonic, or is that too simple to work well?
A vital concept for extracting such a "melodic skeleton" from a more ornamented melody is with the notion of melodic fluency.
To put it simply, melodic fluency simply means that the melody is as stepwise as possible. If one were to only go with the highest pitches, your melodic skeleton may have random leaps: up a seventh in one measure, down a ninth in the next, etc. If you work from a standpoint of melodic fluency, however, you'll notice that these high pitches are likely subsidiary to the "truer" melodic background.
This doesn't mean that every note will be a step away, but try not to have too many intervals larger than a third.