Skip to main content
Skip table of contents

NoiseTracking

Overview

DSP Concepts proprietary single-channel Noise Tracking.

Discussion

This module estimates the stationary-noise level of its incoming signal. It is part of the SCNRv4 design, but can be used independently.

The module works in conjunction with the WOLA filterbank modules.

The input pin expects the squared-magnitude of the WOLA-domain noisy signal, while the output pin provides the noise-level estimate in dBs.

The module is single channel, expects real data, and operates on any block size and any sampling rate.

At design time, the initial noise estimate must be set using noiseLevelInitdB.

The noiseAdjustdB parameter is an offset which is added to the estimated noise dB-level. The stationary noise-floor estimation is prone to be lower than the actual noise level. By setting noiseAdjustdB to a positive number, the algorithm will bias the estimated level to be higher.

The estimated level is smoothed out using cross-bin averaging in logarithmic groupings. The noiseSmoothOctave parameter defines how many octaves the averaging should span. Smoothing can be disabled by setting noiseSmoothOctave to 0.

The noise floor (minimum noise-estimate) can be set via noiseFloordB.

The trackingSpeed parameter controls the tracking speed of the algorithm. It can take values between 0 (low speed) and 2 (high speed), with a default value of 1.

The sensitivity parameter controls the sensitivity of the algorithm to small level fluctuations. It affects the estimation bias, but also the overall tracking speed of the algorithm. It is recommended using all 3 parameters (sensitivity, trackingSpeed and noiseAdjustdB) to achieve the desired behaviour. It takes values between 0 (low sensitivity) and 2 (high sensitivity), with a default value of 1.

The module has 2 extra optional inputs:

The ctrlUp and ctrlDown inputs have the same attributes (block size and sample rate) as the noisy signal. They should be valued 0 or 1 only. These are used to freeze the noise trackers on the way up or down, respectively. A value of 1 means adapt, while a value of 0 means freeze.

Type Definition

