Melody, along with harmony and rhythm, is one of the three essential elements of any song.
In a nutshell, the melody of a song is the line of single notes (as opposed to chords) that you sing, assuming that there are lyrics and assuming you are the sort who sings. You could always whistle or hum instead.
And speaking of whistling or humming, instrumental songs also have melodies. How about “Bridge Over the River Kwai” for a whistling song?
In longer symphonic pieces, as well as in many jazz pieces, melodies often become themes that recur and are then improvised upon.
Walter Piston, author of Harmony and many other music textbooks, probably best describes the importance of melody this way:
We recognize compositions by their themes or their tunes, not by their harmony or form, nor by performer. When we hum or whistle to ourselves, it is melody that we hum or whistle, our recollection of the melody helping us to recreate in the mind’s ear as much of the whole piece as we can.
This is an essential thing to remember. When we arrange songs we often take liberties with both the chords (which are the harmony) and with the rhythm. We can take a song that’s been played by a band and create a single guitar arrangement for it. We rarely change the melody and when we do (think of the various versions of the “Star Spangled Banner” you’ve heard in your life) the basic shape of the melody is usually left intact.
Likewise whenever we transpose a song, usually in order to sing it in a different key than it might have been originally written, the shape of the melody usually stays the same. For example, ff the melody of a song, say in the key of C, is
C, C, B, C, D, G, A, G
Transposing that into the key of D would make the melody notes
D, D, C#, D, E, A, B, A
Just as important, the rhythmic value of the notes would also remain the same, or as close to the same that most people would recognize it as being a copy of the original melody.
When reading a typical piece of music, like this (taken from the folk song “Aura Lee”):
The line of music notation between chords at the top and the lyrics underneath is the melody. Those are the notes that are sung.
In cases where there are multiple voices singing, like in this example of four part harmony:
Usually the melody is assigned to the highest line of notes. That’s not always the case, though. In many song books, the harmony notes sung by the additional voices appear as tiny notes placed either over or under the melody (depending on where the harmony note is sung in relation to the harmony).
Melodies are also a key component for good soloing. When you think about it, most guitar solos are simply melodies that are “sung” with the guitar instead of a voice.
And melodies are also obviously an essential part of playing “chord melody“ style pieces.
For a basic discussion on creating melodies through observation of well known songs, check out Christmas in June. And for an introduction to using melodies to create solos, look no further than our article Leading Questions.