how to write a great melody

How to write a great melody, Part 1: What makes a melody great?

Visit Us

While I can’t give you an exact recipe for how to write a great melody, I can point out some common traits great melodies have to help improve your melodic skills.

While one can certainly cite great songs with no melodies, the ability to write a catchy melody is a tool every songwriter should learn. For most music, melodies are what listeners latch on to. They’re what people sing in the shower and when walking the dog. They’re the viruses that spread your music to the masses.

Of course, writing a “great” melody is an elusive art, and it’s hard to say why one melody grabs us and why another doesn’t. (After all, if everyone could read one article on the Internet and go and dash off a great melody, everyone would.) But while I can’t give you an exact recipe for creating a great melody, I can point out some common traits great melodies have and show you how to use techniques to improve your melodic skills. The hope is to help you turn a great idea, fragment, or motive (aka motif) into a fully fleshed out melody that will get audiences singing along at your next show.

Before we dive in, let me be clear: there are no rules to writing melodies, or music in general. For every tip I’m going to offer, for every feature I point to, there are countless exceptions. But many of the world’s greatest melodies have some features in common, and it’s good to familiarize yourself with them.

Let’s start by looking at an all-time great melody, one that is universally loved, one that stuck in your head the first time you heard it, and one that has all the features we’re going to cover: “Over the Rainbow,” with music by Harold Arlen and lyrics by Yip Harburg.

A few things to note about this melody:

  1. It’s eight bars long, with two phrases
  2. It starts on the tonic, pauses on the dominant at the halfway point, and ends back on the tonic
  3. It features a combination of steps and leaps
  4. It has repeating motives
  5. It has rhythmic variation

write a great melody over the rainbow

Bars and phrases

Most melodies are eight bars long and tend to be broken into two four-bar phrases. In this song, you can view the opening phrase as the question and the second phrase as the answer. This is a common technique among melodies and helps the listener hear a melody as complete.

Tonic and dominant

Why is the opening phrase a considered a question? It’s because of the roles of the tonic and dominant notes. The opening note here is an Ab, which is also our key. When listeners hear that first note, especially when it’s a big half-note as it is here, they want to hear a return to that note at the end of the melody.

A great melody is about tension and release, or about moving away and back home. Arlen ends the first phrase on an Eb, which is the fifth note of the Ab scale, and which is called the dominant. Eb is the furthest (non-chromatic) note we can play from Ab, so by the end of the second phrase we have wandered “way up high” away from our original note and are left hanging on that dominant note. It feels like a question. Imagine if the melody were to end there; it would sound incomplete. The second phrase brings us home, back to our original note, giving us our answer.

Another nice feature of this melody is the tension-inducing role of the leading tone, or the G. We hear it on the words “over” and “rain,” and it pulls us back up to that high Ab on “bow.”

Steps and leaps

A melodic step is when the melody moves up or down by half steps or whole steps. A leap (or skip) is when the melody moves greater than a whole step. Great melodies tend to have a nice mix of steps and leaps. If you have too many steps the melody sounds static and emotionally flat; too many leaps and it sounds directionless and can be hard to sing.

(The “Star-Spangled Banner” is a great example of too many leaps making a song hard to sing. The first seven notes—“O-o-say can you see, by” are all leaps, and the downwards leaps from “dawn’s” to “early” in “dawn’s early light” – a C to an E – is especially challenging.)

Big upward leaps of a fourth or greater increase the emotional impact of your melody and are great for soaring, yearning, or emphatic lyrics, which is why so many national anthems feature them.

“Over The Rainbow” is famous for its very unusual opening leap of an octave, perfectly matched to the yearning word “somewhere.” Typically, when you have a big upward leap of a fifth or greater, the listener wants to hear the music fall back either a whole or half step. Here it falls back a half step to that leading tone of G. This is followed in the second bar by a nice run of steps from Eb to Ab.

Repeating motives

Realizing that most melodies are actually made up of tiny motives (recurring phrases or figures) goes a long way towards demystifying the creative process.

