...loading...

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
(CCRMA)
Stanford University

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

TimeWorkers
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

index.html

index.html

index.html

engine.js

engine.js

engine.js

multiple worker threads

using inline worker syntax, WorkerThreads are dynamically defined

engine.js

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

engine.js

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

Thanks!

this deck available online at
https://ccrma.stanford.edu/~cc/deck.js/lac2019

along with the demos:
https://ccrma.stanford.edu/~cc/deck.js/lac2019/1
https://ccrma.stanford.edu/~cc/deck.js/lac2019/2
https://ccrma.stanford.edu/~cc/deck.js/lac2019/3
https://ccrma.stanford.edu/~cc/deck.js/lac2019/4
https://ccrma.stanford.edu/~cc/deck.js/lac2019/5