when manipulating a live stream of audio data in the frequency domain, I've heard you need to do fft / ifft in small chunks, say 256 samples at a time.

I've also heard you need to somehow employ a window function but I'm not sure the details on that. Is that to prevent artifacts from popping up due to the circular nature of fft?

Is there anything else I should know that I haven't mentioned above if planning to do this? I also eventually want to figure out how to make windows work with convolution reverb, but assume the answer to that is big enough for its own question.

Thanks for any info!!

  • $\begingroup$ This might by intereseting: Algorithm for Pitch Shifter $\endgroup$ – Vertex Apr 2 '15 at 15:37
  • $\begingroup$ That is so awesome @Vertex. This is exactly what I needed, a working example of taking time domain samples, doing some work in frequency domain, and then returning back to time domain. Thanks so much! $\endgroup$ – Alan Wolfe Apr 2 '15 at 16:32

Analysis is separate from processing. Windowing helps remove certain artifacts during spectrum analysis, but since it is numerically lossy, isn't as useful when actually processing the audio for output. Instead, sufficient zero-padding (without any non-rectangular windowing) and the use of overlap-add or overlap-save is used for any fast convolution or frequency domain filtering. This prevents (actually just zeros) circular convolution artifacts.

Convolution reverb is already answered elsewhere, but in general can be done by breaking up the reverb impulse response into a whole series of overlap-save processing steps and summations (e.g. a 256k long reverb might be done using a series of 1,000 256+padding length FFT convolutions, or a mix of shorter and longer ones, with a future use buffer to hold most of those results till needed.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.