Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
typedef struct _ModuleNoiseTracking
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 snrCtrlAttRelHoldCountnoiseAttRelHoldCount;                   // Hold time translated to the number of blocks.
    FLOAT32 snrCtrlAttRelAttCoeffnoiseAttRelAttCoeff;                  // Internal coefficient realizing the attack time.
    FLOAT32 snrCtrlAttRelRelCoeffnoiseAttRelRelCoeff;                  // Internal coefficient realizing the release time.
    INT32FLOAT32 snrAdjustAttRelHoldCountnoiseSofB0;               // Hold time translated to the number of blocks.    // FLOAT32Desired snrAdjustAttRelAttCoeff;first numerator coefficient.
    FLOAT32 noiseSofB1;      // Internal coefficient realizing the attack time.     FLOAT32 snrAdjustAttRelRelCoeff;         // Desired second numerator coefficient.
// Internal coefficient realizing theFLOAT32 releasenoiseSofA1; time.     INT32 snrAdjustAttRel2HoldCount;              //   Hold time translated to// theDesired numbersecond ofdenominator blockscoefficient.
    FLOAT32 snrAdjustAttRel2AttCoeffnoiseAdjustdB;             // Internal coefficient realizing the attack time.     FLOAT32// snrAdjustAttRel2RelCoeff;Noise level bias in dB.
    FLOAT32 noiseScaleOffGain;   // Internal coefficient realizing the release time.     FLOAT32 snrAdjustScaleOffOffset;              // Scale Offset linear offsetgain.
    INT32FLOAT32 snrAttRelHoldCountnoiseSmoothOctave;                     // 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 noiseAttRelHoldCountsnrCtrlAttRelHoldCount;                   // Hold time translated to the number of blocks.
    FLOAT32 noiseAttRelAttCoeffsnrCtrlAttRelAttCoeff;                  // Internal coefficient realizing the attack time.
    FLOAT32 noiseAttRelRelCoeffsnrCtrlAttRelRelCoeff;                  // Internal coefficient realizing the release time.
    FLOAT32INT32 noiseSofB0snrAdjustAttRelHoldCount;               // Hold time translated to the number of blocks.
   // DesiredFLOAT32 firstsnrAdjustAttRelAttCoeff; numerator coefficient.     FLOAT32 noiseSofB1;      // Internal coefficient realizing the attack time.
    FLOAT32 snrAdjustAttRelRelCoeff;         // Desired second numerator coefficient. // Internal coefficient realizing FLOAT32the noiseSofA1;release time.
    INT32 snrAdjustAttRel2HoldCount;              // Hold time translated to the //number Desired second denominator coefficientof blocks.
    FLOAT32 noiseAdjustdBsnrAdjustAttRel2AttCoeff;             // Internal coefficient realizing the attack time.
    FLOAT32  // Noise level bias in dB.
    FLOAT32 noiseScaleOffGain;snrAdjustAttRel2RelCoeff;             // Internal coefficient realizing the release time.
    FLOAT32 snrAdjustScaleOffOffset;              // Scale Offset linear gainoffset.
    FLOAT32 noiseSmoothOctavearaScaleOffOffset;                    // NumberScale of octaves for cross-bin logarithmic smoothingOffset offset.
    FLOAT32 araAlphaCalcUpScaleOff2Offset;        // Scale Offset offset.
    FLOAT32 araScaleOffOffsetnoiseFloordB;                    // Scale Offset offset.  // Noise floor FLOAT32 noiseFloordB;                         // Noise floor level 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 snrCtrlAttRelAttacknoiseAttRelAttack;                    // Attack time in ms.
    FLOAT32 snrCtrlAttRelReleasesnrSmoothingHoldTimeMsDef;            // SNR smoothing hold time // Release time default in ms.
    FLOAT32 snrCtrlAttRelHoldsnrSmoothingHoldTimeMsMaxDev;         // SNR smoothing hold time max deviation in ms.
  // Hold timeFLOAT32 insnrSmoothingReleaseTimeMsDef; ms.     FLOAT32 snrAdjustAttRelAttack;  // SNR smoothing release time default in ms.
    FLOAT32 snrSmoothingReleaseTimeMsMaxDev;      // SNR smoothing Attackrelease time max deviation in ms.
    FLOAT32 snrAdjustAttRelReleasesignalPathSmoothingHz;                // Release time Estimation-path smoothing low-pass-filter cutoff-frequency in msHz.
    FLOAT32 snrAdjustAttRelHoldnoiseSmoothStartFreq;                  // HoldStart frequency timefor incross-bin mssmoothing.
    FLOAT32 snrAdjustAttRel2AttacksnrAttRelAttack;                      // Attack time in ms.
    FLOAT32 snrAdjustAttRel2ReleasesnrAttRelRelease;                     // Release time in ms.
    FLOAT32 snrAdjustAttRel2HoldsnrAttRelHold;                        // Hold time in ms.
    FLOAT32 snrAdjustThreshdBnoiseSmoothWidth;                     // SNR adjustment threshold in dB Control-chain cross-bin linear-smoothing coefficient (fraction of sample rate).
    FLOAT32 snrAdjustClipAsymUppersnrSmoothStartFreq;                   // Asymmetric-clip upper limitStart frequency for cross-bin smoothing.
    FLOAT32 snrAttRelAttacknoiseStepUpdBDef;                      // Attack timeNoise step up default in msdB/s.
    FLOAT32 snrAttRelReleasenoiseStepUpdBMaxDev;                  // Noise step //up Releasemax timedeviation in msdB/s.
    FLOAT32 snrAttRelHoldnoiseStepDowndB;                        // HoldNoise step timedown in msdB/s.
    FLOAT32 noiseSmoothWidthsnrCtrlAttRelAttack;                     // Control-chain cross-bin linear-smoothing coefficient (fraction of sample rate)Attack time in ms.
    FLOAT32 snrSmoothStartFreqsnrCtrlAttRelRelease;                   // StartRelease frequencytime for cross-bin smoothingin ms.
    FLOAT32 noiseStepUpdBDefsnrCtrlAttRelHold;                     // NoiseHold steptime up default in dB/sms.
    FLOAT32 noiseStepUpdBMaxDevsnrAdjustAttRelAttack;                  // Noise step up max deviationAttack time in dB/sms.
    FLOAT32 noiseStepDowndBsnrAdjustAttRelRelease;                      // NoiseRelease steptime down in dB/sms.
    FLOAT32 noiseAttRelAttacksnrAdjustAttRelHold;                    // AttackHold time in ms.
    FLOAT32 snrSmoothingHoldTimeMsDefsnrAdjustAttRel2Attack;               // SNR smoothingAttack hold time default in ms.
    FLOAT32 snrSmoothingHoldTimeMsMaxDevsnrAdjustAttRel2Release;         //  SNR smoothing hold time// maxRelease deviationtime in ms.
    FLOAT32 snrSmoothingReleaseTimeMsDefsnrAdjustAttRel2Hold;                 // SNR smoothing releaseHold time default in ms.
    FLOAT32 snrSmoothingReleaseTimeMsMaxDevsnrAdjustThreshdB;                    // SNR smoothingadjustment release time max deviation threshold in msdB.
    FLOAT32 signalPathSmoothingHzsnrAdjustClipAsymUpper;                // EstimationAsymmetric-pathclip smoothing low-pass-filter cutoff-frequency in Hzupper limit.
    FLOAT32 noiseSmoothStartFreqalphaReleaseTimeMs;                   // Alpha Startdown frequencyrelease fortime cross-binin smoothingms.
    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 alphaReleaseTimeMsnoiseLevelInitdB;                     // AlphaInitial downnoise releaselevel timestate in msdB.
    FLOAT32INT32* noiseLevelInitdBaCtrlValues;                     // Initial noise level state in dB.// Array with ctrl  INT32* aCtrlValues;                           // Array with ctrl signal valuessignal values.
    FLOAT32* aSnrCtrlAttRelEnvStateaNoiseAttRelEnvState;                // Attack-release envelope state.
    FLOAT32INT32* aSnrCtrlAttRelHoldStateaNoiseAttRelHoldState;                 // Attack-release hold state.
    FLOAT32* aSnrCtrlAttRelFbaNoiseSofState;                      // Attack-releaseSOF outputfirst feedbackstate.
    FLOAT32INT32* aSnrNoiseTrackFbaNoiseSmoothStartIdx;                    // Control-path noise-tracking feedbackStarting index for the averaging process.
    FLOAT32INT32* aSnrNoiseLevelFbaNoiseSmoothEndIdx;                    // Control-path noise-level feedbackEnding index for the averaging process.
    FLOAT32* aSnrAdjustAttRelEnvStateaNoiseSmoothOneOverN;                // Attack-release envelope state Precomputed 1/N for averaging.
    FLOAT32* aSnrAdjustAttRelHoldStateaSnrNoiseTrackFb;           // Attack-release hold state.     FLOAT32* aSnrAdjustAttRel2EnvState;   // Control-path noise-tracking feedback.
    FLOAT32* aSnrNoiseLevelFb;  // Attack-release envelope state.     FLOAT32* aSnrAdjustAttRel2HoldState;          // AttackControl-releasepath holdnoise-level statefeedback.
    FLOAT32* aSnrAttRelEnvState;                  // Attack-release envelope state.
    FLOAT32INT32* 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* aNoiseAttRelEnvStateaSnrCtrlAttRelEnvState;                // Attack-release envelope state.
    FLOAT32INT32* aNoiseAttRelHoldStateaSnrCtrlAttRelHoldState;               // Attack-release hold state.
    FLOAT32* aNoiseSofStateaSnrCtrlAttRelFb;                      // SOFAttack-release firstoutput statefeedback.
    INT32FLOAT32* aNoiseSmoothStartIdxaSnrAdjustAttRelEnvState;            // Attack-release envelope state.
  // Starting index for the averaging process.INT32* aSnrAdjustAttRelHoldState;         INT32* aNoiseSmoothEndIdx;   // Attack-release hold state.
    FLOAT32* aSnrAdjustAttRel2EnvState;        // Ending index for the averaging process// Attack-release envelope state.
    FLOAT32INT32* aNoiseSmoothOneOverNaSnrAdjustAttRel2HoldState;                // Precomputed 1/N for averagingAttack-release hold state.
    FLOAT32* aAraFb;                              // ARA feedback line.
} ModuleNoiseTrackingClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

