Experiments with audio, part IX

I’m working with an ever growing group of web, audio, and Mozilla developers on a project to expose audio spectrum data to JavaScript from Firefox’s audio and video elements. Today we show what we did at www2010.

I’m in Raleigh, North Carolina, with Al MacDonald for the www2010 conference.  We’re here to present our work on exposing audio data in the browser.  Over the past month Corban, Charles, and a bunch of other friends have been working with us to refine the API and get new types of demos ready.  We ended-up with 11 demos, some of which I’ve shown here before.  Here are the others.

The first was done by Jacob Seidelin, and shows many cool 2D visualizations of audio using our API. You can see the live version on his site, or check out this video:

The second and third demos where done by Charles Cliffe, and show 3D visualizations using WebGL and his CubicVR engine. These also show off his JavaScript beat detection code. Is JavaScript fast enough to do real-time analysis of audio and synchronized 3D graphics? Yes, yes it is. The live versions are here and here, and here are some videos:

The fourth demo was done by Corban Brook and shows how audio data can be mixed live using script. Here he mutes the main audio, plays it, passes the data through a low pass filter written in JavaScript, then dumps the modified frames into a second audio element to be played. It’s a technique we need to apply more widely, as it holds a lot of potential. Here’s the live version, and here’s a video (check out his updated JavaScript synthesizer, which we also presented):

The fifth and sixth demos were done by Al (with the help of many). When I was last in Boston, for the Processing.js meetup at Bocoup, we met with Doug Schepers from the W3C. He loved our stuff, and was talking to us about ideas that would be cool to build. He pulled out his iPhone and showed us Brian Eno’s Bloom audio app. “It would be cool to do this in the browser.” Yeah, it is cool, and here it is, written in a few hundred lines of JavaScript and Processing.js (video 1, video 2):

This demo also showcases the awesome work of Felipe Gomes, who has a patch to add multi-touch DOM events to Firefox. The method we’ve used here can be taken a lot further. Imagine being able to connect multiple browsers together for collaborative music creation, layering other audio underneath, mixing fragments vs. just oscillators, etc.  We built this one in a week, and the web is capable of a lot more.

One of the main points of our talk was to emphasize that what we’re talking about here isn’t just a concept, and it isn’t some far away future. This is real code, running in a real browser, and it’s all being done in HTML5 and JavaScript. The web is fast enough to do real-time audio processing now, powerful enough and expressive enough to create music. And the community of digital music and audio hackers, visualizers, etc. are hungry for it. So hungry that they are seeking us out, downloading our hacked builds and creating gorgeous web audio applications.

We want to keep going, and we need help. We need help from those within Mozilla, the W3C, and other browsers to get this stuff into shipping browsers. We need the audio, digital music, accessibility, and web communities to come together in order to help us build js audio libraries and more sample applications. Yesterday Joe Hewitt was talking on twitter about how web browser vendors need to experiment more with non-standard APIs. I couldn’t agree more, and here’s a chance for people to put their money where their mouth is. Let’s make audio a scriptable part of the open web.

I’m currently creating new builds of our updated patch for Firefox, and will post links to them here when I’m done. You can read more about the technical details of our work here, and get involved in the bug here. You can talk more with me on irc in the processing.js channel (I’m humph on moznet), or talk to me on twitter (@humphd) or by email. One way or another, get in touch so you can help us push this forward.

This entry was posted in CDOT, Experiments with audio, Mozilla, Mozilla Education, Seneca, Teaching Open Source. Bookmark the permalink. Both comments and trackbacks are currently closed.

5 Comments

  1. Posted April 30, 2010 at 11:45 am | Permalink

    Wow wow wow! Fantastic work by all involved!

    I’m definitely going to have to pick up a copy of your new build!

  2. Mike Ganly
    Posted May 5, 2010 at 8:06 am | Permalink

    Programming clever but not terribly difficult. Where some sophistication takes place it is in the graphics displayed. Music has to be trivial to produce meaningful images.
    The problem to be solved is to produce images which would give pleasure while listening to real music which gives pleasure eg. Beatles or Bach. These example completely fail to do this.

  3. Posted May 5, 2010 at 9:16 am | Permalink

    Elloell!

  4. Posted May 5, 2010 at 7:07 pm | Permalink

    @Mike

    What’s important is that the tools are there. Building pleasurable images are all about finding good algorithms to use.

  5. Posted May 11, 2010 at 11:13 pm | Permalink

    Absolutely awesome and amazing! Especially the potential for a global, collaborative jam sessions or orchestra. :)

    I hate to toss in any negativity here, but I’m surprised to see that all of the videos on this page are Flash, and hosted by a site that made a solid choice and obvious point to stay away from Theora.
    If anything, use openvideo.dailymotion.com.
    I’m not at all impressed with that part of dailymotion (Flash videos on the front page, no Theora video controls, etc)), but it’s better than using vimeo for those that want Theora to get anywhere.

12 Trackbacks

  1. By Canvas 3d JS Library » WWW2010 in Raleigh on April 30, 2010 at 12:51 pm

    [...] was absolutely fantastic. They had some really neat music visualization demos going. Here is a link to their talk. In particular, check out the videos for these two demos (demo1, demo2) that which are webGL based [...]

  2. [...] is a re-post of an important post from David Humphrey who has been doing a lot of experiments on top of Mozilla’s extensible platform and doing [...]

  3. [...] audio in HTML5 + Javascript May 1, 2010 lgustavomartins Leave a comment Go to comments Experiments with audio, part IX. Categories: Development, FOSS, Research, sound Tags: audio, HTML5, javascript Comments [...]

  4. [...] David Humphrey is a man you can thank for making this happen. Check out his blog, and read in particular: Experiments with audio, part IX [...]

  5. [...] David Humphrey is a man you can thank for making this happen. Check out his blog, and read in particular: Experiments with audio, part IX [...]

  6. By View Source as Musical Innovation on May 4, 2010 at 11:25 am

    [...] Bread and Circuits Philosophy for the programming set, served on home made bread Skip to content About – David HumphreyReading Open Data « Experiments with audio, part IX [...]

  7. [...] the second demo. (If you’re interested in other non-WebGL demos using this audio extension, David Humphrey has a great writeup here, and you can read even more on Bocoup, and at Create Digital Motion here and [...]

  8. [...] David Humphrey is a man you can thank for making this happen. Check out his blog, and read in particular: Experiments with audio, part IX [...]

  9. [...] because most of the cool stuff happening with PJS was something we already knew about (for example, Dave’s Audio Build with PJS).  So, trying to find something new was a bit of an arduous task.  When I had given up and [...]

  10. [...] Experiments with audio, part IX (tags: audio html5 javascript music processing visualization programming instrument) [...]

  11. [...] Read more on the video’s project [...]

  12. By Experiments with audio, part X on May 26, 2010 at 11:03 am

    [...] my last post, quite a few new people have joined our group, a lot has changed in our implementation, and [...]