The Living Thing / Notebooks :

Javascript audio

every program will expand until the point that it can generate cheezy techno

I want to make some stuff in my browser make sound. My main excuse is the synestizer project.

There is a reasonably developed javascript API for audio; but it is missing various things you might be used to

It’s really more suited to game sound effects than modern synthesis. But it works, fast, and it’s everywhere, and it comes with integrated web services, openGL and UI libraries, and runs on android tablets, so there are some positives. Therefore, let’s see how it can be made convenient.

Raw(ish) DSP HOWTOs

If you want to use a library to simplify things, see below. First, here’s the instructions for going “bareback”, which is still reasonably high-level:

Web Audio libraries

Simplifying repetitive tasks. Which of these is the hottest? I updated this list to include the openhub widgets, which give a somewhat-current estimate of the development activity, since they are all pretty sporadic.

Tone.js

Tone.js is another webaudio framework; a particular selling point is that is has its own timing/scheduling system which is what is actually missing from the JS Audio. Also people are actually developing it still, which is not the case for everything else.

Webaudiox

Webaudiox

…is a bunch of helpers for WebAudio API. It isn’t a library per se. You can use any of those helpers independantly.

(sic) It appears to in fact be precisely a library, unlike the various crazy frameworks on display here. I regard this as a plus. Technically it’s abandoned, but that might also be because its too simple to need additions, just copy-paste what you need.

Flocking

Flocking attempts to create a declarative JSON-style audio language, with inspiration from supercollider.

Maxim

Maxim is a javascript port of Mick Grierson’s Maximilian for C++ to javascript.

Gibber

Gibber claims to be a full-featured “livecoding environment”, which is not my focus, but perhaps it has good parts? (see also the manual). It’s style is too opinionated for my tastes, and it has a weird DSL that is even slower and less consistent than JS itself. However, the maintainer is passionate.

WAAX

WAAX is a fancy library, with synthesizer abstraction that feel less imperative and more declarative. However, the abstractions also feel over-engineered, and the boss-guy has been hired by Google and dropped out leaving the code less maintained.

Audiolib.js

audiolib.js is one of the others to have sequencer abstractions but is also abandoned. Its chief virtue is a lucid introduction to web audio on its homepage.

FaustDSP

The incredible Faust DSP language can target optimised javascript (To learn: how to mix JavascriptNode and native AudioNode with this approach.)

Webpd

WebPd is a partial port of puredata to javascript. This is a bizarre project - partially porting one obscure high-level audio language to a less obscure high-level audio language doesn’t open up many new horizons AFAICT. Nonetheless I like the puredata community, who tilt the best windmills, so it deserves a link.

Timbre.js

Timbre.js is another webaudio library. It was an early adopter, but also stagnated early.

Audiocomponents

Audiocomponents is a strategy to use the new webcomponents system to (more or less) make Webaudio a matter of pure HTML. Webcomponents are something I might use when the dust and standards wars have settled and they integrate with other stuff, if they have provided any concrete benefit after all that.

omnitone

omnitone does 3d decoding of ambisonic, for all your surround-sounds needs.

beep

beep … “is a JavaScript toolkit for building browser-based synthesizers.” Abandoned.

React-music

react-music is a cute hack - composable Reaect componenets which happen to produce audio

Sequencing

I don’t know why there are so many audio libraries; The most tricky thing is sequencing, and of course, most would rather paint the bike shed than solve that one.

Why does my sequencer slow down when I change tabs?

TBD

Audio UI libraries

This is surprisingly a big enough topic to merit its own section on the UI page; It’s not an exciting surprise though, it’s one of those things that is simultaneously surprising and tedious, like unexpectedly discovering the tax return that you thought you submitted a month ago still on your desk.

MIDI

Works! (At least in Chrome) Read the WebMIDI spec. Works well with Tone.js.

Cute examples

Some explained, some for reverse-engineering, all simple.