Mozilla Audio Data API: Fast Fourier Transform example

This example processes framebuffer data from the Mozilla Audio Data API MozAudioAvailable event. The Fast Fourier Transform algorithm is used to obtain audio frequency levels which are then charted in a canvas element.

This page is part of the BBC R&D blog post The Mozilla Audio Data API: what do the numbers mean?.

Please note that Firefox 4 is required to run the code on this page.

JavaScript for audio data transformation used in this example is adapted from Mozilla Audio Data API sample code.

More information about access to audio data in JavaScript is available from the Mozilla Audio Data API documentation page and the W3C Audio Incubator Group forum.

The video clip is edited from the Wellcome Trust Tree of Life animation and is used and made available under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported licence.

Skip to top

BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.