
How to Write a Melody: A Step-by-Step Guide for Beginners
Pick up four notes — G, E, F, G — and you have a motif. Repeat it. Move it up a step. Answer it with something that lands on C. That is a phrase, and a phrase is the building block of every melody you have ever hummed. This guide takes you from that first motif to a complete eight-bar melody, one step at a time, with notation examples for every idea.
What a melody is made of
A melody has three ingredients: pitch (which notes), rhythm (how long each lasts), and contour (whether the line rises, falls, or arches). Change any one of them and you have a different melody, even if the other two stay the same. Most memorable tunes score well on all three: they have a clear shape, a distinctive rhythm, and they move in a range the voice or instrument can sing comfortably. Think of "Happy Birthday": the repeated-note upbeat and the octave leap on "to you" give it its rhythm; the stepwise descent in the second half settles it back down. The pitches do not matter as much as the relationship between them.
The scale you choose is your palette. In The major scale you will find the recipe: eight notes from home to home, following the pattern whole–whole–half–whole–whole–whole–half. In C major every note is a white key, and the two half-step pairs (E–F and B–C) happen automatically. Play the scale slowly and name each note; that is the note pool for everything that follows.

The C major scale, degrees 1–8. Degrees 1, 3, and 5 (C, E, G) are the most stable; degree 7 (B) pulls strongly back to 1.
Not all scale degrees feel equally settled. Degrees 1, 3, and 5 form the I chord (C E G) and sound stable when you land on them. Degree 7 (B) is the most restless — it wants to step up to 8. Degree 2 (D) leans toward 1 or 3. The other notes sit between stable and restless. For a first melody, plan your phrase endings on degree 1 or degree 5: degree 1 gives a full stop, and degree 5 leaves a question open.
Start with a motif
A motif is the smallest unit of melody that has a recognizable shape. It is usually two to four notes long, and it has both a pitch shape (steps, leaps, the direction they go) and a rhythm (the note values that give it character). The same two or three notes with a different rhythm sound like a different motif.
Motif and sequence describes it this way: a motif is short, often just a few notes, with a rhythm and a shape you can recognize — and it comes back. That second part is the point. A motif only becomes a motif once you repeat it.
The example below uses the four-note motif G–E–F–G: quarter, quarter, quarter, half. Bar 1 states it. Bar 2 repeats it exactly. Bar 3 moves the same shape to start on A: the whole thing shifts up one step, so the notes become A–F♯–G–A. Bar 4 answers by stepping back down G–F–E–C, landing on the home note with a fermata.

A motif grows into a phrase. Bar 1: G E F G (the motif). Bar 2: exact repeat. Bar 3: sequence, same shape starting on A. Bar 4: answer, landing on C.
You can practice spotting motifs yourself with Find the motif and the sequence: each of its four phrases grows from one short idea, and the exercise trains you to label what changes — repeat, sequence, variation, or new material.
Develop the motif: four moves
Once you have a motif, you do not need to invent more new ideas. You need to develop the one you have. Here are the four most useful moves:
- Exact repeat — the same notes and rhythm, in the same position. The simplest and most used.
- Sequence — the same shape, shifted to start on a higher or lower note. The intervals stay the same (or approximately the same in a diatonic sequence); the pitch level changes.
- Inversion — every step and leap reversed in direction. A step up becomes a step down. A rising third becomes a falling third. The rhythm stays the same.
- Augmentation — each note value doubled. A quarter note becomes a half note. The shape slows down and gains weight, often used to bring a phrase to a close.

The same three-note motif (C–E–G, two rising thirds) used four ways. Sequence moves the shape up a third (E–G–B). Inversion turns the rising thirds into falling thirds (C–A–F). Augmentation doubles every note value.
The Motif and sequence handout adds a fifth move: keeping only the head of the motif (its first one or two notes) and extending from there. This is especially useful in bar 4 of a phrase, where you want the motion to feel conclusive rather than simply another repetition. Here is a summary of all six:

Six things you can do with a motif. Master repeat and sequence first. Add inversion and augmentation when you are ready for more variety.
A motif is not what you invent — it is what you decide to repeat.
Phrase structure: question and answer
A phrase is a musical sentence, typically four bars. Two phrases that belong together form a period of eight bars. The Phrase and period handout gives the defining rule: a phrase that ends on the V chord sounds open, like a comma; a phrase that ends V→I sounds closed, like a period at the end of a sentence.
The open phrase is called the antecedent (the question); the closed phrase is the consequent (the answer). Together they make a parallel period when the consequent starts the same way as the antecedent and changes only its ending.
Both cadence types are worth hearing on their own before you try to build a full period:

Left (bars 1–2): a half cadence — melody lands on D over G and stops there, leaving the phrase open. Right (bars 3–4): an authentic cadence — melody steps through G7 and closes on C with a fermata. Plan both endpoints before you fill in the middle bars.
The eight-bar example below shows this clearly. Bars 1–4 share their opening bars with bars 5–8 — the same rhythm and the same melodic shape, beginning on E. The antecedent ends on D over G (a half cadence, leaving the question open). The consequent redirects in bar 7: instead of arriving on D again, it pushes through G7 and lands on C at the start of bar 8 with a fermata. That is an authentic cadence — the full stop.

