LLMs as Music Synthesizers: Can Claude Compose?
— Engineering, Fun, AI, After hours project — 2 min read
The Experiment
I threw a curve ball at Claude: generate music using Strudel, a live-coding environment built on SuperCollider and TidalCycles syntax. No training data. No examples. Just prompts.
Result? Claude not only grasped an unfamiliar DSL (Tidal's pattern language) but produced coherent, polyrhythmic compositions with proper signal routing, effects chains, and synthesis parameters. It nailed it on semantics while handling the functional paradigm elegantly.
The Technical Bits
What's fascinating here is the reasoning depth:
- Pattern Recognition: Claude internalized the
$:operator, sequencing syntax, and note notation without explicit instruction - Signal Flow: Proper chaining of
.lpf(),.attack(),.decay()for synthesis envelopes—Claude understands that these are composable, stateful operations - Harmonic Awareness: Generated chords and arpeggios that actually resolve within their key centers (A minor, C minor, E minor)
- Tempo & Structure: Set CPM (cuts per minute), synchronized drums and bass to a shared beat grid, managed polyrhythmic layers
Think of it as prompt-engineering a DSL compiler that speaks music theory. Claude's transformer architecture is doing probabilistic token prediction over a domain it's never explicitly seen during pretraining, guided entirely by semantic understanding of music composition.
The Tracks
Trance (140 BPM) — Apollo 440 vibes
Drum'n'Bass (170 BPM) — Futuristiche reimagining of Beethoven
Lo-Fi x Classical (85 BPM) — Study vibes meets Moonlight Sonata
** Bitter sweet symphony**
Why This Matters
LLMs aren't just pattern-matching text—they're reasoning through functional specifications and outputting valid, structured code. The fact that Claude can compose music with musical coherence using an esoteric DSL suggests that semantic understanding of domains can emerge from scale and training, even without explicit instruction.
For us as engineers: this is a signal that prompt engineering at the DSL/API level is a viable interface. You could use LLMs as code generators for domain-specific languages, music, circuit design, or anything with formal syntax and semantic rules.