Jump to content
  • Advertisement
Sign in to follow this  
Neon_C

Audio Spectrum Analyzer

This topic is 3765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!