How to write a melody
Use the notes of your key, put chord tones on the strong beats, and build a short motif of three to five notes over one or two bars. Repeat it, change the ending the second time, keep it within about an octave and leave rests. Most memorable melodies are a small idea repeated with small changes, not a long line of new notes.
Step 1: choose your notes
Every note of your key fits, but some are safer than others:
- The scale: A minor is A, B, C, D, E, F and G. Every key is on our scales pages, like A minor, with a piano and MIDI.
- The pentatonic: leave out the second and sixth notes (B and F in A minor) and you have A, C, D, E and G. It is hard to play a wrong note.
- Chord tones: the notes of the chord playing at that moment. On the strong beats they always fit.
Step 2: write the rhythm first
A melody is remembered by its rhythm as much as by its notes. Tap a pattern on one note before you choose pitches:
- Start off the beat sometimes: a melody that begins on the "and" of beat 1 pulls forward.
- Mix long and short notes. Two short notes into a long one is a classic shape.
- Leave rests. A melody that never stops has nowhere to breathe, and a one- or two-bar phrase with a gap is easier to remember than a busy line.
- Match the genre: sixteenth-note plucks in trance, sparse stabs in tech house, long notes in melodic techno, laid-back phrases in lo-fi.
Step 3: put chord tones on the strong beats
Land on a chord tone on beat 1 of each bar, and on beat 3 if the melody is busy, and use other scale notes in between to connect them. Over Am, F, C, G in A minor:
| Chord | Chord tones | Passing notes |
|---|---|---|
| Am | A, C, E | B, D, G |
| F | F, A, C | G, D, E |
| C | C, E, G | D, F, A |
| G | G, B, D | A, C, E |
A long note on a chord tone sounds settled. A long note on a passing note sounds tense, which is useful at the end of a question.
Step 4: build a motif and answer it
- Write a motif: three to five notes over one or two bars.
- Repeat it exactly. Repetition is what makes a melody stick.
- Then answer it: the same rhythm with a different ending. A question ends away from home, on the fifth (E in A minor); the answer ends on the root (A).
- A common 4-bar shape: the motif, the motif again, the motif with a new ending, then a longer answer.
- Move the motif: start it again on a different chord tone, keeping the rhythm. This is called a sequence.
Step 5: shape the contour and range
- Move mostly in steps between neighbouring scale notes, with a few leaps for interest.
- After a big leap, move back by step in the other direction. It sounds natural to the ear.
- Keep a hook within about an octave; a lead that builds can stretch further.
- Save the highest note for one moment, often in bar 3 of 4 or at the start of the drop.
Step 6: pick the register and the sound
- Put the melody above the chords so they do not blur: if the chords sit around middle C, the melody goes an octave higher.
- Doubling the melody an octave up or down makes it bigger without writing a new part.
- Sound by genre: plucks and supersaws in trance, a piano or bell in trap, an electric piano or guitar in lo-fi, a vocal chop in house and garage.
- In a song with vocals, the lead synth plays in the gaps, not over the singer.
Step 7: get ideas out quickly
- Hum it: record yourself humming on your phone and turn it into MIDI with vocal to MIDI.
- Sketch with sounds that already fit: the studio layers drums, a bass, a melody and guitar in key, and New gives you another combination.
- Start from chords: take a progression from our free MIDI chord progressions and write over it in your DAW. More on chords in how to make a chord progression.
237 free MIDI chord progressions
Every major and minor key and 17 genres as MIDI files, chords and bass on separate tracks. Our free sound pack comes with it. Royalty-free.
Questions
How do I start writing a melody?
Write a rhythm first, then put chord tones on the strong beats. Build a short motif and repeat it with a changed ending.
What notes sound good in a melody?
Notes from the scale of your key. The pentatonic scale is the safest, and chord tones on the strong beats always fit.
How long should a melody be?
A motif is one or two bars; a full phrase is usually four or eight bars, built by repeating and answering the motif.
How do I make a melody catchy?
Repeat it, give it a clear rhythm, keep it within about an octave and save one high note for the biggest moment.
Can I write a melody without knowing music theory?
Yes. Use the pentatonic scale, or hum the melody and convert it to MIDI, then fix the notes that clash with the chords.
More guides
- Serum presets folder: where Serum 1 keeps its sounds
- How to import your own wavetables into Serum
- BPM by genre: a tempo chart for dance music
- LUFS for Spotify, Apple Music and YouTube
- How to export stems for mixing
- How to tune your kick to the key of your track
- How to make tech house drums
- How to add samples to FL Studio
- How to add samples to Ableton Live
- Serum 2 not showing up in your DAW: how to fix it
- How to sidechain: Ableton, FL Studio and Logic
- Camelot wheel: every key and what mixes with it
- Note frequency chart: every note in Hz
- Circle of fifths: the chart and how to use it
- EQ frequency chart: where every sound sits
- How to import a MIDI file into your DAW
- Royalty-free samples: what it actually means
- How to mix kick and bass
- House track structure: how to arrange a club track
- How to make a beat, step by step
- Can you use Serum 1 presets in Serum 2?
- How to make a reese bass in Serum 2
- How to make a supersaw in Serum 2
- How to make an acid (303) bass in Serum 2
- How to make an 808 in Serum 2
- How to make a pluck in Serum 2
- How to make a pad in Serum 2
- How to make a wobble bass in Serum 2
- How to make a donk bass in Serum 2
- How to save a preset in Serum 2
- How to make a rave stab in Serum 2
- How to make a future house bass in Serum 2
- How to make a UK garage bass in Serum 2
- How to make a French house filter sound in Serum 2
- How to make a trance pluck in Serum 2
- How to make house music, step by step
- How to make tech house, step by step
- How to make deep house, step by step
- How to make techno, step by step
- How to make melodic techno, step by step
- How to make trance music, step by step
- How to make drum and bass, step by step
- How to make a trap beat, step by step
- How to make lo-fi hip hop, step by step
- How to make UK garage, step by step
- How to make afro house, step by step
- How to make reggaeton, step by step
- How to make a chord progression
- How to write a bassline
- Gain staging: how to set levels before you mix
- How to balance a mix
- How to use EQ
- Compressor settings explained
- Drum bus compression for house and techno
- How to use reverb in a mix
- How to use delay in a mix
- How to use a limiter on your master
- How to master your own track
- Serum 2 presets folder
