...
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 |
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 |
4800
Unrestricted
6 | -24:24 | dB | |
noiseScaleOffGain | float | derived | 0 |
3.9811 | Unrestricted |
noiseSmoothOctave | float |
parameter | 0 |
0. |
Unrestricted
snrAdjustScaleOffOffset
float
derived
0
1
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 |
6
-24:24
dB
noiseScaleOffGain
4800 | Unrestricted | ||||
snrAdjustAttRel2AttCoeff | float | derived | 0 | 1 | Unrestricted |
snrAdjustAttRel2RelCoeff | float |
derived | 0 |
0.1
0:1
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
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
...
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. |