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.
EDM Serum 2 Presets71 Serum 2 presets, including 9 leads and 7 plucks for melodies, from French Touch to Trance Classic. Royalty-free.For Serum 2. Own Serum? Serum 2 is a free update.

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:

ChordChord tonesPassing notes
AmA, C, EB, D, G
FF, A, CG, D, E
CC, E, GD, F, A
GG, B, DA, 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

Vocal to MIDI converter →Hum or sing a melody and get MIDI, in your browser. Nothing is uploaded.Studio →Drums, Serum 2 basses and melodies and guitar that play together in key; share the track or take the drums as MIDI.Every scale on a piano →Major, minor, harmonic minor, Dorian, Phrygian, Lydian and Mixolydian in all 12 keys, with MIDI.How to make a chord progression →The chords to write your melody over.

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.

Your download now, then one short email with an offer on the full packs. Unsubscribe any time.

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