I wrote a DSP program that uses overlap-add like this:
1. Incoming data is segmented into blocks of N samples
2. Each block is expanded with another N zeros, so the block has now 2N samples
3. Put the 2N block through FFT, getting a 2N spectrum
4. Multiply the 2N spectrum with a Sinc lowpass filter kernel spectrum
5. Put the resulting 2N spectrum through inverse FFT, getting a 2N block
6. Adding the first N samples to the last N samples of the preceeding run
This seems to work perfectly fine. Let's say I feed a nice sine signal to my input, so I get a nice (low pass filtered) sine at the output. I want to point out that the output signal does not show any indication that it was processed in blocks.
Now here is what puzzles me:
They say that you also need to use a windowing function. I take it that I am supposed put every input block (N samples) through a windowing function before I expand it to 2N samples.
But if I do so, the nice sine signal is faded in and faded out with every block. Of course, the output signal looks simular: what was once a nice sine signal is now an continuous repetition of fading in and fading out. This is not what I want, do I?
It seems to me that doing windowing is wrong when using overlap-add. As far as I understand windowing is useful when looking at the spectrum of an isolated block of data, but with overlap-add I have some sort of continuous stream of data, right?