snrCtrlAttRelHoldCount

noiseAttRelHoldCount

int

derived

0

48

4800

Unrestricted

snrCtrlAttRelAttCoeff

noiseAttRelAttCoeff

float

derived

0

1

.7881e-07

Unrestricted

snrCtrlAttRelRelCoeff

noiseAttRelRelCoeff

float

derived

0

0

2.

010363

6047e-05

Unrestricted

snrAdjustAttRelHoldCount

noiseSofB0

int

float

derived

0

4800

0.00098079

Unrestricted

snrAdjustAttRelAttCoeff

noiseSofB1

float

derived

0

1

0.00098079

Unrestricted

snrAdjustAttRelRelCoeff

noiseSofA1

float

derived

0

4

0.

1664e-05

99804

Unrestricted

snrAdjustAttRel2HoldCount

noiseAdjustdB

int

float

derived

parameter

0

4800

Unrestricted

snrAdjustAttRel2AttCoeff

6

-24:24

dB

noiseScaleOffGain

float

derived

0

1

3.9811

Unrestricted

snrAdjustAttRel2RelCoeff

noiseSmoothOctave

float

derived

parameter

0

2

0.

0862e-06

Unrestricted

snrAdjustScaleOffOffset

float

derived

0

1

Unrestricted

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

1

