Guide
How to write a melody for a song
To write a melody, start with a short motif of three to six notes, give it a clear rhythm and shape, then repeat and vary it over your chords so the strong beats land on chord tones. Keep the verse lower and more conversational than the chorus, and make sure the stressed syllables of your lyrics fall on the strong notes.
Start with a motif, not a whole tune
A melody grows from a motif: a small cell of a few notes with a recognisable rhythm. Trying to write sixteen bars at once usually produces a wandering line, while a strong three- or four-note idea gives you something to repeat, answer and develop.
You do not need an instrument to find one. Loop a simple chord progression, or just tap a beat, and hum into your phone voice recorder for a few minutes without judging anything. Sing on neutral syllables such as "na" or "da" so you focus on pitch and rhythm rather than words. Afterwards, listen back and note the time of every moment that made you lean in.
Contour and range
Contour is the outline of the melody: rising, falling, an arch that climbs and comes back, or a wave. Sketch it as a line on paper if that helps. Most memorable phrases have one clear high point, and using that peak note sparingly is what makes it feel like a moment when it arrives.
Range is how far the melody spans from lowest to highest note. Many untrained singers are comfortable across about an octave to an octave and a half, so a song that needs more than that becomes hard to sing along with. Keep the verse in the lower part of the range and save the top notes for the chorus or the final hook. If you are writing for a specific singer, find their comfortable range first and choose the key to fit it.
Steps versus leaps
Moving by step, to the next note up or down the scale, sounds smooth and is easy to sing. Leaps of a third or more add energy and emotion: a jump up a fourth or a fifth sounds bold, an octave leap sounds like a declaration. A melody made only of steps can feel bland, and one made only of leaps feels like an exercise.
A reliable habit is to follow a large leap with stepwise motion in the opposite direction, which fills the gap and settles the ear. Wide or unusual intervals, such as a seventh, are expressive but harder to pitch, so give the singer a long note and a strong beat when you use one.
Rhythm, repetition and call and response
Rhythm does at least half the work. The same five pitches sung in even quarter notes and in a syncopated pattern are two different melodies. Contrast long notes with quick ones, leave rests so the phrase can breathe, and try starting just before the downbeat or just after it instead of exactly on it.
Listeners remember what repeats. A common shape for a four-bar phrase is statement, repeat, variation, answer: play the motif, play it again, change its ending or move it to a new pitch, then close with a phrase that resolves. Moving the same motif up or down the scale, called a sequence, keeps it familiar while the harmony shifts.
Call and response gives a melody a conversation. The first phrase ends on an unsettled note, like a question, and the reply ends on the home note of the key. The answer can come from the same voice, a backing vocal or an instrument filling the gap between lines.
Chord tones and passing tones
On the strong beats, notes that belong to the chord underneath, its root, third or fifth, sound stable and supported. Notes outside the chord work best on weaker beats as connectors: passing tones walk between two chord tones by step, and neighbour tones step away and come straight back.
Tension comes from breaking that pattern on purpose. A note outside the chord placed on a strong beat and resolved by step to a chord tone creates a little ache that listeners feel even if they could not name it. If a note sounds wrong, moving it by one step or onto a weaker beat usually fixes it. You can also write the melody first and choose chords to support it afterwards.
The hook, the verse and the chorus
The hook is the short phrase people take home, often carrying the title. It tends to be simple, repeated several times and placed where the song lands hardest, usually at the start or end of the chorus.
Verse and chorus melodies should feel different. Verses sit lower, use more syllables per bar and follow the rhythm of speech, because they tell the story. Choruses lift: higher notes, longer held vowels, simpler rhythm and more repetition, so the crowd can join in. A pre-chorus that climbs step by step makes the jump into the chorus feel earned.
Prosody: making the melody fit the words
Prosody is the match between how words are spoken and how they are sung. Say the line out loud and notice which syllables you stress, then put those syllables on strong beats, longer notes or higher pitches. A tune that puts the accent on the wrong syllable sounds clumsy however pretty it is.
Long, high notes are easier on open vowels such as "ah" and "oh" than on closed sounds like "ee". The direction of the line can underline the meaning as well: a phrase about falling can descend, a hopeful line can climb. When the words and the tune fight, change whichever one matters less to the song.
Testing melody ideas with AI Song Generator
Once you have lyrics and a sense of the tune, AI Song Generator can help you hear different directions. In Custom mode, paste your lyrics and describe the melody feel in the style line, for example a low spoken-style verse, a stepwise pre-chorus and a soaring chorus with long held notes. The Studio interprets that description and generates full songs with sung vocal melodies you can compare.
It does not take notes as input: there is no melody editor, and the Studio does not export MIDI. Treat each generation as a reference for phrasing, range and energy, then sing and refine your own version, or keep developing a generated idea in a DAW from its WAV export.
Prompts
Example prompts
Starting points you can paste into Create and adjust. Specific details — tempo, instruments, mood, structure — give the most control.
- Stepwise verse, lifting chorusYour lyrics
A hopeful pop song about leaving a small town, using my lyrics
Stylepop, 104 BPM, conversational low verse melody, rising pre-chorus, soaring chorus with long held notes
Naming how each section moves gives you a clear verse-to-chorus contrast to compare.
Use in the Studio - Call and response hookAuto lyrics
Upbeat soul track where the band answers each sung line
Styleretro soul, 112 BPM, short repeated vocal hook, horn answers between lines, punchy rhythm
Listen for how the gaps between phrases are filled.
Use in the Studio
Keep exploring
Related
- How to write song lyrics that sing wellHow to write song lyrics: find the idea, write the hook first, use concrete images, choose rhymes, fit syllables to the melody and edit in focused passes.
- How to make a song, from idea to releaseHow to make music from scratch: idea, structure, melody, chords, lyrics, arrangement, recording or generating, then mixing, mastering and sharing the track.
- Music theory and AI: learn faster, prompt betterHow to use AI as a music theory tutor without trusting it blindly, plus the theory that makes AI music prompts work: keys, modes, tempo, form and chords.
- Free AI melody generatorMake a short tune online for free with an open-source melody model. What you get (audio or MIDI), how to shape a melody worth keeping, and licensing caveats.
- AI SongwriterUse AI Song Generator as a songwriting partner: draft lyrics, shape the structure, demo the song in Custom mode, then revise sections until it is yours.
FAQ