Antecedent (bars 1–4) and consequent (bars 5–8). Both open the same way; only bar 7 and the downbeat of bar 8 differ. The antecedent's comma (half cadence on G) makes you wait for the consequent's period (V7→I on C).
The Sentence is an alternative eight-bar shape. Instead of question and answer, it uses a two-bar idea, an exact repeat of that idea, then a continuation — shorter fragments that increase activity and push toward the cadence. The sentence is excellent for fast, energetic melodies; the period works better for lyrical ones. For a first melody, the period is easier to write and to hear.

Period vs. sentence: both are eight bars. The period uses a question-and-answer structure with an antecedent and consequent. The sentence presents a basic idea, repeats it, then uses fragmentation to drive toward the cadence.
Contour: the shape of the line
Contour is what the melody looks like on a page — whether the line rises, falls, or arches. The three common shapes are arch (up then down), ascending (steadily higher), and descending (steadily lower). Most memorable tunes are arch shapes, at least within a phrase.

Three common melodic contours. The arch is the most natural: a rise, a climax, and a fall. Ascending and descending lines build or release energy and work well within a phrase, though a whole melody that only goes one direction runs out of room.
The guidelines that follow from contour are practical:
- Use mostly steps (adjacent scale degrees). They are easier to sing and sound natural. Leaps add expression, but too many make a melody angular and hard to follow.
- Resolve leaps by step in the opposite direction. After a leap upward, the next note should step down. After a leap downward, the next note should step up. This is not an absolute rule, but it describes the behavior of most effective melodies.
- Place the climax once, not three times. The highest note of a phrase is its most intense moment. Use it once, let it stand out, and descend from it.

Bars 1 and 2: each leap is followed by a step in the opposite direction — the natural resolution. Bar 3 has two consecutive leaps without a step back, which sounds unsettled and is usually avoided in a beginner melody.
The arch contour below rises from C by step through the first bar, reaches A in bar 2 (the high point), then descends stepwise back to C by bar 4. Every note moves by step, the peak sits in bar 2, and the landing is predictable: the ear knows the melody is coming home.

An arch contour in C major. The melody climbs by step C–D–E–F in bar 1, reaches the high point A in bar 2, then descends F–E–D and steps home to C with a fermata. No leaps: every move is a step.
Landing on chord tones
A melody lives over a chord progression. The chords do not play the melody — they support it — but on the strong beats (beats 1 and 3 in 4/4), landing on a note that belongs to the chord underneath sounds intentional. Landing on a note that does not belong to the chord sounds like color (a non-chord tone) or, if unplanned, like a wrong note. A single note works with many different chords — C5 belongs to the C major chord, the A minor chord, and the F major chord — so landing on C on a strong beat usually makes sense no matter which chord you are over. That flexibility is what lets you vary the chords under a melody without rewriting the melody.
The Choosing chords for a melody handout turns this inside out: you can also start with the melody and let the strong-beat notes choose the chord. For writing, the two skills reinforce each other.
Here is how the notes break down in C major:
- I chord (C): contains C, E, G
- V chord (G): contains G, B, D
- vi chord (Am): contains A, C, E
- IV chord (F): contains F, A, C
The notes not in a chord on a given beat are non-chord tones. The most useful one for beginners is the passing tone: a note that steps between two chord tones and falls on a weak beat (beat 2 or beat 4). It adds motion without clashing.
The figure below shows four bars over I–V–vi–IV, labeled I (chord tone) or P (passing tone) under every note. Beat 1 of each bar lands on a chord tone; other strong beats usually do, with passing tones filling between.

Melody over I–V–vi–IV, four bars. I marks a chord tone; P marks a passing tone stepping between two chord tones. Beat 1 of each bar is a chord tone. Bar 1 (C major): E–D–E–G, where D is passing. Bar 2 (G major): G–F–G–A, where F and A are passing. Bar 3 (Am): A–G–A–G, where the two G notes are passing. Bar 4 (F major): F–E–D–C, where E and D pass toward C.
Rhythm and space
Rhythm makes or breaks a melody before the pitches even register. A good melodic rhythm has two things: a repeated rhythmic idea (connected to the motif) and rests. The rests are as important as the notes.
A rest does three jobs:
- It gives the phrase a breath — a natural place to stop and restart.
- It creates contrast: silence next to sound makes the sound louder in your memory.
- It opens a gap that the next phrase fills — the question-and-answer effect works rhythmically too.
A simple effective rhythm for a first motif: quarter, quarter, quarter, half (3 moving notes, then one held note). Repeat the same rhythm in bar 2, vary it in bar 3, and add a rest in bar 4 before the final landing note.
Here is that rhythm applied to the motif E–D–E: bars 1 and 2 each end with a quarter rest, bar 3 holds the climax A as a half note (a longer note at the peak gives it more weight), and bar 4 descends stepwise to close on C.

