views:

103

answers:

1

I want to create a swf or air app that takes an input and displays a graphic representation of it.

The graphic side is fine for the moment, but its always using an mp3 for example

var sound:Sound = new Sound (new URLRequest("myMP3.mp3"));

- i want it to be able to take a 'live' audio feed. How would I do that and is there a better way than using the microphone input?

thanks dai2

+2  A: 

Microphone input is probably the easiest way and using flash player 10.1 or AIR 2.0 you can do this. Take a look at http://www.adobe.com/devnet/air/flex/articles/using_mic_api.html

It's not as easy as using SoundMixer.computeSpectrum but offers the possibility (+ more). You'll for instance most likely want to run the data through FFT to use in visualization

Antti
Thanks for your answer Antti.What is FFT?
daidai
FFT (http://en.wikipedia.org/wiki/Fast_Fourier_transform) converts data in the time domain into frequency domain (you'll see what's bass, what's treble etc). FFT implementation in as3: http://stephan.acidcats.nl/blog/2009/03/01/spectral-analysis-source-files/
Antti