CODE
typedef struct _ModuleNoiseTracking
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 noiseAttRelHoldCount;                   // Hold time translated to the number of blocks.
    FLOAT32 noiseAttRelAttCoeff;                  // Internal coefficient realizing the attack time.
    FLOAT32 noiseAttRelRelCoeff;                  // Internal coefficient realizing the release time.
    FLOAT32 noiseSofB0;                           // Desired first numerator coefficient.
    FLOAT32 noiseSofB1;                           // Desired second numerator coefficient.
    FLOAT32 noiseSofA1;                           // Desired second denominator coefficient.
    FLOAT32 noiseAdjustdB;                        // Noise level bias in dB.
    FLOAT32 noiseScaleOffGain;                    // Scale Offset linear gain.
    FLOAT32 noiseSmoothOctave;                    // Number of octaves for cross-bin logarithmic smoothing.
    INT32 snrAttRelHoldCount;                     // Hold time translated to the number of blocks.
    FLOAT32 snrAttRelAttCoeff;                    // Internal coefficient realizing the attack time.
    FLOAT32 snrAttRelRelCoeff;                    // Internal coefficient realizing the release time.
    FLOAT32 snrScaleOff1Offset;                   // Scale Offset offset.
    FLOAT32 snrScaleOff2Offset;                   // Scale Offset offset.
    INT32 snrCtrlAttRelHoldCount;                 // Hold time translated to the number of blocks.
    FLOAT32 snrCtrlAttRelAttCoeff;                // Internal coefficient realizing the attack time.
    FLOAT32 snrCtrlAttRelRelCoeff;                // Internal coefficient realizing the release time.
    INT32 snrAdjustAttRelHoldCount;               // Hold time translated to the number of blocks.
    FLOAT32 snrAdjustAttRelAttCoeff;              // Internal coefficient realizing the attack time.
    FLOAT32 snrAdjustAttRelRelCoeff;              // Internal coefficient realizing the release time.
    INT32 snrAdjustAttRel2HoldCount;              // Hold time translated to the number of blocks.
    FLOAT32 snrAdjustAttRel2AttCoeff;             // Internal coefficient realizing the attack time.
    FLOAT32 snrAdjustAttRel2RelCoeff;             // Internal coefficient realizing the release time.
    FLOAT32 snrAdjustScaleOffOffset;              // Scale Offset offset.
    FLOAT32 araScaleOffOffset;                    // Scale Offset offset.
    FLOAT32 araAlphaCalcUpScaleOff2Offset;        // Scale Offset offset.
    FLOAT32 noiseFloordB;                         // Noise floor level in dB.
    FLOAT32 noiseFloorLinear;                     // Noise floor level linear.
    FLOAT32 trackingSpeed;                        // Noise-tracking speed.
    FLOAT32 sensitivity;                          // Sensitivity to small-level fluctuations.
    INT32 enableControlInputs;                    // Tracker for input control pins enable
    FLOAT32 noiseAttRelAttack;                    // Attack time in ms.
    FLOAT32 snrSmoothingHoldTimeMsDef;            // SNR smoothing hold time default in ms.
    FLOAT32 snrSmoothingHoldTimeMsMaxDev;         // SNR smoothing hold time max deviation in ms.
    FLOAT32 snrSmoothingReleaseTimeMsDef;         // SNR smoothing release time default in ms.
    FLOAT32 snrSmoothingReleaseTimeMsMaxDev;      // SNR smoothing release time max deviation in ms.
    FLOAT32 signalPathSmoothingHz;                // Estimation-path smoothing low-pass-filter cutoff-frequency in Hz.
    FLOAT32 noiseSmoothStartFreq;                 // Start frequency for cross-bin smoothing.
    FLOAT32 snrAttRelAttack;                      // Attack time in ms.
    FLOAT32 snrAttRelRelease;                     // Release time in ms.
    FLOAT32 snrAttRelHold;                        // Hold time in ms.
    FLOAT32 noiseSmoothWidth;                     // Control-chain cross-bin linear-smoothing coefficient (fraction of sample rate).
    FLOAT32 snrSmoothStartFreq;                   // Start frequency for cross-bin smoothing.
    FLOAT32 noiseStepUpdBDef;                     // Noise step up default in dB/s.
    FLOAT32 noiseStepUpdBMaxDev;                  // Noise step up max deviation in dB/s.
    FLOAT32 noiseStepDowndB;                      // Noise step down in dB/s.
    FLOAT32 snrCtrlAttRelAttack;                  // Attack time in ms.
    FLOAT32 snrCtrlAttRelRelease;                 // Release time in ms.
    FLOAT32 snrCtrlAttRelHold;                    // Hold time in ms.
    FLOAT32 snrAdjustAttRelAttack;                // Attack time in ms.
    FLOAT32 snrAdjustAttRelRelease;               // Release time in ms.
    FLOAT32 snrAdjustAttRelHold;                  // Hold time in ms.
    FLOAT32 snrAdjustAttRel2Attack;               // Attack time in ms.
    FLOAT32 snrAdjustAttRel2Release;              // Release time in ms.
    FLOAT32 snrAdjustAttRel2Hold;                 // Hold time in ms.
    FLOAT32 snrAdjustThreshdB;                    // SNR adjustment threshold in dB.
    FLOAT32 snrAdjustClipAsymUpper;               // Asymmetric-clip upper limit.
    FLOAT32 alphaReleaseTimeMs;                   // Alpha down release time in ms.
    FLOAT32 snrThreshdB;                          // SNR threshold in dB.
    FLOAT32 snrThreshdBDef;                       // SNR threshold default in dB.
    FLOAT32 snrThreshdBMaxDev;                    // SNR threshold max deviation in dB.
    FLOAT32 alphaAttackTimeMsDef;                 // Alpha up (raw) attack time default in ms.
    FLOAT32 alphaAttackTimeMsMaxDev;              // Alpha up (raw) attack time max deviation in ms.
    FLOAT32 logisticOffset;                       // Logistic function offset.
    FLOAT32 logisticSlope;                        // Logistic function gain.
    FLOAT32 noiseLevelInitdB;                     // Initial noise level state in dB.
    INT32* aCtrlValues;                           // Array with ctrl signal values.
    FLOAT32* aNoiseAttRelEnvState;                // Attack-release envelope state.
    INT32* aNoiseAttRelHoldState;                 // Attack-release hold state.
    FLOAT32* aNoiseSofState;                      // SOF first state.
    INT32* aNoiseSmoothStartIdx;                  // Starting index for the averaging process.
    INT32* aNoiseSmoothEndIdx;                    // Ending index for the averaging process.
    FLOAT32* aNoiseSmoothOneOverN;                // Precomputed 1/N for averaging.
    FLOAT32* aSnrNoiseTrackFb;                    // Control-path noise-tracking feedback.
    FLOAT32* aSnrNoiseLevelFb;                    // Control-path noise-level feedback.
    FLOAT32* aSnrAttRelEnvState;                  // Attack-release envelope state.
    INT32* aSnrAttRelHoldState;                   // Attack-release hold state.
    INT32* aSnrSmoothStartIdx;                    // Starting index for the averaging process.
    INT32* aSnrSmoothEndIdx;                      // Ending index for the averaging process.
    FLOAT32* aSnrSmoothOneOverN;                  // Precomputed 1/N for averaging.
    FLOAT32* aSnrCtrlAttRelEnvState;              // Attack-release envelope state.
    INT32* aSnrCtrlAttRelHoldState;               // Attack-release hold state.
    FLOAT32* aSnrCtrlAttRelFb;                    // Attack-release output feedback.
    FLOAT32* aSnrAdjustAttRelEnvState;            // Attack-release envelope state.
    INT32* aSnrAdjustAttRelHoldState;             // Attack-release hold state.
    FLOAT32* aSnrAdjustAttRel2EnvState;           // Attack-release envelope state.
    INT32* aSnrAdjustAttRel2HoldState;            // Attack-release hold state.
    FLOAT32* aAraFb;                              // ARA feedback line.
} ModuleNoiseTrackingClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