0.00041667

Unrestricted

snrScaleOff2Offset

float

derived

0

-0.0020833

Unrestricted

noiseAttRelHoldCount

snrCtrlAttRelHoldCount

int

derived

0

1

48

Unrestricted

noiseAttRelAttCoeff

snrCtrlAttRelAttCoeff

float

derived

0

1.7881e-07

Unrestricted

noiseAttRelRelCoeff

snrCtrlAttRelRelCoeff

float

derived

0

0.010363

Unrestricted

noiseSofB0

snrAdjustAttRelHoldCount

float

int

derived

0

0.00098079

4800

Unrestricted

noiseSofB1

snrAdjustAttRelAttCoeff

float

derived

0

0.00098079

1

Unrestricted

noiseSofA1

snrAdjustAttRelRelCoeff

float

derived

0

0

4.

99804

1664e-05

Unrestricted

noiseAdjustdB

snrAdjustAttRel2HoldCount

float

int

parameter

derived

0

6

-24:24

dB

noiseScaleOffGain

4800

Unrestricted

snrAdjustAttRel2AttCoeff

float

derived

0

1

Unrestricted

noiseSmoothOctave

snrAdjustAttRel2RelCoeff

float

parameter

derived

0

0.1

0:1

araAlphaCalcUpScaleOff2Offset

