How to Write a Memorable Melody: Contour, Intervals and Motifs That Stop Your Tunes Wandering
A melody sticks when the listener can predict part of it and gets surprised by the rest. You get there with four habits: give each phrase a clear shape
By the MuziAI team. The numbers come from measurements we ran ourselves while building MuziAI; drafts were written with AI assistance, and every figure was checked against our measurement logs. Updated October 13, 2026.
A melody sticks when the listener can predict part of it and gets surprised by the rest. You get there with four habits: give each phrase a clear shape with one high point, move mostly by step and save leaps for the moments that matter, build the tune from a short motif that you repeat and then vary, and land chord tones on the strong beats so the melody feels anchored to the harmony. Keep the whole thing within about an octave so people can sing it back, and end a phrase on a stable note only when you want it to feel finished.

Why your melodies sound like random notes
A melody sounds random when nothing in it repeats and nothing in it points anywhere. Listen back to one of your wandering tunes and you will usually find the same four gaps: the line drifts up and down without an overall direction, no short idea comes back, every note has roughly the same length, and the notes on the strong beats have no connection to the chord underneath.
Memory works on patterns. A listener needs something to recognise on the second hearing, and then something new so they keep paying attention. A string of unrelated notes offers neither, so the ear gives up.
The vocabulary you need is short:
- A step is the move to the next note of the scale, such as C to D or E to F (an interval of a second).
- A leap is any bigger move, a third or more, such as C to E or C to A. Some teachers call a third a skip and keep "leap" for a fourth and above.
- Scale degrees number the notes of the key. In C major, C is 1, D is 2, E is 3, F is 4, G is 5, A is 6 and B is 7. Numbers let you move a melody to any key without rewriting it.
- In 4/4 time, beat 1 is the strongest beat of the bar and beat 3 is the next strongest. Beats 2 and 4, and the "ands" between beats, are weak.
Give each phrase a shape before you pick the notes
Contour is the outline of a melody: the line you would draw if you traced its notes going up and down. Deciding the shape first stops most wandering, because it gives every note a job (climbing toward something, or falling away from it).

