 # Fft

2469 Views 7 Replies 4 Participants Last post by  Al Stevens
I have in the past written DSP software that uses the FFT and its inverse to apply filters to audio waveforms. Most of the time I haven't really understood what I was doing because all the formal explanations I read about those formulae assume the reader knows more than I know. The filters I work with are usually open source algorighms-EQ, slow-downers, pitch changers,and so on. I cannot always tell how those algorithms work by reading the code because I don't fully understand the structure of the frequency domain data.

Here's what I know:

1. Begin with a block of samples from a waveform. The number of samples must be a power of 2. This is, of course, the time domain.
2. Pass the sample buffer to the FFT algorithm.
3. Apply the filter to the resulting buffer, which contains the frequency domain.
4. Pass the filtered buffer to the iFFT algorithm to convert it back to the time domain.
The explanations I read fail to describe the frequency domain buffer sufficiently that I can understand it. Here's what I think I know:

1. Each bin in the buffer represents a frequency range.
2. The bins are 0 to some upper limit, which is determined by the number of bins (I think.)
3. The value in each bin is a complex number. One part is the frequency's volume; the other part is the phase (0-359) the frequency is at when the waveform begins.

Here's what I do not understand:
1. If a waveform has a frequency occurring more than once but at different phases, how does the frequency domain represent these data? Or does it need to?
2. Many algorithms operate on the time domain buffer and then save some part of the end of the filtered time domain buffer to combine with the next buffer occuring in time. I hope that makes sense as I explained it because I do not fully understand what is going on there.
Comments? Please converse as much as possible without advanced mathematical references. It's been too long. You'll lose me. Feel free to disagree with the things that I said I do know. Because I don't really know that I know them. If you know what I mean.
See less See more
1 - 3 of 8 Posts
DougR said:
1. It doesn't need to, a fourier transform takes the incoming wave form and breaks it into separate fequencies, you dont get the same fequency twice.
Right. But what if the same frequency occurs at different phases in the same waveform? How does the frequency domain represent this second occurrance of the same frequency? That's my question.

For example, picture a waveform with two sine waves, both at the the same frequency, say 2000 hz, but starting at different phases. One starts at zero, for example, and the other starts at, say, 48 degrees. With only one bin in the frequency domain to represent 2000 hz, and, consequently, only one place to represent the phase at which 2000 hz begins, how does the frequency domain represent both sine waves?

I probably should write a program that generates and mixes sine waves and displays the frequency domain data to see what it does.
Interesting. Thanks for that answer. I'll have to chart that out. I'm having difficulty visualizing it. What if the two have the same amplitude?
1 - 3 of 8 Posts