Melody Writing

The melody is the part people hum on the way home. You don't need a music degree to write one. A good melody follows a few simple rules about shape, rhythm and repetition, and this lesson shows you each one.

What Makes a Melody?

A melody is a sequence of single notes, one after another, that the listener hears as one idea. It can be a vocal line, a synth lead, a guitar riff or a whistled tune.

Every melody has two ingredients:

Beginners spend all their time on pitch. In practice, rhythm matters just as much. Tap the rhythm of a famous melody on a table and most people can still name the song. Play the same notes with a random rhythm and nobody can.

A hook is the short, catchy part of a song that sticks in your head. Most hooks are melodies only 2 to 8 notes long, repeated several times.

Contour: the Shape of a Melody

Contour is the overall shape of a melody: whether it goes up, down, or both. Draw a line through the notes and you see the contour.

Common melodic shapes

Arch ╱‾‾╲ rise to a peak, then come back down (the most common shape) Inverted ╲__╱ dip down, then climb back up Rising __╱‾ builds energy, good for pre-choruses and build-ups Falling ‾‾╲_ relaxes, sounds like a resolution or an ending Static ‾‾‾‾ repeats one or two notes: chanted, rhythmic hooks

The arch is popular because it feels complete: it builds tension on the way up and releases it on the way down. Many phrases put the highest note about two-thirds of the way through.

Steps vs leaps

A step moves to the next note in the scale (for example C to D). A leap jumps further (for example C to A).

A useful rule from classical writing: after a big leap, move back by step in the opposite direction. Leap up a 6th, then step down. This "fills the gap" and makes the leap sound intentional. The melody of "Somewhere Over the Rainbow" opens with an octave leap up ("Some-where"), then mostly steps back down.

Producer tip

Put the highest note of your whole song in the chorus. If the verse already hits that note, the chorus has nowhere to go.

Using Scales Safely

If you only use notes from the song's scale, nothing will sound "wrong". If you're not sure about scales yet, review Notes & Scales first.

The easiest starting point is the pentatonic scale, a five-note scale with no half steps. Because there are no notes a half step apart, almost any combination sounds pleasant. That's why it shows up everywhere, from blues guitar solos to pop toplines to folk music around the world.

A minor pentatonic vs A natural minor

A natural minor: A B C D E F G (7 notes) A minor pentatonic: A C D E G (5 notes: B and F removed)

The two notes removed (B and F) are the ones most likely to clash with the chords. Remove them and you get a "safe" set of notes for improvising.

Notice how ending on A (the root, or home note) sounds finished, while ending on D or G sounds like a question. You'll use that feeling later for call and response.

Chord Tones vs Passing Tones

A melody plays over chords. Each note either belongs to the current chord or it doesn't:

The simple rule: put chord tones on strong beats (beats 1 and 3) and on long notes. Use passing tones on weak beats and short notes to travel between them.

Melody over a C major chord (C – E – G)

Beat: 1 & 2 & 3 & 4 & Note: E F G - E D C - Type: chord pass chord chord pass chord

Every strong beat lands on C, E or G. F and D are passing tones that link them. It sounds smooth and settled.

If a melody note clashes with a chord, you have three fixes: move the note by one step to a chord tone, make it shorter, or move it to a weaker beat. Review which notes are in each chord in Chords.

Motifs, Repetition & Variation

A motif is a short musical idea, usually 2 to 6 notes, that a melody is built from. The opening of Beethoven's Fifth Symphony (short-short-short-long) is the classic example. The whole first movement grows out of those four notes.

Repetition makes a melody memorable. Too much repetition makes it boring. The balance is repetition with variation: repeat the motif, but change one thing each time.

Ways to vary a motif

TechniqueWhat you changeExample (motif C–D–E)
Exact repeatNothingC–D–E
SequenceMove it up or down the scaleD–E–F
New endingChange only the last noteC–D–G
Rhythm changeSame notes, new rhythmC (long) – D – E (short)
InversionFlip the directionE–D–C
ExtensionAdd notes to the endC–D–E–D–C

Call and response

Call and response is a pair of phrases: the first one (the call) asks a question, the second (the response) answers it. It comes from African and African-American musical traditions and runs through gospel, blues, funk and pop.

