# filtering in frequency domain

I am performing decorrelation of two channels of audio using all pass filtering. The two all pass filters for two channels are of very high order (>1000 but with not all coefficients non zero). I have to perform this filtering in frequency domain. I get input samples in 2048 frame size (48 K sampling) with 50 % overlap Hann windowed.

So to apply this filter (a small intermediate matlab snippet for one of the channels)

freq_resp_filter=freqz(filter_APF,4096,'whole');

fft_input_sig=fft(input_sig_frame,4096);

filtered_sig_fft=freq_resp_filter.*fft_input_sig;

filtered_sig_ifft=ifft(filtered_sig_fft); % done for testing only

final_2048_samples=filtered_sig_ifft(1:2048); % throw away last 2048 samples to
remove aliasing by fft convolution


and then i recombine this final_2048_samples with previous frames with overlapping.

When I listen to the output audio, I hear intermittent noise with signal, the noise is absent when I apply the same filter in time domain.

my question is: 1. Is this implementation correct (I have to perform this in frequency domain! and I can not do overlap add/save as this block is a part of a system, and I have no control over frame size, so every operation, 2048 samples should be given as output for further processing. )

Regards, Kd

• Frequency-domain filtering the Hann-windowed data will not work perfect because it wraps around in time domain. Can't you revisit time domain by IFFT to manipulate the data for overlap add/save? You could still churn out 2048 samples for every input 2048 samples. – Olli Niemitalo Apr 14 '15 at 7:52
• @OlliNiemitalo right now I am converting to time domain by ifft only for testing, but in reality the expected output of this block is in the frequency domain itself. Also, for this testing, If you see above, I am taking 4096 point fft of input data which is 2048 samples long(zero padding by 2048 to account for circular convolution of fft) and then after the ifft, throwing away last 2048 samples, and still I hear some distortion. (I will edit my answer to explain this throwing away part). Thanks – Kd_R Apr 14 '15 at 14:01