README

Build status

This is a LADSPA high quality noise reduction plug-in. It can be used by any LADSPA-enabled audio processing application. It is able to remove most types of continuous noise from audio signals, including blue, white, pink and brown noise.

License

This plug-in is copyright ⓒ2011-2018 Jérôme M. Berger and released under the terms of the GNU LGPLv2.1. You should have found a copy of the license along with this plug-in, or you can find it here.

Parameters

The plug-in exposes the following parameters:

Note: The automatic noise model is pretty conservative and tends to underestimate the noise level. Don't hesitate to increase the reduction amount when the automatic model is enabled (increasing the amount by 4dB is reasonable in this situation).

Noise model

The filter relies on a simple noise model to determine which part of the signal is noise and which part is legitimate signal. The noise model assumes that noise will have level $l_n(f)$ in dB at frequency $f$ with:

$$ln(f)=L-shape\times\log\left(\frac{f}{f0}\right)$$

where:

Standard noise shapes

Real-time use

The plug-in is real-time compatible provided that the Filter length parameter does not change.

Technical details

The plug-in assumes that any frequency whose level is significantly greater than the modelled noise level is mostly signal and should be preserved. Conversely, any frequency whose level is close to or lower than the modelled noise level is mostly noise and should be removed. Therefore the plug-in builds a dynamic equalisation filter whose frequency response depends on the input at any given point in time.

Filter response

The ideal frequency response is given by:

$$g(f)=1-e^{-\frac{l(f)}{s(f)}}$$

where $l(f)$ is the input level at frequency $f$ and $s(f)$ is the filter strength at that same frequency. This gives a response of 1 for large input levels, which are mostly signal, and a value of 0 for small input levels, which are mostly noise.

The strength $s(f)$ is computed from the modelled noise level $l_n(f)$ and the desired reduction amount $a$ in such a way that the response will be equal to $a$ if the measured level is equal to the modelled noise level:

$$1-e^{-\frac{l_n(f)}{s(f)}}=a$$

solving for $s(f)$ gives:

$$s(f)=-\frac{l_n(f)}{\ln(1-a)}$$

This ideal response is then dilated by an amount $\delta_f$ that depends on the filter length. This dilation ensures that narrow-band signals will be preserved by the windowing. As an unfortunate side-effect this also preserves noise at frequencies close to the signal. However this is not an issue in practise because psycho-acoustic effects mean that the signal will mask most of the preserved noise. The dilated response is given by:

$$gd(f)=\max{|\phi-f|<\delta_f}g(\phi)$$

Finally the dilated response is windowed in order to avoid the Gibbs phenomenon.

Application on overlapped windows

In order to apply the filter, the input signal is divided in windows of size twice the filter length (rounded up to the next power of two). Each window is then analysed to create the equalisation filter and this filter is applied to the signal. In fast mode each window is overlapped by half its length with the previous one. In standard mode, four windows are overlapped. In either case, the outputs are mixed to ensure a smooth transition between equalisation filters.

Automatic noise model

When using the automatic noise model, each window is analysed to guess the noise level and noise shape. The analysis is a two steps process:

Rough noise model

In order to create the rough noise model, the plugin looks at local minimas of the spectrum, i.e. frequency bands whose amplitude is less than the immediately preceding and following bands. Those frequency bands are assumed to be mostly noise and so suitable for building our noise model. The plugin searches for two such bands, one at the low end of the spectrum ($l(fl)$) and the other at the high end of the spectrum ($l(fh)$), then builds the rough noise model from those two bands:

$$l^{(r)}n(f)=\frac{l(fh)-l(fl)}{log(fh)-log(fl)}(log(f)-log(fl))+l(f_l)$$

In order to increase robustness of the model, the plugin looks at the first three local minimas at the low end of the spectrum, and at the last three local minimas at the high end of the spectrum and keeps the band with the middle level in each group of three.

Refined noise model

The refined model is created through linear regression of the spectrum in the loglog domain, keeping only the frequency bands such that $l(f)