Playalong: a band that answers you
Your computer keyboard is a piano. Play a short phrase, any tempo, any key, and then pause. The band works out what you did and plays a phrase back at you that completes yours, then keeps the song going.
Nothing here is a recording and nothing is a neural net. The answer is computed live from what it just heard, using functional harmony, voice leading, and a handful of tricks that make generated music feel deliberate instead of random.
What happens when you pause
The moment you stop playing, the machine runs a short listening pass over your note timings:
- Tempo comes from the median gap between your onsets. That interval is treated as one eighth note, which fixes a pulse and snaps your notes onto a grid.
- Key comes from a pitch-class histogram of what you played, correlated against the Krumhansl and Kessler major-key profile. The best-fitting rotation wins, and it reports its confidence.
- Genre comes from feel: how much your eighths swing, how many notes land off the beat, how chromatic and how dense the line is, how far it leaps. A shuffled line with flat thirds and sevenths reads as blues, a swung or chromatic line as jazz, offbeat stabs as reggae, and so on across eighteen styles.
Then it harmonizes your motif with a weighted walk over functional-harmony transitions (tonic toward subdominant toward dominant toward tonic), with a cadence forced into the last two bars, and answers you: an echo of your own phrase, tiled across the form and lightly mutated, walking down into a resolution on the tonic. The engine log narrates every one of these decisions as it makes them.
The part that makes it feel alive
Once the band is playing, you can play right over the top of it. It lays out the melody, keeps the changes going underneath you, and quantizes your new phrase against the live bar grid instead of guessing a fresh tempo. Leave a two-beat breath and the answer comes back in on the very next beat, harmonized against the chords that are actually coming up.
A few load-bearing ideas do most of the work:
- Repetition with variation. A verbatim echo is boring and an all-new answer is word salad. The answer quotes your opening and then diverges, and the mutation slider is exactly that dial.
- Voice leading. Chord voicings are chosen to minimize total semitone movement from the previous chord. This one rule is most of why the piano sounds like a player and not a MIDI file.
- Tension and release. Questions end hanging on the dominant, answers resolve home.
There are eighteen styles in the book, each with its own comping pattern, bass idiom and drum groove, per-track pedal boards for bending the sound, a Develop button that changes the structure (a bridge, a reharmonization, a modulation toward wherever your last phrase was leaning), and a MIDI export that writes the last two passes of the form to a file by hand, no library. All of it is Web Audio with a synthesized piano and a generated reverb, so there are no samples to download.
From a jam to a song
The newest layer is an arranger. Turn on Song mode and your first phrase is pinned as the hook, then a form plays out over it: an intro, verses, a lift into the chorus, choruses that restate the hook, a breakdown, and back around. Each section carries its own energy, so the same changes arrive as a comped pad in a low verse and a doubled, crash-marked hook in the chorus. Drum fills announce the sections that are about to rise, and the lift lays the melody out over a dominant pedal to hand the solo spot back to you. What makes it read as a song rather than a longer jam is that recurrence and a rising and falling energy arc do the work, not more variation.
The brain playing alone
Before the talkback piece there was a lab: the same generative rhythm section improvising by itself with no input, so the harmony, voicing and comping engines could be tuned in isolation. It still runs.