If you want to see the math behing a Fourier Transform, read
my DFT notes.
If you want to see a faster DFT, read my FFT notes.
Remember that the Fourier Transform was meant to be used with periodic functions. Most of the time, when we pick a chunk of signal to analyze it's not periodic, and this results in spectral "leakage."
I took nf's guitar sample and cut out a 65536-sample chunk. Here's what the beginning of that chunk looked like:
This "leakage" can be reduced (at the cost of peak resolution) by "windowing" the non-periodic waveform to make it look a little more periodic. Windowing means multiplying the signal we have by a tapering function (sometimes called an apodization function). Different windows give different frequency responses.
Here are some of the more common windows, and the frequency responses they give:
When no window is being used, we can say we're using the "rectangle window."
Named after the Austrian meteorologist Julius von Hann. Some people call it the "Hanning" window, to help confuse it with the "Hamming" window. If you think back to your trigonometric identities, you'll find that an alternative representation of the cosine-squared Hann looks a lot like the formula for the Hamming window, although they are different.
Remember how derivatives and integrals of natural exponents (ex) stay natural exponents? The Fourier Transform of a Gaussian function is still a Gaussian funcion.
Sometimes known as the "triangle" window.
As always: window.c
Graphs drawn by gnuplot.
Formulae rendered by MiKTeX.
If you spot any mathematical inaccuracies, please let me know.