noiseAttRelHoldCount

int

derived

0

4800

Unrestricted

noiseAttRelAttCoeff

float

derived

0

1

Unrestricted

noiseAttRelRelCoeff

float

derived

0

2.6047e-05

Unrestricted

noiseSofB0

float

derived

0

0.00098079

Unrestricted

noiseSofB1

float

derived

0

0.00098079

Unrestricted

noiseSofA1

float

derived

0

0.99804

Unrestricted

noiseAdjustdB

float

parameter

0

6

-24:24

dB

noiseScaleOffGain

float

derived

0

3.9811

Unrestricted

noiseSmoothOctave

float

parameter

0

0.1

0:1

snrAttRelHoldCount

int

derived

0

480

Unrestricted

snrAttRelAttCoeff

float

derived

0

1

Unrestricted

snrAttRelRelCoeff

float

derived

0

0.0020812

Unrestricted

snrScaleOff1Offset

float

derived

0

0.00041667

Unrestricted

snrScaleOff2Offset

float

derived

0

-0.0020833

Unrestricted

snrCtrlAttRelHoldCount

int

derived

0

48

Unrestricted

snrCtrlAttRelAttCoeff

float

derived

0

1.7881e-07

Unrestricted

snrCtrlAttRelRelCoeff

float

derived

0

0.010363

Unrestricted

snrAdjustAttRelHoldCount

int

derived

0

4800

Unrestricted

snrAdjustAttRelAttCoeff

float

derived

0

1

Unrestricted

snrAdjustAttRelRelCoeff

float

derived

0

4.1664e-05

Unrestricted

snrAdjustAttRel2HoldCount

int

derived

0

4800

Unrestricted

snrAdjustAttRel2AttCoeff

float

derived

0

1

Unrestricted

snrAdjustAttRel2RelCoeff

float

derived

0

2.0862e-06

Unrestricted

snrAdjustScaleOffOffset

float

derived

0

20

Unrestricted

araScaleOffOffset

float

derived

0

0.99979

Unrestricted

araAlphaCalcUpScaleOff2Offset

float

derived

0

0.99999

Unrestricted

noiseFloordB

float

parameter

0

-120

-150:0

dB

noiseFloorLinear

float

derived

0

1e-12

Unrestricted

trackingSpeed

float

parameter

0

1

0:2

sensitivity

float

parameter

0

1

0:2

enableControlInputs

int

const

1

0

Unrestricted

noiseAttRelAttack

float

const

1

0

Unrestricted

snrSmoothingHoldTimeMsDef

float

const

1

100

Unrestricted

snrSmoothingHoldTimeMsMaxDev

float

const

1

100

Unrestricted

snrSmoothingReleaseTimeMsDef

float

const

1

800

Unrestricted

snrSmoothingReleaseTimeMsMaxDev

float

const

1

500

Unrestricted

signalPathSmoothingHz

float

const

1

15

Unrestricted

noiseSmoothStartFreq

float

const

1

0

Unrestricted

snrAttRelAttack

float

const

1

0

Unrestricted

snrAttRelRelease

float

const

1

10

Unrestricted

snrAttRelHold

float

const

1

10

Unrestricted

noiseSmoothWidth

float

const

1

