Tone.js vs Elementary Audio
Two very different ideas about writing audio in JavaScript. Tone.js gives you musical objects and a transport; Elementary gives you a functional signal graph that rerenders like a UI framework.
Side by side
| Tone.js | Elementary Audio | |
|---|---|---|
| Model | Musical objects + transport | Functional signal graph |
| Mental model | Instruments, effects, scheduling | Pure functions, rerendered on change |
| DSP level | Higher — built on Web Audio nodes | Lower — sample-level DSP |
| Targets | Browser | Browser and native |
| Community | Large | Smaller |
| Musical scheduling | Built in | You build it |
| Language | TypeScript / JavaScript | JavaScript / C++ |
| License | MIT | MIT |
| Platforms | Web | Web macOS Windows Linux |
| First released | ~2014 | ~2021 |
| Maintained | Yes | Yes |
Where they actually differ
Declarative rendering is Elementary’s core idea
You describe the signal graph as a function of state, and Elementary reconciles the change — the same idea React applies to the DOM. It makes complex, dynamic audio graphs far easier to reason about than manually connecting and disconnecting nodes.
Tone.js knows about music
Transport, musical time notation, quantisation, instruments and effects come ready-made. Elementary is deliberately lower-level: it gives you DSP primitives, and musical structure is yours to build.
Elementary goes beyond the browser
It can target native as well as web, which matters if the same DSP needs to run in a plugin or an app. Tone.js is Web Audio and stays there.
Ecosystem weight favours Tone.js
Far more tutorials, examples, StackOverflow answers and existing projects. For a team or a deadline, that is worth a great deal.
Which should you choose?
Choose Tone.js when…
- You are building a musical app in the browser
- You want a transport and musical scheduling
- You want the biggest community and most examples
- You want to move quickly
Choose Elementary Audio when…
- You want declarative, functional DSP
- You need sample-level control
- You are targeting native as well as web
- Your audio graph changes dynamically and often