“Over The Rainbow” features two motives: the giant leaps and the string of notes we sing over the words “over the rainbow.” Let’s look at second motive first. Arlen repeats this in the sixth and seventh bars, transposing it each time. In the second bar it begins on G. In the sixth bar it’s transposed to C, and in the seventh, to Bb. Almost half the melody is simply repeating that same motive.

He does a similar trick with the first motive, those half note leaps. First we have an octave on Ab, then, in the third bar, a leap of sixth from Ab to F (nicely mirrored by the words “way up”), then, in the fifth bar, we leap up an augmented fifth F to Db. Not only are the intervals repeated, but the rhythms are as well.

This repetition of motives is a key part of any good melody. It would be hard for listeners to grab on to a wandering melody that lasts eight bars long without any repetition. Giving audiences repeating fragments helps them latch on to the music, and by transposing those motives up and down, gives your music direction and makes a grand statement. (Brian Wilson was a big fan of this, as discussed in this post.)

Perhaps the most famous piece of music that features a repeating motive is the first movement of Beethoven’s Fifth Symphony. But that piece gets discussed so much, let’s instead check out a much more recent piece that uses the same technique: John Williams’ theme to Raiders of the Lost Ark.

write a great melody raiders of the lost arc

Note how often Williams repeats that dotted eighth-sixteenth note rhythm (highlighted in red). Each time the notes are different, but the rhythm and the motion are the same.

Once you start listening for them, you find how motives underpin almost every melody.

Take “Yesterday,” which also features two motives, shown in red and blue.

write a great melody yesterday

For the red motive, note how it features a slightly different rhythm each time, but the idea is the same. (You hear it on the words “Yesterday,” “far away,” “here to stay,” and “yesterday.”) You’ll notice on the second “yesterday,” Paul McCartney inverts the motive (going up instead of down).

He does that same trick with the blue motive. First we have six eighth notes going up, in step-wise fashion, then six eighth notes stepping down.

By the way, this melody features some nice exceptions to our common traits that are worth discussing. It’s only seven bars long, it doesn’t end on the tonic, nor does it pause on the dominant, and it doesn’t really have two distinct phrases (one could argue it has three, with the third being “oh, I believe in yesterday.”). But its exceptions are all still pretty close to the norm. For example, the melody begins and ends on an F major chord, and the final note is an A, the third of that chord. This difference between the opening salvo and the closing notes give the song a hopeful turn, which is nicely mirrored in the words. And while it doesn’t pause on the dominant, it does pause on a sixth (on the words “far away”), which is still pretty “far away” from our tonic.

Rhythmic variation

Here’s a little secret: melodies are mostly about rhythm. While this is especially noticeable in rhythmically oriented music like rock, hip hop, R&B, and electronica, it’s also true for ballads, movie themes, classical music, and show tunes. To keep your melodies interesting, you need to vary up the rhythms.

Not only does Arlen mix it up in “Over the Rainbow” between those opening half notes on the word “Somewhere” and the flurry of notes that follow on the words “over the rainbow,” but more importantly, he gives us different rhythms on the third and seventh bars. The words “way up high” are sung as two half notes and a whole note. In the second phrase, on the words “once in a lullaby,” we still end on a whole note, but leading up to it we get quarter and eighth notes. This variation makes our two phrases different and helps pull us towards that final tonic note.

It’s also worth noting how the two phrases end on whole notes, giving the listener time to grok each phrase. Beginning songwriters often ignore these half and whole notes, giving us, as was beautifully stated in Amadeus, “too many notes.” (The best soloists, rather than just play a blizzard of notes, give us phrases and pauses so we can digest what we’ve heard.)

Consider the rhythmic variation to that Raiders of the Lost Ark theme. Yes, Williams repeats that opening three-note rhythm over and over again, but each time, he varies the rhythms of the following notes giving the piece a sense of movement and emotion. (Think how powerful those two quarter notes are in the fifth bar of that melody.)

