How to Write a Melody


Would you like to learn how to write a melody?

Learn step by step how to write your first melody in this music theory lesson about music composing for beginners.

How to Write a Melody

A melody can be short or long. Simple, plain, weird, sweet...anything at all. But it is hard to start composing a melody when anything is possible...

This is an exercise in how to write a melody step by step to get over any writing blocks. (Just keep in mind that anything can be adjusted as you wish- it’s your melody after all!)

How to write a melody


Pick a scale. It could be any scale or mode, but for this exercise I will ask you to pick either a major or a minor scale. This is because it is easy to begin with (and to find chords that match later).


Draw a simple graphic outline of how you’d like your melody to move in pitches. Up or down, big jumps or smooth.

Draw a picture, no notes yet. As you imagine the visual outline of the melody, also imagine the sound, maybe rhythm, and speed etc. So your graphic melody idea might look something like this:

Melodic outline

Keep it simple. Nothing fancy. This is only to have as a basic idea of the shape of the melody and to help to start your creative juices flowing!


Decide how many measures you would like the melody to be. It's a good idea to start with 4 or 8 measures. It gives a good balance, and is easy to work with when learning how to write a melody.


Divide your graphic in the amount of measures you decided. 4 or 8 parts, or «measures» where it seems to make sense (visually).


Write your scale and its key signature. This is the basic material for your melody. Like this example in C major:

Writing a scale

Important and useful "hook" notes are the 1st, 4th, 5th and 7th (leads "home" to the 8th/1st).


Prepare a staff with a G-clef and key signature. Do not write time signature, we don’t know what rhythm will fit your melody yet! Draw bar lines for the number of measures you decided on.


To set the mood of the piece to reflect the scale you chose, end your melody on the first note of the scale. In the example this is C. So in the last measure, as the last note I write the note C.


Now look at your graphic diagram. For each measure, pick notes from the scale at the height you wanted, to shape the melodic outline.

Use only indications of notes, or whole notes. (The note values we’ll decide later.) You are free to change your mind whenever you want. 

Melody draft


Does the outline look good visually? Are there any larger interval jumps?

Most singers and instrumentalists do not enjoy huge jumps in the music.

To make it smoother, make sure a jump of a 7th goes to the next note up, the octave, that any intervals larger than a 5th are not used too often, and avoid jumps larger than an octave.


First «taste» test. Play the melody on your instrument. Get a feel for which notes want to go faster or slower, and if they like to be grouped together somewhere. Make any changes you like.


Now start jotting in the rhythm. Make faster notes 8th or 16th notes; longer notes quarter, half or whole. Keep it simple.

Feel what notes you want more emphasized, this will give you an idea of what meter the piece wants to be in! Make any changes or adjustments.


What do you think the meter is? Do you feel the melody in 2, 3, 4 beats per measure or something else?

Decide the time signature you want, and adjust the note values for all measures. Play through the melody and make any corrections you like.

Repeated rhythm patterns are nice. Try that!

All done?

Try not to be a perfectionist. This is your first try learning how to write a melody. The tune might even surprise you and get a «life» of its own!

Composing a melody

OK. Done!

Time to move on to how to add a chord sequence that fits with the melody>>>

You might like these