Neon Pursuit: A Chiptune Composed by Claude Fable 5 in 12 KB of JavaScript

What does it take to get two and a half minutes of hard-driving action-game music? In this case: one prompt to Claude Code and a 12 KB self-contained HTML file. Neon Pursuit is an original chiptune composed entirely by Claude Fable 5 (Anthropic’s latest model, running in Claude Code) in the ZzFXM format — a tiny JavaScript music tracker built for js13k-sized games.

Press play (loop is on by default, like proper game background music):

If the embed doesn’t suit you, open the player in its own tab: NeonPursuit.html — the full self-contained player. That one file is the whole production — synth, sequencer, song data and UI included. View source and you’ll see everything.

How it was made

ZzFXM songs aren’t audio files. They’re nested JavaScript arrays — a list of instruments, a list of patterns (note grids, like an old Amiga MOD tracker), and a sequence that says which pattern plays when. Each instrument is just a parameter list for ZzFX, a sound synthesizer that fits in a tweet. The browser renders the whole song into an audio buffer in well under a second.

I gave Claude Code the ZzFXM format documentation and a brief: fast and furious, action-game background music, full-on retro chiptune with reverb and a hard techno feel, about 150 seconds. It composed the piece the way a tracker musician would:

  • Nine instruments from scratch — a detuned square-wave lead, a saw bass hammering 16th notes, a pitch-sweeping kick, noise-burst snare and hi-hats, a high arpeggio square, a riser effect and a pad. ZzFX has no reverb, so it faked one with the synth’s delay parameter plus an echo voice panned to the opposite ear.
  • Ten patterns in A minor at 165 BPM — intro groove, a call-and-response main hook, a frantic stab section, a breakdown where the drums thin out over pads, a snare-roll build, and a climax with everything running at once.
  • A 26-slot sequence (~151 s) that loops seamlessly — the final bar is an ascending pickup run that lands exactly on the intro groove, so the loop point is inaudible.

The data is assembled from small bar-sized building blocks, which keeps the song readable. The entire kick drum track, for example, is this:

1
const K4 = [13,0,0,0, 13,0,0,0, 13,0,0,0, 13,0,0,0];  // 4-on-the-floor, one bar

And the whole song boots with two calls:

1
2
3
let buffer = zzfxM(...actionSong);  // render ~151 s of music (< 1 s)
let node = zzfxP(...buffer); // play it
node.loop = true; // game BGM mode

It also verified its own work: a Node script rendered the song offline, checked that every pattern row lined up, measured the peak amplitude for clipping, and wrote a WAV for listening — before the browser ever opened.

Why this is fun

The js13k constraint — an entire game in 13 KB — forces music to be code instead of assets, and that turns out to be a great interface for an AI: composing becomes writing structured data, with music theory as the spec. The result here costs less than a single screenshot of itself and will happily loop forever behind whatever neon-soaked chase scene you imagine.

Maybe a future Spelagon game will pursue something neon. The soundtrack is ready.