Writing Melodies
Principles of a good melody
Five things every memorable melody has — and how to put them in your own.
Five universal principles
The melodies you remember all share a small set of qualities. None are rules; all are tendencies.
1. Contour
A melody has shape. It rises, falls, peaks, returns. Sing “Happy Birthday” — you can almost draw it on paper. Now sing a random sequence of seven notes from a scale — your ear notices instantly that the random version has no shape.
When you write a melody, sketch its contour first, before choosing exact pitches. Will it rise to a peak? Where? Then come back down?
2. Step + leap balance
Good melodies are mostly stepwise (move by 2nds) with occasional leaps. Too much stepwise motion feels predictable; too many leaps feel unmoored. The rule of thumb:
- After a leap, return by step in the opposite direction. (Most leaps need to be “recovered”.)
- Use leaps to mark important notes — the top of a phrase, the start of a new section.
The classic shape of pop choruses: a leap up to the highest note (the “hook”), then stepwise descent.
3. Repetition + variation
A melody returns to ideas it has already stated. Repeat a phrase, then vary it slightly.
In music theory this is called motivic development — a motif is a small fragment (3-7 notes), and the melody is built by repeating it with changes. Beethoven’s Fifth (“da-da-da-DUM”) is four notes; the entire first movement develops them.
Pop choruses are usually built from one or two short motifs repeated and varied. The verse develops a different motif.
4. Tension and release
A melody sets up expectations and then either satisfies them or surprises. Land on a chord tone at points of rest (e.g. the end of a phrase). Pass through non-chord tones (passing tones, neighbour tones) to create motion.
The leading tone (the 7 of the major scale) is your strongest tension-builder — it pulls hard to the tonic. Use it to almost end a phrase, then resolve.
5. Phrase shape
Melodies are made of phrases — usually 2 or 4 bars long — with clear beginnings and endings. The most universal phrase structure is AABA:
- A — present an idea
- A — repeat it (possibly slight variation)
- B — contrast (new idea, often higher / more intense)
- A — return to the original
This works for any length — 8 bars, 16 bars, even 32 bars. It’s the architecture of “Somewhere Over the Rainbow”, “Yesterday”, and a vast amount of music in every genre.
A worked example
The opening of “Twinkle, Twinkle, Little Star”:
1 1 5 5 6 6 5
Notice: - Stepwise + leaps: 1-5 is a leap (P5), 5-6-5 is stepwise. - Contour: rises to 6, then back down. - Repetition: “1 1” repeats. “5 5” repeats. “6 6” repeats. The whole phrase has a built-in echo structure. - Phrase end: ends on 5 (the dominant) — half-cadence feel, makes you wait for the next phrase to resolve.
This is a 1782 melody for children. It uses every principle above. Good melody-writing has always been the same thing.
Try this
Take the C major scale and write an 8-bar melody using only quarter notes, with these constraints:
- Stay in 4/4.
- Mostly stepwise, with one or two leaps.
- Phrase ends (every 2 bars) should land on a chord tone of the C major chord (C, E, or G).
- The final phrase ends on C.
Sing it. Refine it. You just wrote a melody.