[chuck-users] ChucK on the web: NodeJS / HTML5

Tom Lieber tom at alltom.com
Fri Apr 20 11:18:50 EDT 2012

On Thu, Apr 19, 2012 at 6:10 PM, Matt Diamond <mdiamond at jhu.edu> wrote:
> Has anyone had any experience with using ChucK in a web context? For
> example, two things I'd be interested in as a web developer:
> 1) streaming ChucK audio output from a NodeJS server to the browser
> 2) a javascript client-side ChucK implementation utilizing the Web Audio API
> Has there been any work on either of these?

Links to these projects came up on the TOPLAP mailing list (worth
subscribing and perhaps asking there too):


Some friends from undergrad made a collaborative browser-based ChucK
editor that sounds like Noah's, though theirs was also not published.
Someone should release something!

At any rate, I've found the JavaScriptAudioNode interface to be fairly
friendly and somewhat performant:


This experiment of mine works pretty well on my computer, though for
some reason falls over on Windows without a much wider window size
that kills interactivity:


It's a port of this ChucK script designed for joystick control:


Anyway, running a virtual machine on top of Javascript in the audio
callback would probably not work, but if you could compile the code to
Javascript then you ought to be able to get away with a lot. Maybe
extend CoffeeScript? (The only reason you'd want the compile step at
all is that there's no easy way to emulate ChucK's syntax for yielding
time because Javascript lacks continuation support in most

Tom Lieber

More information about the chuck-users mailing list