Strudel vs Tone.js
Both run in the browser and make sound with JavaScript, and they are built for opposite purposes. Strudel is an instrument you perform with. Tone.js is a library you build with.
Side by side
| Strudel | Tone.js | |
|---|---|---|
| Purpose | Live coding performance | Application framework |
| You write | Patterns, evaluated live | Application code |
| Audio graph | Managed for you | You build it |
| Scheduling | Cycle-based patterns | Transport with precise events |
| Embedding in an app | Possible but not the point | The whole point |
| Live re-evaluation | Core feature | Not built in |
| Language | JavaScript | TypeScript / JavaScript |
| License | AGPL-3.0 | MIT |
| Platforms | Web | Web |
| First released | ~2022 | ~2014 |
| Maintained | Yes | Yes |
Where they actually differ
Performance tool versus building block
Strudel exists so you can change music while it plays, with a REPL loop and pattern functions designed for live edits. Tone.js gives you transports, synths, effects and precise scheduling to assemble into something else. Asking which is better is like asking whether a guitar beats a woodworking bench.
Tone.js gives you the audio graph, Strudel hides it
With Tone.js you wire oscillators into filters into effects into the destination, and you control every node. Strudel manages that internally so you can think in patterns. Explicit control is a burden when improvising and a requirement when building.
Different notions of time
Strudel thinks in cycles, and patterns subdivide them. Tone.js gives you a Transport, musical time notation and sample-accurate scheduling for individual events. Cycles are wonderful for improvisation; explicit scheduling is what you need for a sequencer someone else drives.
They can be combined
Strudel is a JavaScript library, so embedding it inside a larger web application is possible — a reasonable pattern is Tone.js for app-level audio infrastructure and Strudel for a live-coding panel inside it.
Which should you choose?
Choose Strudel when…
- You are live coding or improvising
- You want patterns, not an audio graph
- You want to share a performable link
- You want to sketch musical ideas quickly
Choose Tone.js when…
- You are building a web app, game or instrument
- You need explicit control over the audio graph
- You need sample-accurate event scheduling
- Other developers will maintain the code