Rests in bars 1 and 2 give the phrase breathing room. The climax A in bar 3 is held longer — a half note — which makes it feel more important. Bar 4 steps down E D C: the rhythm slows, the pitch descends, and the phrase is finished.
A complete melody: putting it together
Here is an eight-bar melody over I–V–vi–IV in C major that uses everything above: a motif (E–D–C), an antecedent ending open on D in bar 4, and a consequent that begins the same way but closes stepwise on C in bar 8. The climax, A5, appears once in bar 3 and is approached and left by step.

An eight-bar melody over I–V–vi–IV. The antecedent (bars 1–4) rises through G to reach the climax A in bar 3, then descends to D (open). The consequent (bars 5–8) begins the same way, turns in bar 7, and closes stepwise on C (full stop).
Notice a few details. The melody uses only six different pitches (C, D, E, F, G, A). The climax A appears only once — in bar 3 — keeping it special. Beat 1 of each bar lands on a chord tone; other strong beats usually do, with passing tones filling between. And bar 5 copies bar 1 exactly, so the listener recognizes the return and waits for the difference — which arrives in bars 7–8.
For the chord choices you need under this melody, Choosing chords for a melody shows how to identify which chord owns the notes on strong beats and how to plan cadences first, then fill the middle.
Common pitfalls — and how to fix them

Six pitfalls that make beginner melodies hard to remember. Each has a simple fix.
The before-and-after example below shows the most common case: a melody built from random leaps, with no motif repetition and no rests. It is not wrong in an obvious way — all the notes are in the key — but the ear has nowhere to hold on. The fix removes the leaps, adds one rest per bar, and shapes the whole thing around a simple three-note motif E–D–E that sequences up to G–F–G in bar 2.

Left (before): too many leaps, no repetition, no rests — the ear has nowhere to hold on. Right (after): mostly stepwise motion, a repeated motif, one rest per bar, closes on C. The fix removes leaps and adds silence.
The fix uses six pitches (C, D, E, F, G, A) and moves mostly by step — the climax A in bar 3 is approached and left by step, and only one moment (A down to G at the bar 3–4 boundary) is a step rather than a leap. That restraint is not a limitation; it is what makes the melody singable. Once you can write a good stepwise melody, adding an occasional leap for emphasis becomes a tool rather than an accident.
The An Idea, Its Repeat, and a Push to the End worksheet shows how the sentence model uses fragmentation in bars 5–6 — each two-beat unit is a fragment of the original idea, speeded up — to build momentum. If you want to try a sentence shape instead of a period, that worksheet gives you a worked example with Roman numeral analysis and a "try it" to mark the fragments yourself.
A six-step process
Before you sit down to write, you have a plan. Here is the process, compressed into six steps:

The six steps. Steps 1–4 build a four-bar phrase; steps 5–6 expand it into a full eight-bar melody.
Work through them at the piano, out loud. Play every bar you write before moving to the next one. The ear catches problems the eye misses: a leap that looked fine on paper sounds jarring when you play it; a repeated note that seemed monotonous actually works because the rhythm carries it.
The Motif and sequence handout gives a short "try it" at the end: grow a tune from E–D–C, the first bar of Hot Cross Buns. Play it, repeat it, move it up a step (F–E–D), move it up again (G–F–E), then end on a long C. That five-bar exercise covers steps 3 and 4 above in under a minute. When you have that, try steps 5 and 6 on your own: add four more bars that begin the same way but close on C instead of leaving the phrase open. That is a period — and it is your first complete melody.
If you want a teacher to listen and tell you which bars work and which need adjusting, a one-on-one lesson is the fastest way to improve. A Tissimo teacher can hear your melody live, suggest specific changes, and show you how the same fixes apply to whatever you write next. Find a music teacher on Tissimo and book a lesson.
Free worksheets for this lesson
- The major scale — the recipe W W H W W W H, applied from C.
- Motif and sequence — four examples of motif development with audio (Handout 355).
- Find the motif and the sequence — label each bar of four phrases: repeat, sequence up, sequence down, varied, or new (Exercise 54).
- Phrase and period — antecedent and consequent in Beethoven's Ode to Joy, with a "try it" (Handout 232).
- An Idea, Its Repeat, and a Push to the End — the sentence model and how it differs from the period (Handout 471).
- Choosing chords for a melody — which chord owns which scale degree, harmonic rhythm, and cadence planning (Handout 358).
Sources
- The sentence — Open Music Theory (openmusictheory.github.io)
- The period — Open Music Theory (openmusictheory.github.io)
- Harmonic syntax: the idealized phrase — Open Music Theory (openmusictheory.github.io)
- Basic Notation — Open Music Theory (openmusictheory.github.io)
- Music Theory for Musicians and Normal People — Toby W. Rush (tobyrush.com)
- Motif and sequence — Tissimo worksheets (tissimo.co)
- Phrase and period — Tissimo worksheets (tissimo.co)
Read this article online: https://tissimo.co/articles/how-to-write-a-melody-a-beginners-guide

Comments