Hum the phrase on a single vowel, or sketch a line on paper, before choosing any pitches. Once the shape feels right, find notes that follow it.
The main shapes and what they feel like
- An arch rises to a high point and comes back down. It feels complete and balanced, and you will find it in many folk tunes and hymns.
- An inverted arch dips to a low point and climbs back. It feels reflective, then lifts at the end.
- A wave has several smaller rises and falls. It suits verses, where you want movement without a big climax.
- An ascending line keeps climbing. It builds energy and works well leading into a chorus.
- A descending line falls steadily. It sounds calm, sad or settled, and often closes a section.
A common pairing is a wave or a low, narrow arch for the verse and a higher arch for the chorus, so the chorus feels like it opens up.
One peak per phrase
Give each phrase one highest note and touch it once. If the melody hits its top note in every bar, the top note stops meaning anything. If it arrives there once, late in the phrase or in the chorus, the listener hears it as the emotional point of the line.
The same thinking applies across a whole song. Many songs save their single highest note for the chorus, and some save it for the last chorus only.
Steps, leaps and how to recover from a jump
Most singable melodies move mainly by step, with a few leaps placed where the feeling peaks. Steps are easy to sing and easy to follow. Leaps add energy and emotion, but a melody built mostly from them sounds jagged and is hard for anyone to sing back.
If your tunes feel jumpy, count how many leaps you have per phrase. Two or three well-placed leaps in a four-bar phrase is plenty for a beginner; the rest can be steps and repeated notes.
Interval size changes the feeling. A small leap such as a third sounds gentle. A fourth or a fifth sounds open and strong; anthems and fanfares are full of them. A sixth or an octave sounds dramatic and yearning, and the octave leap that opens "Over the Rainbow" is a well-known example.
Fill the gap after a big leap
After a large leap, move back by step in the opposite direction. If you jump from C up to A (a sixth), follow it with G, F or E. The leap opens a gap in the scale, and stepping back through it makes the jump feel intentional rather than accidental. Melody teachers call this gap-fill, and once you listen for it you will hear it in tune after tune.
Avoid stacking several big leaps in the same direction. The exception is when the leaps spell out the chord: C, E, G, C going up over a C chord sounds natural because the ear hears it as one sound broken into pieces.
Build the whole tune from a short motif
A motif is a short musical cell, usually two to five notes, with a recognisable rhythm. The opening of Beethoven's Fifth Symphony, three quick repeated notes and a long lower one, is the textbook case: most of the first movement's themes grow out of that four-note idea.
You do not need a symphony's worth of development. A pop chorus might use one motif four times with small changes, and that is enough for listeners to hum it after one listen.
A good motif has a distinct rhythm and a clear direction. E, D, C with a short, short, long rhythm is a perfectly usable motif: three notes falling by step to the home note.
Ways to vary a motif
- Repeat it exactly. This is how the listener learns it.
- Move it in sequence: same shape and rhythm, different starting note. E D C becomes D C B, or F E D.
- Change the ending. Keep the first notes and alter the last one, so E D C becomes E D G.
- Invert it by flipping the direction. Falling steps E D C become rising steps, for example F G A.
- Change the rhythm. Stretch the notes to double length (augmentation), halve them (diminution), or shift where the motif starts in the bar.
- Fragment it, using only part of the motif (the last two notes, say) as a little echo.
A common plan for a four-phrase section is statement, repeat, variation, then something new or a return. You can write it as a, a, a-varied, b. The first two phrases teach the idea, the third bends it, and the fourth gives the ear somewhere to land.
Two identical statements in a row usually feel intentional, but a third identical one starts to feel stuck unless the chords or the lyric change underneath it. If a phrase keeps coming back, change something small each time: the last note, the rhythm, or the starting pitch.
Rhythm is half of what people remember
Play the same pitches with a different rhythm and you get a different tune. Take the opening of "Twinkle, Twinkle, Little Star" (C C G G A A G) and play it in a skipping long-short, long-short rhythm instead of even notes, and it stops sounding like a lullaby. Listeners often recognise a melody from its rhythm alone, clapped with no pitches at all.
So when you move a motif to new notes, keep its rhythm; the rhythm is what tells the listener it is the same idea.
Mix note lengths. A phrase of all equal notes sounds like a scale exercise. Short notes followed by a held note at the end of the phrase give the line a sense of breathing in and out. Leave rests, too; a melody that never stops has no phrases, and a singer has nowhere to breathe.
Starting a phrase just after the downbeat, or placing a note slightly ahead of the beat (syncopation), gives the melody a personality that a phrase starting squarely on beat 1 every time does not have.
Put chord tones on the strong beats
The notes that fall on beats 1 and 3 should mostly belong to the chord underneath. Chord tones are the root, third and fifth of the chord: over a C major chord they are C, E and G; over F major they are F, A and C; over G major they are G, B and D; over A minor they are A, C and E. When those notes land on the strong beats, the melody sounds anchored to the harmony even when it moves around in between.

