I have Fs=16kHz audio signals and processing it frame-by-frame using 10ms frames. I am calculating the envelope of a signal by its root mean square value ("Pow") and trying to filter with 1st order IIR filter to correspond attack and release times of 5ms and 20ms respectively. Aim is to select compressor gain based on this filtered frame power value. Any help how to CORRECT values for the filter?
attack = 0.1350: % not equal to 5ms attack, how to get it correct?
release = 0.6050; % not equal to 20ms release, how to get it correct?
…
diff = PowIIR – Pow;
tmp_coeff = attack;
if(diff > 0) tmp_coeff = release; end
PowIIR = Pow + (diff * tmp_coeff);
Any help available?
Best Answer