Claude Code Music
https://async2026.daz.is
Mi-03 Bassline
C++ Audio Plugin, years of DSP research, 3 years of building, released 2024
One prompt
make a cool looking music page using web audio that uses my mi03 bassline synth as inspiration.
I will eventually think about compiling that C++ to wasm but for now just use web audio.
Needs to have a step sequencer bass synth with filter, resonance, mod, and attack controls (inspired but simplified 303) with a simple step sequencer for acid bass line pattern. and then a 909 sounding simple drum machine pattern sequencer.
all on one standalone html page please
It went looking
- Project folder: empty
find ~/dev -iname '*mi03*'- Read the product page:
mi_web/templates/mi03.html - Looked at a screenshot and read the manual
It never found or read any C++ source. The look and the sequencer design came from the product page, one screenshot and the manual.
One prompt
I made this thing a long time ago and it's really out of date: https://github.com/tone-lab/tone-lab It's on an old version of angular. Can you make it a standalone file like the other synth in this repo? Use a dynamic workflow to research plan and implement efficiently.
It works!
But let's give it a better design...
But can it drum and bass?
How did you do that?
How it makes a patch
- Settle the genre, tempo and modules to feature
- Look up each module's params and ports. No guessing.
- Write the patch as JSON
- Check it loads clean, and that every part reaches the mixer
- Render it, and level each channel against similar starters
That's the /tone-lab-patch skill.
Claude can't hear
But it can see FFT plots, and analyse audio files with tools
Claude can't hear
But it can see FFT plots, and analyse audio files with tools
More features
- More modulesTuring Machine, Euclidean, Resonator, Reverb, Trigger Grid
- More demo patches
- Quantise frequencies
- Arrangement tools
- Seeking
- Undo/redo
Audio glitches
The more features I added, the more it glitched
So rearchitect around a Web Audio worklet
Prototyped twice
- JavaScript
- Rust, compiled to wasm
Both sound good
A parity tool compared their output: they matched within -144 dB
Rust is faster
| Rust against JS | |
|---|---|
| Chrome | 1.4 to 1.9× |
| Firefox | 3.2 to 3.9× |
| WebKit | 1.5 to 2× |
In Firefox, the stress patch fell from 11.8% to 3.0% of a CPU core
Claude picks JS
I want Rust
Claude's reasons for JS
- 294 KB of wasm against 53 KB of JS
- A panic stops the whole engine
- Glue code between JS and Rust
- Harder to debug inside the worklet
- Seeking is no faster in Chrome
Easy to refute
- 294 KB of wasm against 53 KB of JSSmall for an audio app, and 111 KB gzipped
- A panic stops the whole engineGood: a failure you can hear gets fixed
- Glue code between JS and RustWritten once, and the messages are stable
- Harder to debug inside the workletSo test the engine outside it, with cargo test
- Seeking is no faster in ChromeNo slower either, and over twice as fast in Firefox
More spikes
- Design options
- How to deal with cable soup
- A Rust backend: save, load, offline render
One prompt
use a dynamic workflow to progress the work described in task 2 of @docs/todo.md launch multiple dynamic workflows in series to complete the work. commit after each batch of work to keep a log but make as much progress as possible without getting stuck in endless testing and verification. we can do more intense testing at the end, for now progress using multiple workflows as much as possible. toward getting a working v2 rust Tone Lab that exceeds where we got to with v1 (but backward compatibility is not required).
Workflows in progress
Final stats
| Time | Workflows | Agents | Tokens written | |
|---|---|---|---|---|
| Session 1 | 7h 08m | 4 | 48 | 3.7M |
| Session 2 | 4h 45m | 1 | 25 | 1.8M |
| Total | 11h 53m | 5 | 73 | 5.5M |