DSPRelated.com
Forums

Low freq enhancement via FFT

Started by dingke1980 August 28, 2005
Hi everybody

I am trying to enhance the low freq (<=100Hz) of an audio signal. I wonder
whether it is a correct way to do this via FFT.
Say, the audio signal is a sequence with large length. The sample rate is
44100Hz. I get the first 4096 point and tranform it into freq domain via
4096 point FFT. Since

4096/44100*100=9

I apply additional gain to the first 9 freq bin, then convert them into
time domain. For each frame apply such operation.

Unfortunately, I find discontiguous frequency response between each frame.

Why this happens??




		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
"dingke1980" <dingke1980@hotmail.com> wrote in message 
news:D6OdnQhsKpDP94_eRVn-2g@giganews.com...
> > Hi everybody > > I am trying to enhance the low freq (<=100Hz) of an audio signal. I wonder > whether it is a correct way to do this via FFT. > Say, the audio signal is a sequence with large length. The sample rate is > 44100Hz. I get the first 4096 point and tranform it into freq domain via > 4096 point FFT. Since > > 4096/44100*100=9 > > I apply additional gain to the first 9 freq bin, then convert them into > time domain. For each frame apply such operation. > > Unfortunately, I find discontiguous frequency response between each frame. > > Why this happens??
You might look at overlap add / overlap save .... the problem is that signals can't simply be processed in blocks without introducing blockiness. You need to "filter" the result so that it's more uniform - smoother in time. Fred
Thanks for your suggestion. I know when convolve a small length sequence
with a large length sequence, overlap saving or overlap adding method is
used. But how to perform in this specific situation? Could you explain
more detail?

Actually, I see FFT filter in CoolEdit. There's low freq enhancement
filter via FFT. I don't know what they implement such operation.

> >You might look at overlap add / overlap save .... the problem is that >signals can't simply be processed in blocks without introducing
blockiness.
>You need to "filter" the result so that it's more uniform - smoother in >time. > >Fred > > >
This message was sent using the Comp.DSP web interface on www.DSPRelated.com
"dingke1980" <dingke1980@hotmail.com> wrote in message 
news:AY6dncc5ge9HDY_eRVn-vQ@giganews.com...
> > Thanks for your suggestion. I know when convolve a small length sequence > with a large length sequence, overlap saving or overlap adding method is > used. But how to perform in this specific situation? Could you explain > more detail?
If the block length is N samples in time and in frequency, then the weights in frequency are of length N also (even if many of them are 1.000). So, the filter (the IFFT of the weights in frequency) is a FIR filter of length N. When you convolve a block length N with a filter length N you get 2N-1 samples out. There are N-1 samples that are a startup transient, there are N-1 samples that are a decay transient. So, there must be but one non-transient output sample ... and this isn't a good thing. The way around this is to design a shorter FIR filter that has the frequency response you need. Then that filter is appended with zeros in order to end up with N samples. Like this: 1) specify the frequency weights 2) use a FIR design program to design a filter with length <<N. 3) append the coefficients with zeros to get length N 4) FFT the appended sequence to use in multiplying in frequency. Let's say the FIR filter is of length M<<N. Then the transient response length is M-1 at each end of the block convolution. If you input a block of K = samples and conceptually convolve these samples with a filter of length M, the result is a convolution sequence of length K + M -1. We want K + M -1 = N so K = N -M + 1 samples. So, append M-1 samples to the K samples and FFT the length N zero-appended array. Likewise, append the M samples with K-1 zeros and FFT this length N zero-appended array. Multiply the two length N frequency sequences and IFFT the resulting N samples. Remove M-1 transient samples at each end of the resulting block. This leaves N - M + 1 useful samples in the result. I think you will find that dealing with the end transients is what overlap add / save methods work to achieve. It sounds like you already understand this. Fred
dingke1980 wrote:
> I am trying to enhance the low freq (<=100Hz) of an audio signal. I wonder > whether it is a correct way to do this via FFT. > Say, the audio signal is a sequence with large length. The sample rate is > 44100Hz. I get the first 4096 point and tranform it into freq domain via > 4096 point FFT. Since > > 4096/44100*100=9 > > I apply additional gain to the first 9 freq bin, then convert them into > time domain. For each frame apply such operation. > > Unfortunately, I find discontiguous frequency response between each frame. > > Why this happens??
The first 9 bins only exactly contain frequencies that are exact multiples of the reciprocal of the window size. Any frequency that is between the bin frequencies will have an FFT transform represented in many more than just the first 9 bins, even if the fundamental frequency is below that of the 9th bin. So if you apply gain to only the first 9 bins, you will distort the waveform of those frequencies that are actually between the bin frequencies. That leads to discontinuities in the reconstruction of a sequence of the modified IFFT windows. The various overlap methods seem to just blend the ends of the now discontinuous waveform around the window boundries, but they still blend distorted waveforms. It might be interesting to try to use some method (phase vocoder or autocorrelation, etc.) to more precisely measure the frequency and phase of these low frequency components, iteratively subtract them across frames, and the re-add them after applying the desired gain. IHMO. YMMV. -- rhn A.T nicholson d.O.t C-o-M