Please Note:
Currently (March 2010) this experimental Audio API only works in patched beta versions of Firefox 3.7. You can download builds of this patched beta version at the locations listed here.
The experimental audio data API allows the programmer to access raw audio data and a processed FFT spectrum of the currently playing audio data through the HTML5 audio tag.
The audio data API was specifically created to allow JavaScript audio visualization, but will certainly also be useful for many other use cases. The example here is a relatively simple audio visualization based on the example code from the draft recommendation.
Here is some relevant documentation about HTML5 audio and the proposed audio data API:
- W3C HTML5 Audio Specification
- WHATWG HTML5 Audio Specification
- Audio Data API (Draft Recommendation)
- Mozilla Bug 490705 - Support Audio Data API
The music track for this visualization is "Truth 2" by Jon Gillham and is used with permission by the artist. Thanks, Jon!
You may also be interested to see some of my other explorations of new HTML5 features here.
Here is a short extract of the animation below as a YouTube video - please keep in mind that this is just a shadow of the fidelity of the live visualization below.