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:
- 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.
- Pass the sample buffer to the FFT algorithm.
- Apply the filter to the resulting buffer, which contains the frequency domain.
- 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:
- Each bin in the buffer represents a frequency range.
- The bins are 0 to some upper limit, which is determined by the number of bins (I think.)
- 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:
- 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?
- 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.