ScalerSmoothed
Discussion
THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE ScalerV2 MODULE INSTEAD.
The Scaler Smoothed module smoothly scales multichannel input data by a single gain value. The module has one multichannel input pin and one output pin of the same dimensions as the input pin. 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 = 2039
Type Definition
typedef struct _ModuleScalerSmoothed
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 gain; // Gain in linear units.
FLOAT32 smoothingTime; // Time constant of the smoothing process.
FLOAT32 currentGain; // Instantaneous gain applied by the module. This is also the starting gain of the module.
FLOAT32 smoothingCoeff; // Smoothing coefficient.
} ModuleScalerSmoothedClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| gain | float | parameter | 0 | 1 | -10:10 | linear |
| smoothingTime | float | parameter | 0 | 10 | 0:1000 | msec |
| currentGain | float | state | 1 | 1 | -10:10 | linear |
| smoothingCoeff | float | derived | 1 | 0.002081 | Unrestricted |
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_smoothed_module.m
M=scaler_smoothed_module(NAME,NUMPINS)
Creates a smoothed linear scaler for use
with the Audio Weaver environment. The scaler 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.