2.0862e-06

Unrestricted

snrAdjustScaleOffOffset

float

derived

0

20

Unrestricted

araScaleOffOffset

float

derived

0

1

0.99979

Unrestricted

araScaleOffOffset

araAlphaCalcUpScaleOff2Offset

float

derived

0

0.

99979

99999

Unrestricted

noiseFloordB

float

parameter

0

-120

-150:0

dB

noiseFloorLinear

float

derived

0

1

1e-12

Unrestricted

trackingSpeed

float

parameter

0

1

0:2

sensitivity

float

parameter

0

1

0:2

enableControlInputs

int

const

1

0

Unrestricted

snrCtrlAttRelAttack

noiseAttRelAttack

float

const

1

100000

0

Unrestricted

snrCtrlAttRelRelease

snrSmoothingHoldTimeMsDef

float

const

1

2

100

Unrestricted

snrCtrlAttRelHold

snrSmoothingHoldTimeMsMaxDev

float

const

1

1

100

Unrestricted

snrAdjustAttRelAttack

snrSmoothingReleaseTimeMsDef

float

const

1

0

800

Unrestricted

snrAdjustAttRelRelease

snrSmoothingReleaseTimeMsMaxDev

float

const

1

500

Unrestricted

snrAdjustAttRelHold

signalPathSmoothingHz

float

const

1

100

15

Unrestricted

snrAdjustAttRel2Attack

noiseSmoothStartFreq

float

const

1

0

Unrestricted

snrAdjustAttRel2Release

snrAttRelAttack

float

const

1

10000

0

Unrestricted

snrAdjustAttRel2Hold

snrAttRelRelease

float

const

1

100

10

Unrestricted

snrAdjustThreshdB

snrAttRelHold

float

const

1

10

Unrestricted

snrAdjustClipAsymUpper

noiseSmoothWidth

float

const

1

0.25

Unrestricted

snrSmoothStartFreq

float

const

1

10

0

Unrestricted

snrAttRelAttack

noiseStepUpdBDef

float

const

1

0

20

Unrestricted

snrAttRelRelease

noiseStepUpdBMaxDev

float

const

1

10

Unrestricted

snrAttRelHold

noiseStepDowndB

float

const

1

10

-100

Unrestricted

noiseSmoothWidth

snrCtrlAttRelAttack

float

const

1

0.25

100000

Unrestricted

snrSmoothStartFreq

snrCtrlAttRelRelease

float

const

1

0

2

Unrestricted

noiseStepUpdBDef

snrCtrlAttRelHold

float

const

1

20

1

Unrestricted

noiseStepUpdBMaxDev

snrAdjustAttRelAttack

float

const

1

10

0

Unrestricted

noiseStepDowndB

snrAdjustAttRelRelease

float

const

1

-100

500

Unrestricted

noiseAttRelAttack

snrAdjustAttRelHold

float

const

1

0

100

Unrestricted

snrSmoothingHoldTimeMsDef

snrAdjustAttRel2Attack

float

const

1

100

0

Unrestricted

snrSmoothingHoldTimeMsMaxDev

snrAdjustAttRel2Release

