HTML5 audio tag with realtime javascript FFT visualization

Over the last couple weeks the #processing.js channel on IRC has been a buzz about David Humphrey’s experimental firefox patches which reveal live audio signal data to javascript. I was able to get a build compiled on my macbook and quickly whipped up this example in processing.js. This demo uses a FFT implemented in javascript and processes a 2048 sample buffer in realtime.

Ajaxian has the full story about how it all came about.

Posted by Corban Brook 07/01/2010 at 13h41 | | Posted in , , | Full article

Understanding spectral leakage and window functions

Discontinuities in the measured signal interval

Anyone who has worked with Fourier analysis of signals will know that spectral leakage can be a big problem when attempting to detect frequency peaks. Spectral leakage occurs during the conversion process from a time domain signal into frequency domain. It is important to know that this leakage is not an artifact but in fact a perfect sinusoidal representation of what the Fourier Transform has analyzed. The Fourier Transform expect truly periodic measured signal intervals in order to build the frequency domain representation of a perceived repetitive never ending signal. When the signal is not periodic in nature the Fourier Transform will introduce sharp discontinuities into the signal which are then processed into sinusoids. The spectral energy from these sinusoids spread across FFT bins from the fundamental frequency peak.

View the interactive demo (Processing applet).

Posted by Corban Brook 23/11/2009 at 10h20 | | Posted in | Full article

About

    Buildingsky.net is comprised of a group of computer science enthusiasts. We build, experiment and learn together.

    We are interested in HTML5, Ruby, Javascript, DSP, and finance/economics.

Contact

Projects

Categories