Melody writing

  • Learn about the different types of melodies in music.
  • Find out about how Ed Sheeran, Lewis Capaldi, Dizzee Rascal and Camila Cabello use melodies in their music.
  • Write your own melody by following some simple steps.
Watch how Ben and Sarah work together to write a melody.

A melody is the main tune in any piece of music and can be sung or played by any instrument. Melodies are often catchy and repeated. Very short melodic ideas that are repeated are sometimes called riffs.

Film and TV composers write melodies that become the themes for shows or films, for example the James Bond theme or the Match of the Day theme. Some melodies are known as leitmotifs and represent characters or themes within films. All of the superheroes in The Avengers films have their own melodies.

Melodies are a sequence of notes. They use different pitches and rhythms. They usually contain a balance of repetition and variety.

A simple melody will use only notes from the key that a piece is in. A key is a set of notes that work well together.

Listen to I Don't Care by Ed Sheeran and Justin Bieber. Can you work out the structure of the melody?

Melodies are often broken up into sections called phrases. Phrases are like sentences put together to form a verse or chorus. These phrases are repeated and modified.

In the song I Don’t Care by Ed Sheeran and Justin Bieber, all the notes of the melody fit into the key.

This melody has the phrase structure AABA.

  • Let’s call the melody of the first line (“I’m at a party…”) Phrase A.

  • The second line (“Wonderin’ if I…”) uses the same melody as the first line, so is a repeat of Phrase A.

  • The third line (“Then you take my hand…”) uses a slightly different melody, so it is a different phrase – Phrase B.

  • For the fourth line (“You know I love you…”), the melody is Phrase A again.

Structure of the melody for I Don't Care by Ed Sheeran and Justin Bieber.

This is a very common phrase structure for melodies. Other common structures include AAAB, AABB or ABAB.

Listen to these melodies

Listen to the melody in Havana by Camila Cabello. The phrase structure is AAAB. In the chorus the same short melody is sung three times and the final line is slightly different. The melody repeats the catchy “oh na na” lyrics.
Listen to Lewis Capaldi's Someone You Loved. The first and second melodies are both repeated, which gives us a phrase structure of AABB. The chorus melody uses lots of repetition as well.
Listen to Dance Wiv Me by Dizzee Rascal. The melody is very short and repeated many times, so it could be considered a riff. However it still has a phrase structure of AABA. Throughout the song, the melody is heard as a bass line, in the vocals and even on an acoustic guitar.

How to write a melody

On any instrument or using your voice, try to create a melody in the key of C major. Watch the video to listen to all the notes in C major.

Watch how a C major scale is played on a piano.

C Major Scale

C is the first note, or root note in C major. It is the most important note of the scale.

C Major scale
  • Create your own Phrase A, starting and ending on a C. Make it four beats long.

  • Next create your own Phrase B, which should be similar, but slightly different. This time, start on a G and end on a C. Again, it should be four beats long.

  • Play Phrase A twice, then Phrase B, then Phrase A to finish. Your melody now has the phrase structure AABA. You could try playing or singing the phrases in a different order as you develop your melody.

Explore the score

In the film, the musicians are creating a melody together.

Download the full score and see how the melodies in The Sound Of Us sound together.

Download the lead vocal score to see if you can spot the melody from the video.

The Sound Of Us - Full score
The Sound Of Us - Lead vocal score

Listen to more

Listen to the band perform The Sound Of Us.
Listen to the lead vocal track for the live recording of The Sound Of Us.
Listen to the melodies played by the guitar part.


melodyThe main tune in any piece of music.
riffA short repeated melody.
leitmotifA melody used to represent a character or a theme, usually found in film music.
pitchHow high or low a note is.
rhythmThe pattern of sounds with different lengths in music.
keyA collection of notes that work well together.
root noteThe most important note in a chord or key.
phraseA section of a melody.

Next steps

How to write a song
Found sounds
Composing music for film