What is a melody? A melody is a succession of single notes, played or sung one after another, that your ear groups together as one recognisable line. It’s the part of a song you hum in the shower or whistle after one listen. Where harmony stacks notes into chords played at the same time, a melody moves horizontally through time, combining pitch (how high or low each note is) with rhythm (how long each note lasts) to create a shape you can remember and sing back.
If you’ve ever had a tune stuck in your head, you already understand melody intuitively. This guide unpacks what actually makes those notes work — the ingredients, the vocabulary, and a few real examples you can play yourself — so you can start writing melodies on purpose instead of hoping they turn up by luck.
What is a melody made of? Pitch and rhythm working together
Strip a melody down and you’re left with two raw materials: pitch and rhythm. Neither one is a melody on its own. A single held pitch is just a note. A pattern of durations with no pitches is a drum beat. A melody is what happens when you give a rhythm a set of pitches to travel through.
Take one of the most familiar tunes in the world, “Twinkle, Twinkle, Little Star.” In the key of C major, the opening notes are C–C–G–G–A–A–G. Those first two Cs sit on “Twin-kle,” the two Gs leap up on “lit-tle,” the two As nudge one step higher on “star,” and the melody settles back to G. That’s it — six pitches and a simple rhythm, yet it’s instantly recognisable across the planet. The pitches come from the C major scale (C, D, E, F, G, A, B), which is why the tune sounds settled and consonant rather than tense.
This is the first practical lesson: most melodies draw their notes from a single scale or key. The scale is the palette; the melody is the picture you paint with it. If you want to hear how a palette feels under your fingers, our virtual piano lets you play these notes straight in the browser, and the scale and chord finder shows you exactly which notes belong to any key.
Contour: the shape a melody draws in the air
Contour is the up-and-down profile of a melody — the invisible line you’d trace if you drew its rises and falls. It’s one of the most important things your ear latches onto, often more than the exact notes. That’s why you can recognise a tune someone hums badly out of tune: the shape survives even when the pitches don’t.
Melodic contour comes in a few basic flavours. An ascending line climbs and tends to build energy or tension — think of the rising “Some-where over the rain-bow” leap. A descending line falls and often feels like release or resolution. An arch shape rises to a peak and comes back down, which is extremely common in singable choruses. A wave undulates up and down without one clear peak.
Good melodies usually have one highest note — a climax — that they save for an emotional moment, often near the end of a phrase or the top of a chorus. If every note is a high note, nothing feels special. Deciding where your melody’s peak lands is one of the most powerful choices you can make.
Steps and leaps: how melodies move between notes
The distance between two consecutive notes is called an interval, and melodies are built from a mix of small and large intervals. Movement by a single scale step — C to D, or D to E — is called conjunct or stepwise motion. Movement by a larger jump — C up to G, a distance of a fifth — is called disjunct or a leap.
Stepwise motion sounds smooth, natural, and easy to sing, which is why so much of any strong melody is stepwise. Leaps add drama and reach, but they cost effort — both for a singer’s voice and for a listener’s ear. A reliable songwriting habit is to follow a big leap with stepwise motion in the opposite direction, letting the line settle. Listen to the octave leap that opens “Somewhere Over the Rainbow” on the word “Some-where”: the melody makes one dramatic jump, then walks calmly back down. That balance of leap-and-recover is what makes it feel both surprising and singable.
Phrases, motifs, and repetition: why melodies feel whole
A melody isn’t one unbroken stream of notes; it breathes. A phrase is a self-contained musical sentence, usually a few bars long, that ends with a natural sense of pause — often where a singer would take a breath. Phrases group into larger structures the same way sentences build into paragraphs.
Inside those phrases, the smallest memorable unit is the motif (or “motive”) — a short pitch-and-rhythm idea, sometimes just three or four notes, that recurs and ties a piece together. The four-note opening of Beethoven’s Fifth Symphony (three short notes and a long one, dropping in pitch) is the most famous motif in Western music, and the entire first movement is spun out of it.
Repetition is the glue. Listeners need to hear an idea more than once to remember it, so melodies repeat motifs, sometimes exactly and sometimes with small variations — starting on a different pitch, stretching a rhythm, or turning the shape upside down. The trick is balancing repetition (which makes a melody memorable) against variation (which keeps it from getting boring). Too much repetition is a nursery rhyme; too little and there’s nothing to hold onto.
How melody relates to harmony and rhythm
A melody rarely lives alone. Underneath it, harmony — the chords — provides a supporting context that colours how each melodic note is heard. The same melody note can sound restful over one chord and tense over another. When a melody note belongs to the chord beneath it (a chord tone), it sounds stable; when it sits outside the chord (a non-chord tone, like a passing note between two chord tones), it creates a gentle tension that wants to resolve.
This is why melody and harmony are usually written hand in hand. A common approach is to build a chord progression first — say the hugely popular I–V–vi–IV, which in C major is C–G–Am–F — and then write a melody whose important notes land on chord tones of each chord. To see how chords relate across a key, the circle of fifths is a genuinely useful map. And because melody is half rhythm, where your notes fall against the beat matters just as much as which pitches you choose.
Writing your own melody: a simple starting method
You don’t need to wait for inspiration. Here’s a dependable way in. Pick a key and get its scale in front of you — C major (all white keys) is the friendliest to start. Choose a comfortable, moderate rhythm and hum a short phrase of four or five notes, mostly moving by step, with one small leap for interest. Sing it back and tweak until it feels natural in your voice.
Then treat that phrase as your motif and repeat it with a change: start it a step higher, or keep the rhythm but end on a different note so it points toward resolution. Give your line one clear high point and save it for the end. Finally, check it against a chord or two so the strong beats land on chord tones. Keep what sings; bin what doesn’t.
If you want to hear ideas fast and audition melodic directions before committing, tools like Solmi can generate quick musical sketches to react to — handy as a springboard when you’re stuck, though the melodies worth keeping are usually the ones you shape yourself. For more of the underlying theory, the Theory & Songwriting hub collects our full set of plain-English guides.
Frequently asked questions
What is the difference between a melody and a harmony?
A melody is a single line of notes played or sung one at a time — the tune you’d hum. Harmony is what happens when notes sound together, usually as chords, to support that melody. Put simply, melody is horizontal (notes across time) and harmony is vertical (notes stacked at the same moment). Most songs pair a melody on top with a harmony underneath, and the two are written to complement each other.
Can a melody exist without any chords behind it?
Yes. A melody sung completely unaccompanied — a folk singer with no instrument, or a whistled tune — is still a full melody, because pitch and rhythm are all you need. Gregorian chant and countless traditional songs are purely melodic. Chords add colour, context, and emotional shading, but they aren’t required for a line of notes to count as a melody.
Why do some melodies get stuck in your head?
A “sticky” melody — sometimes called an earworm — usually combines a clear, singable contour with a memorable rhythm and just the right amount of repetition. Melodies that move mostly by step, stay within a comfortable singing range, and repeat a short motif are easiest for your brain to store and replay. A small unexpected leap or an unusual note can also make a tune lodge itself in your memory rather than passing through.



