Prev: Convolution and FFTW question.
Next: Kenlighten - A social network for knowledge seekers and providers
From: jungledmnc on 30 May 2010 18:26 Hi, I have created a long FIR processor and run into trouble, that each impulse reponse recorded from real halls (or amps or something...) cause a different gain. Ideally I'd like to have no gain at all, but that's probably impossible. Anyway this is what I tried: 1) Normalize the kernel This doesn't help of course, though mixed with some predefined gain like -35dB seems good, though far from perfect. Obviously this wouldn't work on kernels like [1,1,1,1,1,1..] 2) Normalize & multiply by 1/sum of the taps Basically inspired from the previous case, I thought it is required to ensure the energy of the output of impulse (containing all frequencies) is 1. Unfortunately this doesn't work very well either. Basically I guess it cannot work so much for kernels like [1,-1,0,0,0,0..] or [1,-1,0.5,-0.5,0.25,-0.25...], basically because the sum is around 0. Any ideas? I'm assuming the kernel is pretty much random, spectrally similar to white noise, however in most cases there would be some loss in high-frequencies, for amp IIRs it can loose basically anything, so I can hardly make any assumtions. Thanks in advance.
From: David Revelj on 31 May 2010 05:26 Hi, did you try scaling the impulse response by 1/sum(abs(taps)) ? That would solve the problem of the zero sum you described in (2) Regards jungledmnc skrev 2010-05-31 00:26: > Hi, > > I have created a long FIR processor and run into trouble, that each impulse > reponse recorded from real halls (or amps or something...) cause a > different gain. Ideally I'd like to have no gain at all, but that's > probably impossible. Anyway this is what I tried: > > 1) Normalize the kernel > This doesn't help of course, though mixed with some predefined gain like > -35dB seems good, though far from perfect. > Obviously this wouldn't work on kernels like [1,1,1,1,1,1..] > > 2) Normalize& multiply by 1/sum of the taps > Basically inspired from the previous case, I thought it is required to > ensure the energy of the output of impulse (containing all frequencies) is > 1. Unfortunately this doesn't work very well either. > Basically I guess it cannot work so much for kernels like [1,-1,0,0,0,0..] > or [1,-1,0.5,-0.5,0.25,-0.25...], basically because the sum is around 0. > > Any ideas? I'm assuming the kernel is pretty much random, spectrally > similar to white noise, however in most cases there would be some loss in > high-frequencies, for amp IIRs it can loose basically anything, so I can > hardly make any assumtions. > > Thanks in advance. >
From: jungledmnc on 31 May 2010 09:06 >Hi, > >did you try scaling the impulse response by 1/sum(abs(taps)) ? That >would solve the problem of the zero sum you described in (2) > >Regards > > Thanks! Seems much better than just 1/sum(taps). I didn't try it, because I thought the taps cancel each other when positive/negative, but due to the random nature it seems much better than I thought. Cheers!
From: jungledmnc on 31 May 2010 09:24 Fix: seems that the best way is working 1 / sqrt( sum of tap squares ) Cheers!
From: Steve Pope on 31 May 2010 13:04
jungledmnc <jungledmnc(a)n_o_s_p_a_m.gmail.com> wrote: >Fix: seems that the best way is working >1 / sqrt( sum of tap squares ) Yes, that makes mathematical sense even. Decades ago I was designing reverbs. To scale the gain when the algorithm was change, we used trial and errors, feeding various music sources into the system and looking at its output on a VU meter. But then, we only had eight fixed choices of algorithm so the problem was easier. Steve |