0.25

Unrestricted

snrSmoothStartFreq

float

const

1

0

Unrestricted

noiseStepUpdBDef

float

const

1

20

Unrestricted

noiseStepUpdBMaxDev

float

const

1

10

Unrestricted

noiseStepDowndB

float

const

1

-100

Unrestricted

snrCtrlAttRelAttack

float

const

1

100000

Unrestricted

snrCtrlAttRelRelease

float

const

1

2

Unrestricted

snrCtrlAttRelHold

float

const

1

1

Unrestricted

snrAdjustAttRelAttack

float

const

1

0

Unrestricted

snrAdjustAttRelRelease

float

const

1

500

Unrestricted

snrAdjustAttRelHold

float

const

1

100

Unrestricted

snrAdjustAttRel2Attack

float

const

1

0

Unrestricted

snrAdjustAttRel2Release

float

const

1

10000

Unrestricted

snrAdjustAttRel2Hold

float

const

1

100

Unrestricted

snrAdjustThreshdB

float

const

1

10

Unrestricted

snrAdjustClipAsymUpper

float

const

1

10

Unrestricted

alphaReleaseTimeMs

float

const

1

100

Unrestricted

snrThreshdB

float

derived

1

30

Unrestricted

snrThreshdBDef

float

const

1

30

Unrestricted

snrThreshdBMaxDev

float

const

1

5

Unrestricted

alphaAttackTimeMsDef

float

const

1

1700

Unrestricted

alphaAttackTimeMsMaxDev

float

const

1

1000

Unrestricted

logisticOffset

float

const

1

0

Unrestricted

logisticSlope

float

const

1

100

Unrestricted

noiseLevelInitdB

float

const

1

-50

Unrestricted

aCtrlValues

int*

state

1

[1 x 33]

Unrestricted

aNoiseAttRelEnvState

float*

state

1

[1 x 33]

Unrestricted

aNoiseAttRelHoldState

int*

state

1

[1 x 33]

Unrestricted

aNoiseSofState

float*

state

1

[1 x 33]

Unrestricted

aNoiseSmoothStartIdx

int*

derived

1

[33 x 1]

Unrestricted

aNoiseSmoothEndIdx

int*

derived

1

[33 x 1]

Unrestricted

aNoiseSmoothOneOverN

float*

derived

1

[33 x 1]

Unrestricted

aSnrNoiseTrackFb

float*

state

1

[1 x 33]

Unrestricted

aSnrNoiseLevelFb

float*

state

1

[1 x 33]

Unrestricted

aSnrAttRelEnvState

float*

state

1

[1 x 33]

Unrestricted

aSnrAttRelHoldState

int*

state

1

[1 x 33]

Unrestricted

aSnrSmoothStartIdx

int*

state

1

[33 x 1]

Unrestricted

aSnrSmoothEndIdx

int*

state

1

[33 x 1]

Unrestricted

aSnrSmoothOneOverN

float*

state

1

[33 x 1]

Unrestricted

aSnrCtrlAttRelEnvState

float*

state

1

[1 x 33]

Unrestricted

aSnrCtrlAttRelHoldState

int*

state

1

[1 x 33]

Unrestricted

aSnrCtrlAttRelFb

float*

state

1

[1 x 33]

Unrestricted

aSnrAdjustAttRelEnvState

float*

state

1

[1 x 33]

Unrestricted

aSnrAdjustAttRelHoldState

int*

state

1

[1 x 33]

Unrestricted

aSnrAdjustAttRel2EnvState

float*

state

1

[1 x 33]

Unrestricted

aSnrAdjustAttRel2HoldState

int*

state

1

[1 x 33]

Unrestricted

aAraFb

float*

state

1

[1 x 33]

Unrestricted

Pins

Input Pins

Name: sig

Description: Audio inputs

Data type: float

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: level

Description: Output signal

Data type: float

Scratch Pins

Channel count: 1

Block size: 34

Sample rate: 48000

Channel count: 1

Block size: 33

Sample rate: 48000

MATLAB Usage

File Name: noise_tracking_module.m

CODE
 M = noise_tracking_module(NAME)
 Single-channel stationary-noise tracker. This module estimates
 stationary-noise levels per subband. Part of the SCNRv4 design.
 Arguments:
 NAME - name of the module.
 CTRL_PINS_ENABLE - creates pins for up-down-tracking control.
 NOISE_LEVEL_INIT - sets initial noise-level estimate.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.