Web Audio – It is finally (almost) here?

You might have seen that the new Angry Birds for Chrome has audio support but it falls back on Flash.  Boo. Cheating.

Then I saw this – http://sdfphd.net/creativepact2010/sdfahDev_0007.html – and realized that making proper music in a web browser isn’t just a far-off dream anymore. See what you can do with Javascript, the new web sound API (Chrome, Webkit, Mozilla) and Processing.js? Hmmm….

Audio support is built into the newest browsers, and it looks like developers and industry (especially gaming – I see email addresses from Google and Zunyga peppered all over these development emails) are lining up behind browser-based audio. And why not? With WebGL and 3D graphics, games development for the web can finally break its dependency on Flash and we could see some competition. Of course, Unity3d has done a nice job of creating a cross-platform browser-based plugin that’s small and very easy to install, but Unity isn’t free and hackable like HTML5 and Javascript.

Also found this SuperCollider-like browser-based audio API: https://github.com/colinbdclark/Flocking

You can follow the emails from the W3Audio Working Group here: http://lists.w3.org/Archives/Public/public-audio/ – they make for some fascinating insight into how these APIs are created, and what goes into creating an audio & video API from scratch. They also have a nice Twitter feed for keeping up on what’s going on with audio support: http://twitter.com/#!/w3caudio

From the feed I found these handy links for low-level audio API goodness:

There’s some Javacsript for handling music theory (Western, anyway) by calculating note frequencies, scales, octaves, transposing, etc:
(Demo here: http://code.gregjopa.com/javascript/audio/musicjs/demo/)

There’s also audiolib.js:

It looks promising, but the bells-and-whistles example (with the sequencer and keyboard) didn’t work in FireFox 4.0 for me.


3 responses to “Web Audio – It is finally (almost) here?”

  1. Hey Evan, thanks for the survey, really astonishing how close we are getting to a musical browser! Btw I tried the musicjs demo on a mac/chrome, but couldn’t hear anything – was it the same for you?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.