Sign in to follow this  
cignox1

how to use FFT?

Recommended Posts

Hi, I never used a FFT algorithm before, and I don't know the theory at all... what I need is just get the main frequency from a sound (ie. from a single note of a guitar)... I found FFTW but still I don't know how to use it. Is this a hard task? Someone could give me a very basic tutorial? Thank you.

Share this post


Link to post
Share on other sites
Thank you for the link: this book is very useful and I already downloaded it, but I think it is still too hard for me to figure it out how to do what I need. I wonder if I really need to know how the FFT works to use it (in that case I will try to learn the theory...) or if there is a simpler way to do that. Don't get me wrong, I don't want to have everything without a bit of work, but I need this just for a very small project, and I hope not to spend 2 weeks just to learn all that math ;-)

project: I would like to make a simple instrument tuner: I play the note, and the program says if the note is correct or not. In order to to this, it should be able to recognize the note I'm currently playing, that is (if I'm right) it should find the main harmonic of the sound... How to get this?

mmm...I think I will do my best to understand this FFT.

Share this post


Link to post
Share on other sites
Some brief background to the FFT...

A signal may be described in a time domain by it's time varying amplitude, x=f(t), or in a frequency domain by its variation with frequency of the complex function y=F(s). y, the amplitude in the frequency domain, is a complex function of the time domain amplitude and phase of the signal.

Given a signal x=f(t), we can find the freqency domain function y=F(s) using the following integral transform:


F(s) = ∫-∞f(t)e2(pi)istdt


and you can get back to the original time domain form using the
inverse transform


f(t) = ∫-∞F(s)e-2(pi)istds



You don't need to understand this to implement a FFT algorithm. However, it helps to understand a little of this if you hope to use the results of a FFT to analyse a signal, since presumably you want to identify certain properties of the frequency domain signal.

There are a lot of nice properties of this transform pair that might come in handy... but then, maybe you could just get away with performing the FFT on your signal and eyeballing it to see if your note is 'in tune'.

Cheers,

Timkin

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