Skip to content

ScalerNDBSmoothed

Discussion

THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE ScalerNV2 MODULE INSTEAD.

Multichannel scaler, where each input channel has its own individual smoothly varying gain value. The gain parameter consists of an array of gains, one per input/output channel with units of dB. All gain parameters are exponentially smoothed (first order IIR) at the sample rate, with the smoothingTime parameter determining the smoothing rate for all of the gain values.

Module Pack

Deprecated

ClassID

classID = 2040

Type Definition

typedef struct _ModuleScalerNDBSmoothed
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 smoothingTime;                        // Time constant of the smoothing process, in msec.
FLOAT32 smoothingCoeff;                       // Smoothing coefficient.
FLOAT32* gainDB;                              // Array of gains, one per channel.  In dB units.
FLOAT32* gain;                                // Linear equivalent of gainDB.
FLOAT32* currentGain;                         // Array of instantaneous gains, one per channel, in linear units.
} ModuleScalerNDBSmoothedClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
smoothingTime float parameter 0 10 0:1000 msec
smoothingCoeff float derived 1 0.002081 Unrestricted
gainDB float* parameter 0 [1 x 1] -40:0.1:20 dB
gain float* derived 1 [1 x 1] Unrestricted
currentGain float* state 1 [1 x 1] Unrestricted

Pins

Input Pins

Name in
Description Input signal
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description Output signal
Data Type float

Matlab Usage

File Name: scalern_db_smoothed_module.m 
 M=scalern_db_smoothed_module(NAME, NUMCHANS) 
 Multichannel scaler module with individual smoothly varying gains in each 
 channel. The gain controls are in dB units.   

 Arguments: 
    NAME - name of the module. 
    NUMCHANS - Optional: number of channels. Normally determined 
             during pin propagation  

Copyright (c) 2026 DSP Concepts, Inc.