Sign in to follow this  
Neon_C

Audio Spectrum Analyzer

Recommended Posts

Neon_C    122
Ok i'm writing a program in C# using Direct3d. i need to write a spectrum analyzer in order to translate objects around the scene based on sound. well this is where i hit a brick wall... i'm totally lost! i've found information that points to useing a Fast Fourier Transform and i've found a few libraries that do that ( http://mathnet.opensourcedotnet.info )... but i just cant wrap my head around how to use FFT to do this and i have no idea how to impliment it. Can anyone help?

Share this post


Link to post
Share on other sites
cignox1    735
The FFT transforms a signal from one domain to another. IIRC, after the function execution what you get is a buffer with a sequence of amplitudes. Each sample is a specific frequency (or a range of frequencies, I don't really remember). I other words, the FFT transform the sample froma function of time amplitude(time) to a function of frequencies amplitude(frequency).
Once I wrote an utility to tune my guitar, using the microphone to get the sound and the FFT to transform it, Then I searched the peak of the signal (the sample with the highest amplitude) and this was my note. Checking its frequency made me able to say if it was too high or to low).

You may find this topic covered a few times in the past on gamedev. When I wrote my app, I was heavily helped by people here, you may also want to find my previous threads.

Share this post


Link to post
Share on other sites
Neon_C    122
Quote:
Original post by cignox1
The FFT transforms a signal from one domain to another. IIRC, after the function execution what you get is a buffer with a sequence of amplitudes. Each sample is a specific frequency (or a range of frequencies, I don't really remember). I other words, the FFT transform the sample froma function of time amplitude(time) to a function of frequencies amplitude(frequency).
Once I wrote an utility to tune my guitar, using the microphone to get the sound and the FFT to transform it, Then I searched the peak of the signal (the sample with the highest amplitude) and this was my note. Checking its frequency made me able to say if it was too high or to low).

You may find this topic covered a few times in the past on gamedev. When I wrote my app, I was heavily helped by people here, you may also want to find my previous threads.


Thanks, that really dose help... i'll also go looking around the fourm.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this