The notes in between connect the chord tones. A passing tone walks by step from one chord tone to another (E, D, C over a C chord: D is the passing tone on a weak beat). A neighbor tone steps away and comes straight back (E, F, E). Both sound smooth because they sit on weak beats and move by step.
You can break the rule on purpose. A non-chord tone placed on a strong beat and then resolved by step into a chord tone creates a moment of expressive tension. Over an F chord, leaping up to G on beat 1 and then stepping down to F produces a small ache that resolves. When the clashing note is reached by a leap like this and resolved by step, it is called an appoggiatura. Used once or twice per section it adds feeling. Used everywhere, it sounds like wrong notes.
If you write over chords that change every bar, a quick check is to look at the note on beat 1 of each bar and ask whether it belongs to that bar's chord. When the answer is often no and the note does not resolve by step, that is probably where your melody sounds off.
Tension, resolution and phrases that answer each other
A melody feels finished when its last note is a stable scale degree, and unfinished when it stops on an unstable one. In a major key, 1, 3 and 5 are stable. The others lean somewhere: 7 pulls up to 1 (B to C in C major, which is why 7 is called the leading tone), 4 tends to fall to 3 (F to E), and 2 tends to fall to 1 (D to C).
If your melodies just stop rather than end, check the last note of each phrase. A melody that lands on 1 at the end of every phrase sounds finished four times, and nothing pulls the listener forward. One that never lands on 1 leaves the listener hanging.
The fix is question and answer phrasing. End the first phrase on an unstable or half-stable note such as 2, 4 or 5, so it sounds like a question. End the second phrase on 1, so it sounds like the answer. The two phrases can start the same way and differ only in their last notes, and that pairing makes them sound like one complete thought.
Save the arrival on 1 over the home chord for the end of the section. Delaying it is what makes it satisfying.
Keep it in a range people can sing
Melodies written for everyone to sing, such as folk songs, hymns and pop choruses, usually span an octave or less, and the more a tune goes past that with big leaps, the harder it gets for people without vocal training. If you want listeners to sing along, keep the melody within roughly that span. "The Star-Spangled Banner" covers an octave and a fifth, and it is famous for being hard to sing for exactly that reason.
A simple way to create lift is to keep the verse in the lower part of the range and move the chorus higher, so the chorus sounds bigger without needing any extra notes.
Test the melody with your own voice, not only on an instrument. An instrument can play any interval cleanly, which hides awkward jumps. If you strain at the top or mumble at the bottom, either move the whole melody into a different key or reshape the phrase so the peak sits lower.
A worked example in C major
Here is an eight-bar melody that uses every idea above. It is in 4/4, one chord per bar. The first phrase uses C, G, Am, F (I, V, vi, IV). The second phrase switches to C, F, G, C (I, IV, V, I) so it can close on the home chord. Rhythm in every bar is quarter, quarter, half (short, short, long) except the last.
| Bar | Chord | Notes | Scale degrees | What it does |
|---|---|---|---|---|
| 1 | C | E D C | 3 2 1 | Motif: three notes falling by step |
| 2 | G | D C B | 2 1 7 | Sequence of the motif, one step lower |
| 3 | Am | C E A | 1 3 6 | Climbs by leaps that outline the chord, peak on A |
| 4 | F | A G F | 6 5 4 | Steps back down, ends open on 4 |
| 5 | C | E D C | 3 2 1 | Motif returns unchanged |
| 6 | F | F G A | 4 5 6 | Inversion: the motif turned upward |
| 7 | G | D C B | 2 1 7 | Bar 2 again, ends on the leading tone |
| 8 | C | C (whole note) | 1 | Leading tone resolves home |
Play it in the octave starting from middle C and the range runs from B below middle C up to A, under an octave.
Look at how the pieces fit. The first phrase dips to B in bar 2, climbs to A in bar 3, then falls again, so its contour is a small dip followed by an arch. The peak A appears once in that phrase, on beat 3 of bar 3, late in the phrase. The climb in bar 3 goes up by a third and a fourth, and bar 4 fills the gap by stepping back down A, G, F. Every beat 1 and beat 3 holds a chord tone of its bar's chord. The first phrase ends on F, degree 4, which leans down toward E, so it sounds like a question; the second phrase ends on C after B, the 7 to 1 pull, so it sounds like the answer.
Try changing one thing at a time. Swap bar 6 for an exact copy of bar 4 and the second phrase loses its own identity. Move the peak into bar 1 and the arch flattens out.
Common mistakes that make a melody forgettable
When a melody is not working, run through this list before you throw it away:

- The top note appears in nearly every phrase, so nothing feels like a climax.
- Every note has the same length.
- Nothing repeats, or one idea repeats without any change.
- Every phrase ends on 1, so the tune keeps stopping instead of moving forward.
- The range is wider than an untrained voice can manage, or the leaps come one after another with no stepwise recovery.
- The melody copies the root of each chord, so it sounds like a bass line rather than a tune.
- Most beat-1 notes clash with the chord and never resolve.
One more habit causes a lot of these: writing only with your hands on an instrument. Fingers fall into familiar shapes and scale runs. Humming away from the instrument, then finding the notes afterwards, tends to produce lines with more natural rhythm and a more singable range.
A ten-minute daily melody exercise
You get better at melody by writing many short ones, and ten focused minutes a day is enough to build the habit.
- Pick a four-chord loop, such as C, G, Am, F, and play or loop it.
- Hum over it for two or three minutes without judging. Record the whole time on your phone.
- Listen back and pick the best two to five notes. Write them down as scale degrees with a rough rhythm (for example 3 2 1, short short long).
- Write three variations of that motif using the techniques above: a sequence, a changed ending and an inversion.
- Arrange four phrases as a, a, a-varied, b, decide where the single peak goes, and make sure the last phrase ends on 1.
You do not need to read sheet music for any of this. Scale degree numbers and a voice recorder are enough, and they have the advantage of working in any key. Theory is useful as a vocabulary for understanding why something your ear already likes is working, and for fixing a phrase that is not. Hum first, then shape what comes out.
If you want to hear a finished melody under a full arrangement while you practise, MuziAI can turn a song idea into a complete track for you to listen back to.
Try it now on MuziAI
Free, no sign-up required. Share an idea, and our AI lyrics generator writes and sings a complete song.
Create Song