The easy way to write it:

  1. Write a 2-bar call that ends on an unstable note (for example the 2nd or 5th of the scale).
  2. Repeat the first half of the call for the response.
  3. Change the ending so it lands on the root note on a strong beat.

A 4-bar call and response in A minor

Bar 1-2 (call): A C D E . . . D . (ends on D: "question") Bar 3-4 (response): A C D E . . . C A (ends on A: "answer")

The two halves start the same, so the listener recognizes the idea. The different endings give it a sense of movement and arrival. This A–B pattern is sometimes called an "antecedent and consequent" phrase.

The Rhythm of a Melody

Rhythm gives a melody its personality. Same notes, different rhythm, completely different tune. If you need a refresher on note lengths, see Rhythm & Tempo.

Two tricks that work almost every time

Note

A riff is a short, repeated melodic pattern, usually on guitar, bass or synth, that loops under or between vocals. The guitar line in "Seven Nation Army" by The White Stripes is a famous riff built from just a handful of notes.

Range

Range is the distance between the lowest and highest note in a melody.

A simple plan: keep the verse in the lower part of the range, and move the chorus up 3 to 5 semitones. The change in register alone makes the chorus feel bigger.

Writing Over a Chord Progression

Most producers write the chords first, then the melody. Here is a reliable step-by-step method. It assumes you already have a loop like those in Chord Progressions.

  1. Loop four bars of your progression at a comfortable tempo.
  2. Find the chord tones. For each chord, write down its three notes. These are your "landing notes".
  3. Hum first, play second. Hum or sing over the loop for a few minutes and record it on your phone. Your voice naturally finds singable shapes.
  4. Pick the best 2-bar idea and play it into your DAW.
  5. Check every strong beat. If a long note clashes with the chord, nudge it one step to a chord tone.
  6. Build the 4-bar phrase with call and response: repeat your idea with a new ending.
  7. Build 8 bars by repeating the 4-bar phrase, with one variation in the second half (a higher peak, or a different final note).
Try it in your DAW
  1. Create a MIDI track with a piano or simple synth lead, and another with a pad playing a 4-chord progression (for example Am – F – C – G).
  2. Turn on scale highlighting so only the right notes are marked: set the scale to A minor [Ableton: the Scale button in the clip; FL Studio: Piano roll menu → Scale highlighting; Logic: Scale Quantize in the Piano Roll].
  3. Set the grid to 1/8. Draw a 2-bar call using only A, C, D, E and G, ending on D or E.
  4. Copy it to bars 3–4 and change the last two notes so the phrase ends on A on beat 1 of bar 4.
  5. Move the first note of each phrase one 8th note earlier so it starts on the "&" before the bar. Listen to how it pulls you in.
  6. Delete one or two notes to leave a gap of at least two beats. Loop it and decide which version is catchier.

A short musical idea that a melody is built from is called a .

The A minor pentatonic scale has notes: A, C, D, E and G.

Notes that belong to the chord playing underneath are called chord .

1. What is a good thing to do after a big upward leap in a melody?

  1. Leap up again
  2. Stop the melody
  3. Repeat the same high note many times
  4. Move back down by step

Stepping back in the opposite direction "fills the gap" and makes the leap sound intentional.

2. Why is the pentatonic scale considered "safe" for beginners?

  1. It has no half steps, so its notes rarely clash
  2. It has more notes than the major scale
  3. It only works in C major
  4. It is always played at 120 BPM

The pentatonic scale removes the two notes that sit a half step from others, so almost any combination sounds pleasant.

3. Where should chord tones usually go?

  1. Only on the very last note
  2. On weak beats and very short notes
  3. On strong beats and long notes
  4. Nowhere; melodies should avoid them

Chord tones on strong beats and held notes make the melody sound stable. Passing tones fill the weak beats in between.

4. In call and response, how does the response usually differ from the call?

  1. It is in a different key
  2. It uses completely different notes and rhythm
  3. It is always twice as long
  4. It starts the same but ends on a stable note like the root

Repeating the start makes it recognizable; a new ending on the root makes it sound like an answer.

5. What is a typical comfortable range for a vocal hook?

  1. Three or four octaves
  2. About one octave
  3. Exactly one note
  4. It doesn't matter

Most singable hooks fit within about an octave, which most people can sing along to.