A melody is a sequence of notes played one after another that the listener hears as a single, coherent line. It's the main dish of a song - the part you hum, the part you remember, the part that gets stuck in your head.
What separates a random string of notes from a melody comes down to three things: pitch sequence, rhythm, and singability.
Pitch sequence + rhythm
A melody is not just a list of pitches. The same notes played in different rhythms become completely different melodies. And the same rhythm with different pitches is also a different melody. Both elements are equally important.
Two ingredients of melody
Pitch sequence
Which notes, in what order, how far apart. The shape of the melody - up, down, arching, stepping, leaping.
Rhythm
When each note happens and how long it lasts. The timing of the melody - long notes, short notes, syncopated or on the beat.
Singability
The best melodies are ones you can sing, even if you're not a singer. This doesn't mean they're simple - it means they have qualities that make them memorable and followable.
Limited range
Most melodies fit within an octave or so. Too wide and it becomes hard to sing or follow.
Mostly stepwise
Good melodies move by small intervals (steps) most of the time, with occasional leaps for drama.
Repetition with variation
Ideas are introduced, repeated, then slightly changed. This creates familiarity without boredom.
Clear phrasing
Melodies breathe. They have natural pauses that divide them into phrases, like sentences in speech.
Rhythmic anchoring
Some notes land on strong beats, giving the melody a sense of pulse and connection to the groove.
Melodic range
The range of a melody is the distance between its lowest and highest note. Most pop melodies stay within about an octave (12 semitones). Some stretch to an octave and a half. Very few go beyond that.
Typical melodic ranges
Melody vs other musical lines
Not every sequence of notes is a melody. Music has several types of horizontal lines, each with a different role:
The main tune. The foreground voice that the listener follows.
The lowest voice. Supports harmony and provides rhythmic foundation.
A secondary melody that complements the main one without competing.
A short, repeating melodic fragment. More pattern than tune.
Sustained chords providing harmonic backdrop. Not a "line" at all.
Melody in production
In a DAW, melodies are typically the top notes in the piano roll - single notes played one at a time (monophonic). The melody track is usually the lead synth, vocal, or instrument that sits highest in the mix.
When writing melodies, start by singing or humming. If you can remember it after hearing it once, it's probably good. If you can't hum it back, it might be too complex or lack a clear shape.
Try it
Tap the piano to explore melody. Try playing notes close together (steps) for a smooth feel, or skip keys (leaps) for drama:
C major scale - create your own melody by tapping keys
Key takeaway
A melody is a pitch sequence plus rhythm that creates a memorable, singable line. Good melodies have limited range, mostly stepwise motion, repetition with variation, clear phrasing, and rhythmic anchoring.
Next: how the shape of a melody - its contour - creates emotional impact.
Create melodies with theory built in
Starts generates melodies that follow the principles covered here - contour, chord tones, and rhythmic variation.