Pages

Thursday, February 3, 2011

Flash audio visualizer using ActionScript 3.0

For my final project I'm going to need to generate graphics based on user input using sensors that may detect motion, heat, sound, etc. Today I've been working with ActionScript 3.0 in Flash to create a simple visualizer that reacts to any sound file.
Using the computeSpectrum method from the SoundMixer class you can convert a sound file into graphics. The code looks pretty daunting if you're just learning ActionScript as I am but I found a great tutorial from Tom Green on Community MX that explains how it works really clearly.
I'm going to experiment some more over the next few days.
If anyone has any tips send them my way!

1 comment:

  1. yes, it's a good tutorial. One reason it doesn't really look as it sounds is that the visual plot is linear on the horizontal axis. Our perception of pitch is logarithmic, hence the FFT fins need to be recalculated and grouped into for example octave bands.

    ReplyDelete