Question

I apologize if this question is very basic.

I'm transforming an audio signal (currently a plain sine wave) from the time-domain to the frequency-domain using FFT, and then back to the time-domain to compare the difference to the original signal.

Currently I do:
- Take a non-overlapping frames (e.g. 1024 samples per frame).
- FFT that frame
- iFFT the freq-domain information
- send output to speakers

EDIT (1):
This seems to work now (see images without and with a window, where input=brown, output=blue).
enter image description here
enter image description here
END EDIT (1)

Now I want to perform the overlapp-add method:
- Take frames with 50% overlap (samples 0-1023, 512-1535, 1024-2047...)
- Apply a Hanning window to ecah frame
- FFT
- iFFT
- ??? This is my question!!

So at the end of my iFFT I have an output frame of 1024 samples. Does that mean that I need to send the first 512 samples to the speakers, and the other 512 samples (512-1023) should be kept in a buffer to be added to the first 512 samples of the next frame? Is that as simple as that or am I misunderstanding something?

Thanks!

No correct solution

OTHER TIPS

Normally, when you do overlap-add, you zero-pad the data before the FFT, and save the left-over tail to later add to the result of the next frame processed.

Your initial "bad quality" problem is probably due to some bug where you don't preserve the exact phase information (the full complex FFT result) between the FFT and IFFT. You will have to fix this, whether or not you do overlap-add or overlap-save fast convolution or other processing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top