A friend recently created something similar, and he ended up transcribing the full-length Super Mario theme song! <a href="http://eshiota.github.io/retro-audio-js/" rel="nofollow">http://eshiota.github.io/retro-audio-js/</a><p>Presentation here: <a href="http://www.slideshare.net/eshiota/web-audio-band-playing-with-a-band-in-your-browser" rel="nofollow">http://www.slideshare.net/eshiota/web-audio-band-playing-wit...</a>
If play returned a reference to the play function you could chain them like<p><pre><code> .play('D#5', 1/4)('E5', 1/4)
</code></pre>
Just a thought on cleaning up the syntax a bit.
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.
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.