Writing / 26 SEP 2026

Making an AI write one song, not ten ideas

Ask a language model for a verse, then a chorus, then a bridge, and you get three good ideas that don't belong together. Here's what fixed that in Tunepick.

by xz4 min read

Tunepick is a music toy: each round an AI writes three options — a beat, a bassline, a melody, the next section — and you pick one. The track grows one choice at a time. The first version worked in the sense that every option was fine on its own. The trouble was the song. Five picks in, it sounded like five people had each been handed a bar and told to be creative.

Real songs are repetitive in very specific ways. The same chord progression comes back again and again. The bass locks into one rhythm and only the notes move. The chorus returns. A model asked for "the next section" has no reason to do any of that — every request is a fresh chance to be interesting. So the fix wasn't a better prompt. It was taking certain decisions away from the model entirely.

Rule one: one progression

Before each section is generated, the app reads the chords that the verses and choruses already agree on — the song's home progression — and the prompt asks for those chords back. The model still decides what gets played over them: the voicing, the melody, the rhythm of the comping. Only a bridge or a breakdown is told it may leave home.

This one change did more for coherence than anything else. When the harmony stays put, a new melody sounds like a variation. When the harmony moves too, it sounds like a different song.

Rule two: one bass figure

This one taught me the most about working with models. The first bassline in a song sets its figure — the rhythm, where the notes fall in the bar. Every later section's bass should keep that rhythm and change only the pitches.

My first attempt asked for this in words: "keep the same rhythm as the previous bassline." I measured it. Across a test set, the model kept the rhythm 52% of the time. The rest of the time it filled whatever the format allowed with extra notes and called the result a variation.

So I stopped asking. Now the model is handed the figure's note slots with the scale degrees left blank, and its only job is to fill them in. Rhythm kept went to 100%. As a belt-and-braces step, whatever comes back is snapped onto the figure anyway.

Don't ask a model to keep a structure. Hand it the structure with blanks.

A useful side effect: the three options in a bass round now differ in exactly the way a player would vary a bassline — roots, fifths, an octave jump on the last beat — rather than in three unrelated grooves.

Rule three: sections come back

In a "what comes next" round, one of the three options is a section the song already has, with the same chords, bassline and tune. It prefers a chorus over a verse, never offers what just played, and gets a level louder the third time round.

This option isn't generated by the model at all. It's built in the browser from the song's own data, so it costs no tokens and fills its option instantly. And because it arrives complete, the next question the player faces is structural again ("what comes after the chorus?") rather than three more rounds of layering.

There's a refinement for the third outing of a chorus. The second time a chorus comes back, a literal copy is right — that's what makes it a chorus. By the third time, the round becomes a question instead: it's back — how? The options are the copy, a new groove under the same tune, or a new tune over the same groove. For the variations, the model is sent the section and replies with a patch over it, so the parts it was told to keep come back byte for byte.

Rule four: songs end, and intros come last

Nothing in a "what next" round would ever end a song on its own. The model is told to keep returning to verse and chorus, which is right until it isn't. So the ending is its own round, and every option in it is an ending, built from the chorus: Walk off (the beat drops away and the last chord rings), Quiet (chords and tune alone) and Hard stop (the whole band lands on one final hit).

The intro, counterintuitively, is written last. An intro is something you add once you have something to introduce, so the first section the model is ever asked for is the song's main idea — a verse or a chorus. Once the ending is in place, the song is asked how it starts: tune first, chords alone, or beat first. One small detail made this work: each section's shape is seeded from the section's id, not its position, so putting an intro in front doesn't re-roll everything behind it.

What I took from it

Every one of these rules moves a decision out of the prompt and into code. The model is still doing the creative part — which notes, which groove, which melody — but the structure a listener relies on to hear "one song" is enforced by the program, not requested in prose. When the thing you need is consistency, words are the weakest tool you have.

You can hear the result on the home page: the three tracks there are real Tunepick output, and the piano roll is drawn from the same arrangement that produced the audio.