Navigate this deck with keyboard or touch

type "m" for the menu of pages and
arrow or page keys to advance or rewind

two-finger tap for the menu of pages and
the usual left/right swipe to advance or rewind

embedded media clips (audio and video) use an extra click (or swipe) to begin playing
and another to finish

Browser-Based Sonification

Chris Chafe

Center for Computer Research in Music and Acoustics
Stanford University

for coding sonification projects in JavaScript using
the Web Audio API.

for coding sonification projects in JavaScript using
the Web Audio API.

The name comes from its use of
the Web Worker API
for composing musical layers or voices which unfold in time.

Structure and modules

It's spork-like, based on the functionality of Chuck's spork

which is used to call a function in a parallel, separate thread

clocked by the parent process but with it's own relative timing

sonification in Chuck usually consists of sporking a loop function which iterates over the incoming data

Knoll Building (100 years ago)
CO2 = 300 ppm

Knoll Building (CCRMA today)
CO2 = 400 ppm

drilling ice cores in Antarctica

sonify is a JavaScript generator defined in the
landing page script (for iterating over the data)

mapping code is defined within it

no dependencies, FOSS / NIRD environment

some demos -- tides.dat
example landing page







multiple worker threads

using inline worker syntax, WorkerThreads are dynamically defined


here's the call on spork that makes it go
(after preparing the incoming data)

prepare incoming data by normalizing

spork is defined with a TimeIterator member to which it applies the sonify loop script

TimeIterator executes a timing recursion -- in a WorkerThread -- to become a TimeWorker


ugen definition -- part 1 -- combine Web Audio nodes

ugen definition -- part 2 -- wrapper for time-varying controls called in sonify

TimeWorkers compared to goals in Sonification Report, Kramer et al. (2010)

Pla's voices (1983) are groups of time-ordered events which can themselves be voices

Common Music's Thread, Merge and Algorithm (1997) are respectively sequential, parallel and programmatic collections


this deck available online at

along with the demos: