HydrogenAudio

Hydrogenaudio Forum => Scientific Discussion => Topic started by: arniar on 2010-05-31 21:41:19

Title: Audio FFT filtering
Post by: arniar on 2010-05-31 21:41:19
I am working on audio compression for hearing aids and I have the following consideration.

In the current implementation, the signal is segmented into 50% overlapping segments of length L. The processing of each segment includes windowing with the Hann-window and zero padding with L zeros. The spectrum is multiplied with filter spectrum with truncated impulse response to prevent temporal aliasing. Finally the resulting spectrum is transformed into the time domain and added to the output signal.

But from the discussion here:

http://www.hydrogenaudio.org/forums/lofive...php/t67700.html (http://www.hydrogenaudio.org/forums/lofiversion/index.php/t67700.html)

I read:
Quote
Also, if you intend on actually modifying the signal between the fft and the ifft, it's best to apply the window both before the fft and after the ifft. You need a "power complementary" window for that. The simplest is sqrt(Hanning), which is just a sine window. Note that you *can't* use a Hamming window in any case.


So, as I see it, there is possibility for a different implementation, but my question is how this can work with the zero padding or is zero padding still necessary? Zero padding with L zeros will double the resulting time domain representation (2L) after the ifft but the window has only size L. Should I drop the zero padding or is there another way?


Title: Audio FFT filtering
Post by: Primius on 2010-06-01 01:33:32
You don't need post-windowing, if you make sure that the impulse response of the filter is short enough to avoid temporal aliasing.

Algorithms that filter each frequency bin independently often create filter impulse responses that are temporal aliased.

Pre-windowing is needed to have smooth transitions between two segments with different filters applyed (if the filter doesn't change, you would not even need pre windowing).


(I might be wrong, I just started reading about DSP)

Greetings
Title: Audio FFT filtering
Post by: Woodinville on 2010-06-01 05:48:12
The thing to remember is that your original signal is of length 'n', and the impulse response of your filter corresponds to length "m", and therefore the minimum FFT Length is

n+m-1

From all of that, windowing, shift length, etc, all flow.
Title: Audio FFT filtering
Post by: arniar on 2010-06-01 09:23:06
Thanks

I will then stick to the zero padding, it looks like a temporal smoothing so therefore I was considering the alternative implementation, that is, if it would give better quality.