Motif Forge
I built Motif Forge to solve a problem I hit while making Wavefunction Collapse: Suno is basically a texture engine masquerading as a songwriting engine. For consistency I need to feed it music intentionally, so it has something to texturize; otherwise it makes things that sound pretty good and VERY polished, but generic.
So how do I improve that base? I need riffs, hooks, and leitmotifs so musical ideas and their words and voice can span tracks and stay coherent. Problem is, my musical skills are rusty enough that every time I sit down to noodle, I spend the rest of the day figuring out why Ableton won’t play nice with my MIDI controller.
So I spent two days building the first version of Motif Forge, and it’s been growing since. It’s a local-first web app (live at motif-forge.joemattie.com) that does for hooks what Claude does for verses: something I can point in a direction and iterate on until I have scaffolding to build a song on.
The loop: generate candidates in batches, triage them by ear in minutes, mutate the survivors, export the winners as MIDI or WAV, and feed those to Suno as seed audio.

Four ways to generate
It generates motifs four ways, all fun to explore:
- A genetic algorithm with a musical fitness function. The default engine breeds candidates from constrained random walks (in-key scale-degree motion pulled toward a contour template, with leap recovery and rhythm archetypes), then evolves the population by tournament selection against a multi-feature fitness borrowed from the M6(GPT)3 paper: stepwise motion, strong-beat coverage, repetition, tonal anchoring. Rate some keepers and it crosses them into the gene pool, gradually learning your taste. Fully offline, seeded, reproducible.
- A rhythm-first GA. A port of ga-riffs: binary rhythm genomes (one bit per 16th step) scored on groove qualities (density, accent alignment, syncopation appetite), then pitched in-key from a root-and-fifth-heavy palette. Good for riffs that groove before they sing.
- An on-device neural model. SkyTNT’s midi-model transformer, int8-quantized, running entirely in the browser on WebGPU. A one-time model download, then offline forever. A share of each batch continues one of your keepers, which is the neural analog of the genetic engine’s breeding.
- Claude as composer. The only engine that honors a free-text brief (“mournful, rising, leave room for a counterline”) and writes multi-part textures with its own instrumentation choices.
Playing my own material in
There’s also a Noodle panel for playing my own material in: MIDI, musical typing, or a mic with on-device transcription (pitch tracking for humming and singing, Spotify’s Basic Pitch for instruments, and an onset classifier that turns beatboxing into a drum pattern).
Everything lands in the same keyboard-driven triage queue, and survivors go to a mutation bay where takes branch into trees: deterministic transforms (inversion, retrograde, mode swap, augmentation), targeted Claude edits on a single part with everything else locked, and more seeded evolution.

The library ties motifs to story concepts, so a leitmotif can be transformed per track and stay traceable across the album. Every mutation records its parent, so the store is a lineage graph of every musical idea.
What it doesn’t solve
Motif Forge gives me intentional musical raw material. It does not fix the production tool on the other side. Suno is still difficult to organize, difficult to automate, and terrible at changing one small part without disturbing the version I liked.
As of July 9, 2026, my next move is still a plan, not a feature: I bought a second 24 GB RTX 3090 and intend to assemble a local Suno-like workflow from open-source models. Local generation would give me an API, durable project structure, and control over the tedious iteration loop. I have not built or validated any of that yet. Motif Forge remains the hook and leitmotif tool, not a local song generator.
Links
- Motif Forge on GitHub, live at motif-forge.joemattie.com
- The bitwize music skill for Claude Code
- The M6(GPT)3 paper behind the musical fitness function
- The album it was built for: Wavefunction Collapse