Compressor again

From: Juhana K Kouhia (kouhia@nic.funet.fi)
Date: Thu Jan 15 1998 - 15:30:35 EST


Hello. I copied some text on the noise gate/expander by Moorer. I left out
the part which describes how to divide the frequency spectrum to several
bands. But I have C code written by myself and precomputed filter parameters
for four band division given in the paper in case we would like to actually
write a compressor, limitter, expander, and noise gate based on this approach.

Yours,

Juhana

The paper is

James A. Moorer and Mark Berger
Linear-Phase Bandsplitting: Theory and Applications
JAES, Vol. 34, No. 3, 1986 March

[ A rhough quote begins ]

The expansion function used is [ in TeX format ]

  g = (1 - \alpha) \left[ s \over s + \lambda \right]^{2r} + \alpha

where s is the rms signal coming out of particular band, \lambda is the
threshold where the gain will start to be reduced, r determines the sharpness
of the gain change (if r is set to a large value (such as 5), a noise gate is
realized; a more reasonable value is r = 1), and \alpha determines the
minimum gain at low levels (with \alpha set to, say, -12 dB, the signal
during the quiet portions will be attenuated by 12 dB; with \alpha set to 1,
no expansion is performed).

Since computing s necessarily involves some delay, we delay the channel
output by that same amount before applying the gain control. This gives the
channel the effect of seeing into the future, since the gain starts changing
well before the signal arrives. Note that this makes the more common "fast
attack, slow decay" adjustments much less important, since they are simply
a way of making up for the fact that the signal is not known in advance.
Using this kind of "look ahead" makes the gain change, say, at the beginning
of spoken words, especially plosives, much more subtle. The common "bite"
of the noise gate opening up is greatly reduced.

The threshold \lambda is set during a "training" run on just the noise
alone. This gives us the rms value of the noise in each band, \sigma_m.
This will be recognized as an approximation to the standard deviation
of the noise in that band. We then set the threshold to some multiple
of the standard deviation. Setting the threshold to 5 times \sigma_m
eliminates all noise, but will also eliminate the more quiet vocal sounds,
such as terminal sibilants. A threshold of 2.5\sigma_m gives a reasonable
trade-off between noise reduction and quality. 1.5\sigma was used in the
movie "Amadeus" to preserve the maximum performance nuance in the dialog,
giving only a slight but noticeable reduction in the noise.



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:31 EST