OK so those are the basic elements of great melodies. Next post, we’re going to show you how to use these elements to write your own.

Scott McCormick is a musician and the author of the Mr. Pants series of graphic novels for kids. He also runs Storybook Editing, offering developmental editing for authors.

Professional songwriters offer advice on how to write a great song

Avatar photo

About Scott McCormick

Scott McCormick is a musician and the author the Audible bestselling Rivals! series and the hit fantasy novel The Dragon Squisher. Scott can be reached at

8 thoughts on “How to write a great melody, Part 1: What makes a melody great?

  1. While Mr. McCormick makes some interesting points in his article, I see these songs very differently. First of all, you really shouldn’t isolate the melody from the harmony. A good melody implies harmony, as these examples indicate. (This doesn’t mean that you are locked into the implied harmony (or the”official harmony.) There are many alternate chords that you can use. In fact, jazz musicians are famous for their “reharmonization.”)

    Also, you should not discount the importance of the lyrics. They determine the basic rhythm of the melody and how many notes you need in a phrase. If you recite the lyrics, without the music, you will see that the natural rhythm (the technical term is “speech rhythm”) of the words often suggests the rhythm in the melody.

    Here’s my simplified analysis of these tunes. (I don’t think that I can include notation, in this e-mail, so verbal description will have to suffice. Please bear with me, since it can get cumbersome.)

    “Over the Rainbow” is about a descending major scale.
    Measure 1: The first note, Ab, seems to establish the key (Ab.)
    Measure 2 begins with the G (the 7th scale degree.) It should be noticed because of its position in the measure, on a strong beat. G is also a structural note. (This is not a hard and fast rule, since lots of songs start on other scale degrees, and beats in the measure. But, it is a good starting point, especially for this song. One of the greats.) The other notes in the measure are just filler, even the Ab on the last beat.
    Measure 3: The next structural note is F, the 6th scale degree. By now, you should be seeing the pattern. Arlen could have chosen to stick to the descending scale or surpass us with a different note. He chose to continue the sequence. The half notes in measure 3, and the whole note in measure 4 bring the melody to a pause. Note that the whole note is on Eb, the 5th scale degree. If you recite the lyrics without harmony, you will see that the whole note is a natural resting point. The lyrics are, indeed, implying and requiring speech rhythm, and that’s what Arlen give us.
    Measure 5 and 6, are a reference to the first two measures. This called “thematic development.” (The rhythm is identical to the first 2 measures.) The melody notes outline the IV chord, and the structural note is the expected Db.
    Incidentally, the skips (an octave in measure 1, a 6th in measure 3 and measure 5) are a sort of anchor, the low notes keeping the melody within the implied harmony.
    Measure 6: The structural note is C, the 3rd scale degree, as expected, by now.
    Measure 7: Still referring to the rhythm of the 2nd measure. Here, he needs to bring the melody home (for this phrase.) The structural note is the expected 2nd scale degree, Bb. The moving melody touches on the 7th scale degree, G, is used as a passing tone to close out the first 8 bars, with the first note Ab, once again, on a whole note (a resting note,) in measure 8.

    I could continue with the analysis of the bridge section, but I’ll limit myself to the 8 measures that Mr. McCormick used.

    I can do a similar analysis on the “Indiana Jones Theme” and “Yesterday,” but I’m not sure of how much space I’m allowed for my reply. If there is a need, I will be happy to furnish analyses for those songs.

    1. As the editor, I contacted Scott, and we discussed the word choice. Merriam-Webster defines motive as “a recurrent phrase or figure that is developed through the course of a musical composition,” and since Part 2 of this post includes the word “motivic,” we chose to stick with “motive” instead of “motif.”

    2. As the editor, I contacted Scott about this word choice. Merriam-Webster defines “motive” as “a recurrent phrase or figure that is developed through the course of a musical composition,” and since Part 2 of this post uses the word “motivic,” we chose to go with motive over motif.

Leave a Reply

Your email address will not be published. Required fields are marked *