Very awesome! Interestingly, in both Chrome and Firefox, the song stops playing ("mostly") if you switch to a different tab. I say "mostly" because Chrome seems to play a single note every 10-20 seconds even with the tab backgrounded.
Yeap, both setTimeout and setInterval are being sacrificed for performance. Alternatively you could use WebWorkers to offload the timers for precision.
I'd love to specify wave types or even more advanced stuff such as FM synthesis. With a little work, modules such as this one may enable a whole new category of innovative/strange browser apps.
CoffeeCollider is a coffeescript clone of SuperCollider, it has a lot of options for subtractive/additive/fm/granular synthesis and algorithmic sequencing/composition.
I would love to see a MIDI interpreter for something like this. MIDI is already a series of note events (among other weird things like pitchbend and sustain, so it couldn't be too hard.
Presentation here: http://www.slideshare.net/eshiota/web-audio-band-playing-wit...