How to Write a Melody | A Four-Bar Exercise with Three Notes

To write a short melody, start by shaping C, D, and E into one idea. Use the same idea in bars 1 and 2, change the pitch of its last note in bar 3, and return to C in bar 4.

This page uses diagrams to compare an exercise that changes only pitch with one that changes only rhythm while keeping the same notes. If you do not have a keyboard, keep the beat with your fingers and try humming the notes.

Updated

Choose the pitches and when each note sounds

A melody has a sequence of pitches, as well as a time when each note begins and a length for which it lasts. Use C, D, and E in that order. Let C last for one beat, D for one beat, and E for two beats, and you have one four-beat idea.

In 4/4 time, count four beats to each bar, with a quarter note as one beat. Keep a steady count of “1, 2, 3, 4.” Play C on 1, D on 2, and E on 3, then hold E through beat 4. The diagram labels middle C as C4, D as D4, E as E4, and G as G4. On a keyboard, C is the white key immediately to the left of each group of two black keys.

Repeat the same idea and expand it into four bars

Bars 1 and 2 use the same pitches and note lengths. Starting with an idea short enough to sing and remember after one try makes it easier to hear what changes next. A short idea repeated within a piece is called a motive or motif.

In bar 3, keep C and D but change the last note from E to G. In bar 4, descend through E, D, and C to return to the opening C. Try all four bars in sequence and listen for where the final C arrives.

Notes and beats in the four-bar exercise
BarNote orderDuration
1C4 → D4 → E41 + 1 + 2 beats
2C4 → D4 → E41 + 1 + 2 beats
3C4 → D4 → G41 + 1 + 2 beats
4E4 → D4 → C41 + 1 + 2 beats
A 4/4 melody exercise. Bars 1 and 2 use C4, D4, and E4. Bar 3 uses C4, D4, and G4. Bar 4 uses E4, D4, and C4. Each bar uses note lengths of 1, 1, and 2 beats.
These four bars were created as an exercise for this page. Bars 1 and 2 repeat the same idea, bar 3 changes the pitch of the last note, and bar 4 returns to C.

Change pitch and rhythm one at a time

In Figure A, compare bars 1 and 3. C and D each last one beat, and the last note lasts two beats in both bars. Only the final note changes, from E to G, so you can hear how much higher the ending sounds while the first part stays the same.

Figure B uses E, D, and C from bar 4. The upper version lasts 1 + 1 + 2 beats, leaving a long C at the end. The lower version lasts 2 + 1 + 1 beats, holding the opening E for longer. Try both at the same speed and compare the beat on which you reach C and how long C continues.

Figure A compares C4, D4, E4 with C4, D4, G4, both using 1, 1, and 2 beats. Figure B compares E4, D4, C4 using 1, 1, and 2 beats with the same notes using 2, 1, and 1 beats.
This comparison uses the exercise above. A changes the pitch of the last note. B keeps the note order and changes which note is held longest.

If you get stuck, return to one bar

If you cannot think of a first bar, begin with the four-beat rhythm “short, short, long” before choosing three notes. Fit notes such as C, E, and D to that rhythm, then choose one combination you can sing and remember after one try.

If the four bars sound disconnected, make bar 2 the same as bar 1 again. Change only the final pitch in bar 3, then decide how bar 4 should end. If the ending feels abrupt, try holding the final note longer and shorten an earlier note so the total still equals four beats.

If you want to add chords, first learn the same four bars as a single-note melody. Then add the accompaniment and listen to how the final note of each bar sounds against it. This makes it easier to find the places you want to change.

Listen from the start of each track on the official YouTube videos

“Stepping on Shadows” repeats a three-note marimba phrase. Listen from the start of the track and find where the short idea that stayed in your ear returns. “Seven O'Clock Slant” is a piano-led track whose melody begins right away. Listen to its opening phrase and find a part you can hum on your own.

“Breakfast Polka” uses flute, clarinet, and bassoon. Listen to the tone colours and decide which sound helps you follow the melody. We created the four-bar exercise above for this page. Each listening link opens the point where that track begins within its compilation video.

These three tracks are royalty-free BGM offered as free downloads under this site's usage guide. There are no additional fees based on the number of uses or plays. Open each track page to check the full length and download.

Once you have four bars, sing the original idea followed by the changed version. Keep one version that is easy for you to hum and remember through the ending, and use it as the starting point for your next exercise.

FAQ

Can I write a melody without an instrument or composition software?

Yes. Keep a steady count of “1, 2, 3, 4” and hum a few notes such as C, D, and E. Make one bar first, then sing the same idea again.

What should I change after repeating the same melody?

Change only the pitch of the last note, or keep the note order and change which note lasts longest. Compare the original idea with a version that changes just one thing before changing both.

Does the bar still have four beats if I change the rhythm?

In this 4/4 example, changing the note lengths from 1 + 1 + 2 beats to 2 + 1 + 1 beats still gives a total of four beats.

Checking your privacy choices…

Select a thumbnail to start listening