Overview
DSP Concepts proprietary Single-Channel Noise Reduction Gain Calculator. For version 4
Discussion
This module calculates gain coefficients for single-channel noise reduction. It is part of the SCNRv4 design.
...
The timeAlphaPrioriMs parameter controls the recursive averaging parameter in the SNR calculation. The default value is 250ms. Higher values mean more smoothing, resulting in a lower risk of musical noise, but a higher risk of distorting onset transients.
Type Definition
Code Block |
---|
typedef struct _ModuleSCNRv4GainCalculator { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 prioriSnrScaler1Gain; // Scaler gain. FLOAT32 prioriSnrScaler2Gain; // Scaler gain. FLOAT32 timeAlphaPrioriMs; // Averaging time for a-priori SNR computation, in ms. FLOAT32 minGaindB; // Minimum gain (maximum reduction) per subband, in dB. FLOAT32 smoothOctave; // Number of octaves for cross-bin logarithmic smoothing. FLOAT32 postSnrClipAsymUpper; // Asymmetric-clip upper limit. FLOAT32 prioriSnrClipAsymUpper; // Asymmetric-clip upper limit. FLOAT32 gainCalcLogScaleGain; // Scale Offset gain. FLOAT32 smoothStartFreq; // Start frequency for cross-bin smoothing. FLOAT32* aAPrioriFb; // A-priori SNR estimation feedback line. FLOAT32* aPrioriSnrDelay; // Block Delay single-block delay buffer. INT32* aSmoothStartIdx; // Starting index for the averaging process. INT32* aSmoothEndIdx; // Ending index for the averaging process. FLOAT32* aSmoothOneOverN; // Precomputed 1/N for averaging. } ModuleSCNRv4GainCalculatorClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
prioriSnrScaler1Gain | float | derived | 0 | 1 | Unrestricted | |
prioriSnrScaler2Gain | float | derived | 0 | 1 | Unrestricted | |
timeAlphaPrioriMs | float | parameter | 0 | 250 | 0:1000000 | ms |
minGaindB | float | parameter | 0 | -12 | -30:0 | dB |
smoothOctave | float | parameter | 0 | 0.1 | 0:1 | |
postSnrClipAsymUpper | float | const | 1 | 1000000 | Unrestricted | |
prioriSnrClipAsymUpper | float | const | 1 | 10000 | Unrestricted | |
gainCalcLogScaleGain | float | const | 1 | 0.033333 | Unrestricted | |
smoothStartFreq | float | const | 1 | 0 | Unrestricted | |
aAPrioriFb | float* | state | 1 | [1 x 32] | Unrestricted | |
aPrioriSnrDelay | float* | state | 1 | [1 x 32] | Unrestricted | |
aSmoothStartIdx | int* | derived | 1 | [32 x 1] | Unrestricted | |
aSmoothEndIdx | int* | derived | 1 | [32 x 1] | Unrestricted | |
aSmoothOneOverN | float* | derived | 1 | [32 x 1] | Unrestricted |
Pins
Input Pins
Name: Yk
Description: Input signal power
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: float
Scratch Pins
Channel count: 1
Block size: 33
Sample rate: 48000
MATLAB Usage
File Name: scnrv4_gain_calculator_module.m
...