Skip to content

ScalerDBSmoothed

Discussion

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

The Scaler DB Smoothed module smoothly scales multichannel input data by a single gain value specified in dB by variable, gainDB. The module has one multichannel input pin and one output pin of the same dimensions as the input pin. gainDB is automatically converted to a linear value, gain. Changes to the gain parameter are exponentially smoothed (first order IIR) at the sample rate, with the time constant determined by the smoothingTime parameter.

Internally, currentGain represents the instantaneous smoothed gain that is applied. The variable currentGain exponentially approaches gain with a time constant equal to smoothingTime. currentGain also serves as the starting point of the module. If currentGain = gain then the module starts up in a converged state. If currentGain != gain then the module will smoothly vary the gain at startup.

Module Pack

Deprecated

ClassID

classID = 2037

Type Definition

typedef struct _ModuleScalerDBSmoothed
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 gainDB;                               // Gain in dB units.
FLOAT32 currentGain;                          // Instantaneous gain applied by the module. This is also the starting gain of the module.
FLOAT32 smoothingTime;                        // Time constant of the smoothing process.
FLOAT32 smoothingCoeff;                       // Smoothing coefficient.
FLOAT32 gain;                                 // Gain in linear units.
} ModuleScalerDBSmoothedClass;

Variables

Properties

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

Pins

Input Pins

Name in1
Description audio input
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out1
Description audio output
Data Type float

Matlab Usage

File Name: scaler_db_smoothed_module.m 
 M=scaler_db_smoothed_module(NAME,NUMPINS) 
 Creates a smoothed dB scaler for use in 
 the Audio Weaver environment. The module has a single multichannel input 
 and scales all channels by the same value. 

 Arguments: 
    NAME - name of the module. 
    NUMPINS - Optional: number of inputs. Default = 1 input, 1 output. 
       The ith input pin is then scaled and placed in the ith output 
       pin. In all cases, the same scale factor is applied to all values. 

Copyright (c) 2026 DSP Concepts, Inc.