float

const

1

100

10000

Unrestricted

snrSmoothingReleaseTimeMsDef

snrAdjustAttRel2Hold

float

const

1

800

100

Unrestricted

snrSmoothingReleaseTimeMsMaxDev

snrAdjustThreshdB

float

const

1

500

10

Unrestricted

signalPathSmoothingHz

snrAdjustClipAsymUpper

float

const

1

15

10

Unrestricted

noiseSmoothStartFreq

alphaReleaseTimeMs

float

const

1

0

100

Unrestricted

snrThreshdB

float

derived

1

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

alphaReleaseTimeMs

float

const

1

100

Unrestricted

noiseLevelInitdB

float

const

1

-50

Unrestricted

aCtrlValues

int*

state

1

[1 x

32

33]

Unrestricted

aSnrCtrlAttRelEnvState

aNoiseAttRelEnvState

float*

state

1

[1 x

32

33]

Unrestricted

aSnrCtrlAttRelHoldState

aNoiseAttRelHoldState

float

int*

state

1

[1 x

32

33]

Unrestricted

aSnrCtrlAttRelFb

aNoiseSofState

float*

state

1

[1 x

32

33]

Unrestricted

aSnrNoiseTrackFb

aNoiseSmoothStartIdx

float

int*

state

derived

1

[33 x 1

x 32

]

Unrestricted

aSnrNoiseLevelFb

aNoiseSmoothEndIdx

float

int*

state

derived

1

[33 x 1

x 32

]

Unrestricted

aSnrAdjustAttRelEnvState

aNoiseSmoothOneOverN

float*

state

derived

1

[33 x 1

x 32

]

Unrestricted

aSnrAdjustAttRelHoldState

aSnrNoiseTrackFb

float*

state

1

[1 x

32

33]

Unrestricted

aSnrAdjustAttRel2EnvState

aSnrNoiseLevelFb

float*

state

1

[1 x

32

33]

Unrestricted

aSnrAdjustAttRel2HoldState

aSnrAttRelEnvState

float*

state

1

[1 x

32

33]

Unrestricted

aSnrAttRelEnvState

aSnrAttRelHoldState

float

int*

state

1

[1 x

32

33]

Unrestricted

aSnrAttRelHoldState

aSnrSmoothStartIdx

float

int*

state

1

[33 x 1

x 32

]

Unrestricted

aSnrSmoothStartIdx

aSnrSmoothEndIdx

int*

state

1

[

32

33 x 1]

Unrestricted

aSnrSmoothEndIdx

aSnrSmoothOneOverN

int

float*

state

1

[

32

33 x 1]

Unrestricted

aSnrSmoothOneOverN

aSnrCtrlAttRelEnvState

float*

state

1

[

32

1 x

1

33]

Unrestricted

aNoiseAttRelEnvState

aSnrCtrlAttRelHoldState

float

int*

state

1

[1 x

32

33]

Unrestricted

aNoiseAttRelHoldState

aSnrCtrlAttRelFb

float*

state

1

[1 x

32

33]

Unrestricted

aNoiseSofState

aSnrAdjustAttRelEnvState

float*

state

1

[1 x

32

33]

Unrestricted

aNoiseSmoothStartIdx

aSnrAdjustAttRelHoldState

int*

derived

state

1

[

32

1 x

1

33]

Unrestricted

aNoiseSmoothEndIdx

aSnrAdjustAttRel2EnvState

int

float*

derived

state

1

[

32

1 x

1

33]

Unrestricted

aNoiseSmoothOneOverN

aSnrAdjustAttRel2HoldState

float

int*

derived

state

1

[

32

1 x

1

33]

Unrestricted

aAraFb

float*

state

1

[1 x

32

33]

Unrestricted

Pins

Input Pins

Name: sig

Description: Audio inputs

...

Complex support: Real

Output Pins

Name: outlevel

Description: Output signal

...

Channel count: 1

Block size: 3334

Sample rate: 48000

Channel count: 1

Block size: 3233

Sample rate: 48000

MATLAB Usage

...

Code Block
 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.