How to write a melody for lyrics or chords: 6 steps + audio
Published
Write a melody step by step: rhythm, contour, chord tones, repetition and contrast. Hear each principle, then write 8 bars over a free chord loop.
To write a melody, work in this order. Rhythm first: clap or speak the pattern before you choose any notes. Contour next: give each phrase a shape, mostly small steps with one or two leaps toward a high point. Chord tones on strong beats: land beat 1 of each bar on a note of the chord underneath, and use other notes to travel between them. Repeat with variation: state an idea, repeat it, change its ending. Contrast between sections: lift the chorus higher and give it longer notes than the verse. Record and test: if you can sing it back the next day without pressing play, it works.
Each step below comes with a short audio example, followed by a bar-by-bar analysis and a 20-minute exercise.
Three ways to start a melody
You have words, chords or a sound in your head. The six steps below work for all three.
From the natural rhythm of a lyric line
If you have words, half the rhythm is already written. Say the line as you would in conversation and mark the syllables you lean on. Take this original line:
I left the porch light on for you
It has four natural stresses: i LEFT the PORCH light ON for YOU. That fills two bars: “I” as a pickup, LEFT on beat 1, PORCH on beat 3, ON on the next beat 1 and YOU on beat 3, held. Clap it, then say it with feeling and notice where your voice rises: exaggerating that speech shape is a fine first contour. How to put music to lyrics develops this route, and the syllables and stress guide helps with lines that refuse to fit.
From a chord progression
Start with one long note per chord, taken from the chord itself. Over C–G–Am–F, the line E–D–C–C works: E belongs to C, D to G, C to Am and C to F. Sing it over the loop, then decorate it: add a rhythm, approach each long note from a neighbor and let one bar jump higher. Chord progressions for songwriting has loops to start from; the exercise below uses this one.
From a hummed motif
Record a minute of humming on “da” or “mm”, with no chords and no plan. Keep the best fragment, one bar of three to five notes, then repeat, vary and answer it (step 4). Find chords afterwards: try chords that contain the note on beat 1. Hummed ideas tend to be singable because a voice made them, which is how many hooks begin.
How to write a melody in six steps (with audio)
The examples are short teaching sketches synthesized in your browser, not finished productions. Each starts with a one-bar count-in.
Step 1: Write the rhythm first, then the pitches
This is the rhythm of an 8-bar practice melody on a single note. After the count-in (0:00–0:02), four phrases begin at 0:02, 0:07, 0:12 and 0:17. Each moves long–short–short–long, rests, and slips in a quick note just before the next phrase. The last one ends on a note held from 0:20 to about 0:22. Listen for how much you already understand with no pitch at all: where phrases start, breathe and end.
Now the same rhythm has notes. At 0:02 the first phrase rises E–G–A and settles on G. At 0:07 the second draws the same arch a step lower (D–E–G–E). At 0:12 the third starts on the lowest note so far, C, climbs E–G and this time holds the top note, A, at 0:15. At 0:17 the last phrase steps E–D–E and lands on C at 0:20. The rhythm creates the phrases; the pitches give them direction. Before you pick a single note, tap a two-bar pattern on the table: if it’s interesting on one pitch, pitches can only improve it.
Step 2: Shape the contour with steps and leaps
This melody moves almost entirely by step, within five notes (C up to G). Bars start at 0:02 (E–F–G–E), 0:05 (E–D–C, the C held), 0:08 (C–D–E–F) and 0:10 (a long D over G); the loop repeats from 0:13. Listen for how calm and speech-like it is, and how the long D at 0:10 sounds unfinished and pulls you back to the start.
Same chords and tempo, but the line jumps: E–G–C at 0:02, reaching a high C at 0:04. At 0:05 it turns back down by step (B–A) before dropping to E. At 0:08 it climbs F–A to a high D at 0:09, then falls B–G at 0:10. The span is now seven notes, E up to D. Listen for the lift at 0:04 and 0:09, and for what follows each jump: the melody changes direction. A leap, then movement back the other way, is the classic balance. Steps make a melody singable; one or two well-placed leaps make it memorable.
Step 3: Put chord tones on the strong beats
Chord tones are the notes of the chord under the melody: C, E and G in C; A, C and E in Am. When beat 1 lands on one of them, melody and harmony agree and the line feels grounded. The stepwise example does it in every bar: E over C, E over Am, C over F, D over G. Other notes belong on weaker beats, as passing notes, or on a strong beat on purpose, for a moment of tension that resolves. Don’t know the notes of a chord? Play it and hum until you find a note that blends instead of rubbing. That is almost always a chord tone.
Step 4: Repeat an idea, then vary it
A one-bar motif, G–A–G–E (quick, quick, medium, long), plays at 0:02. At 0:05 it starts the same way but reaches up to a high C instead of falling to E. At 0:07 the same rhythm and shape move higher (A–C–A–F). At 0:10 comes something new, an even G–B–D rise that ends open and sends you back to the start at 0:13. That is a–a′–b–c: statement, variation, echo, answer. Repetition lets a listener learn a melody on first hearing; variation keeps them listening. Keep the rhythm, change the ending.
Step 5: Contrast the verse and the chorus
The verse (0:02–0:12, Am–F–C–G) sits low, between the A below middle C and the F above it, moves in quick one-syllable notes (22 in four bars) and has no drums. The chorus (0:12–0:22, C–G–Am–F) brings in the drums, starts on G, jumps to a high E at about 0:13 and moves in long notes, only 8 in four bars; the last, an A, is held from 0:20. Listen for the register: the chorus’s lowest note is higher than the verse’s highest. In your song, pull at least two levers: higher range, longer notes, fewer words or a different starting beat. The chorus guide covers the lyric side, and the song structure guide shows how sections connect.
Step 6: Record it and test it
Memory smooths over weak spots. Sing the melody over the chords into your phone, three takes, fixing nothing. The next day, try to sing it before you press play. What comes back is the real melody; the bars you forgot are the ones to rewrite. Then play the takes and note which notes strained and where you rushed the words.
Why the practice melody works: a bar-by-bar look
The practice melody from step 1 is the one in the lyric guide’s practice exercise, and every principle above is in it. Here it is with chords and bass:
The chords change every bar: C at 0:02 and 0:05, G at 0:07, Em at 0:10, Am at 0:12, F at 0:15, G at 0:17 and C at 0:20. Listen to the first note of each phrase against its chord: E over C (0:02), D over G (0:07), C over Am (0:12) and the final C over C (0:20).
Four two-bar phrases. Eight bars split into four equal phrases, a size the ear can hold, each with a rest in its second bar for breath.
One rhythm, four times. Every phrase is long–short–short–long plus a quick note. The quick note is a pickup that leads into the next phrase by a small interval: E to D, D to C, G to E. Only the last phrase breaks the pattern, holding its final C for three beats. That change of rhythm tells you the melody is over.
Chord tones on the downbeats. Seven of the eight bars start on a note of their chord:
| Bar | Chord | Note on beat 1 | In the chord? |
|---|---|---|---|
| 1 | C | E | Yes (third) |
| 2 | C | G | Yes (fifth) |
| 3 | G | D | Yes (fifth) |
| 4 | Em | E | Yes (root) |
| 5 | Am | C | Yes (third) |
| 6 | F | A | Yes (third) |
| 7 | G | E | No: it steps down to D on beat 3 |
| 8 | C | C | Yes (root, home) |
The exception is deliberate. At 0:17 the E over G is a softer, less settled color that resolves down to D, a chord tone. One moment of tension right before the end makes the final C feel earned.
A contour with a late peak. The first two phrases are small arches, the second a step lower. The third starts lowest, on C, and climbs to the longest high note, A over F at 0:15, about two-thirds of the way through. The fourth comes home to C.
A narrow range. Everything stays between C and A, a span of six notes, and no interval is bigger than a third. Almost anyone can sing it, which is why it works for practicing lyrics. In your own song, you might add one bigger leap at the peak.
When a melody isn’t working: four common problems
It’s boring
Usually every syllable gets the same length and every phrase starts on beat 1. Merge two short notes into a long one, start a phrase just after the beat, or give phrase three a leap to a note you haven’t used yet, as the leap example does at 0:04. And don’t end on a short note in the middle of your range.
It wanders
If you can’t sing it back after three listens, it has no repetition. Make your favorite bar the first bar of two phrases, land beat 1 of each bar on a chord tone, and end the last phrase on the home note (C in C major) so the listener has a destination.
It’s out of range
Find your lowest and highest sung notes. If the whole melody sits too high or too low but the span feels fine, move the key: the chord player transposes the loop, and you sing the same shape from a new first note. If the span itself is too wide, no key fixes it; lower the peak or raise the lowest passage. A melody within about an octave suits most singers. To see which keys fit, enter your range and the melody’s lowest and highest notes in what key should I sing in?.
It sounds like another song
Thousands of songs share chord progressions; rhythm and the pitches on strong beats are what make a melody recognizable. Sing your first phrase and the suspect’s back to back; if they match, change the rhythm of your first bar, then the peak note. Play the new version to someone without saying what worries you.
Exercise: write an 8-bar melody in 20 minutes
Open the chord player with I–V–vi–IV loaded: C–G–Am–F in C major at 96 BPM, pulsing keys, no drums. Loop it and set a timer. The target: eight bars, four two-bar phrases, over the loop played twice. It doesn’t need to be good; it needs to be finished and recorded.
| Minutes | Task |
|---|---|
| 0–3 | Hum freely over the loop on “da” and look for a rhythm you like. |
| 3–7 | Fix the rhythm of one two-bar phrase and clap it until it’s consistent. Stuck? Borrow long–short–short–long. |
| 7–12 | Choose a chord tone for beat 1 of each bar (table below) and connect them by step. |
| 12–16 | Build eight bars: phrase 1, phrase 1 with a new ending, phrase 3 climbing to your highest note, phrase 4 coming home. |
| 16–20 | Record three takes over the loop and write the beat-1 notes under the chord names. |
| Chord | Chord tones |
|---|---|
| C | C, E, G |
| G | G, B, D |
| Am | A, C, E |
| F | F, A, C |
One possible skeleton for beat 1 of bars 1–8: E, D, C, C, then G, B, high C, A. Ending on A over F leaves the loop open; end on C for a firmer finish. If you don’t read note names, choose by ear: on beat 1, the note that blends.
To record, put on headphones and use the player’s “Record a take” button: it records your voice over the loop, lets you hear both together and stays in your browser until you download it. Without headphones, play the loop from a speaker with your phone beside you. Tomorrow, sing it before you play it back. To warm up on an existing tune first, the lyric guide’s practice melody lets you sing your own words over the melody analyzed above.
Writing melodies over someone else’s track is its own craft: see what a topline is and how to write one.
Where Zoundroom fits
Tuesday’s hummed take is often better than Friday’s polished one, and you only find out if you kept both. In Zoundroom, each song is a project. Open a note in it and record your humming right inside the note: the audio is inserted where your cursor is, and you can type the lyric line under the take while it plays. Record each attempt as a new take instead of replacing the last, with a line of context such as “take 3, chorus a step higher”. If you used your phone’s recorder, import the file into the project and insert it into the note. Here is how notes and lyrics work with audio.
Frequently asked questions
Should I write the melody or the lyrics first?
Either works. Lyrics first gives you meaning and rhythm but can lead to a talky tune; melody first is more singable but needs words that fit its stresses. A middle path: write the melody for one strong line, often the title, and let it set the rhythm for the rest. How to put music to lyrics covers the lyrics-first route.
Do I need music theory to write a melody?
No. You need ears and a way to record. “Chord tones on strong beats” is about all the theory this method requires, and you can find chord tones by ear.
How do I know if my melody is catchy?
Test it. Can you sing it the next day without playing it? Can a friend hum part of it after two listens? Catchy melodies usually combine a short repeated idea, a rhythm that stands out from the verse and a singable range. If only one part sticks, that part is your hook: build the chorus around it.
Can I write a melody without an instrument?
Yes. Hum or sing into your phone; most melodies are written for the voice anyway. You lose the harmony, so find chords afterwards (try chords that contain the note on beat 1) or sing over a loop from the free chord player.