Soundroo

Guides

How to Write a Melody: Build and Vary a Short Musical Phrase

Published November 12, 2026

To start a melody, choose a small set of pitches and a rhythm you can repeat. Write one short idea, answer or vary it, then listen to how the phrases connect. You can work at an instrument, hum a line or describe the exact notes to an agent.

Our exercise uses C, D, E and G in C major. The illustration shows an opening C–D–E–G and an answer G–E–D–C. They use the same pitch classes in different directions. This gives you a small musical idea to develop before adding more notes or instruments.

An ascending opening C D E G answered by a descending phrase G E D C.

This example changes direction while keeping the same four pitch classes.

Choose a manageable starting frame

For this exercise, use 4/4 and a comfortable quarter-note tempo such as 100 BPM. Keep one instrument and one register so you can focus on the line. C4 through G4 provides enough range for the example; other melodies can use wider ranges and different pitch collections.

A melody combines pitch, rhythm, contour and phrasing. Ableton's melody lesson offers a simple environment for exploring single-note patterns. The point of a small starting frame is to make each choice easy to hear.

Write one bar you can recognize

Play C4, D4, E4 and G4 as four quarter notes. Count “1, 2, 3, 4.” The line rises by steps and then a leap. Repeat it without changing anything, then notice which part you can remember or sing back.

Next, change only the rhythm: hold C longer and shorten another note while keeping the total at four beats. Or keep the rhythm and replace one pitch. Compare each variation with the original rather than changing several features at once. Note values and rests help you keep the bar length consistent.

Make an answering phrase

Play G4, E4, D4 and C4 as four quarter notes in the next bar. That answer descends to C while preserving the opening's pitch collection. Returning to a note emphasized as tonic can support a phrase ending, with the surrounding music helping establish the effect.

Question-and-answer language is a useful writing prompt. Keep the rhythm similar in both phrases, then change the final notes of the answer. Listen for a connection between the phrases and a stronger sense of arrival at the end.

Turn the idea into four bars

Try this original plan:

Bar Notes and durations
1 C4 D4 E4 G4, one quarter note each
2 G4 E4 D4 C4, one quarter note each
3 Repeat bar 1
4 G4 quarter, E4 quarter, C4 half note

Each bar contains four quarter-note beats. In bar 4, 1 + 1 + 2 = 4; the held final C changes the ending while retaining part of the answer. You can repeat the four-bar idea to make eight bars, or develop a new phrase after it.

Listen with and without harmony

First hear the line alone. Then add a simple C-major chord underneath and notice how the notes relate to it. C, E and G are chord tones; D has another role that depends on its timing and context. Melody versus harmony explores that relationship.

A rest, an accent, a register change or a different chord can reshape a phrase. Choose the feature you want to test, then listen to the whole passage again. A pattern can become a hook or part of a larger song structure, but repetition alone does not guarantee memorability.

Build and revise the example in Soundroo

Use the Soundroo prompt or connect your chat app. Ask for the four-bar piano melody in the table, repeated twice, in 4/4 at 100 BPM. Preview it alone and with quiet bass and chords. Then ask for one deliberate change, such as a longer rest before the final C or a different answering contour. Keep the other choices fixed so you can judge what the revision contributes.

Not playing Choose something to play