Skip to content

Scaler

Discussion

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

The Scaler module scales multichannel signals by a single gain value. By default, the module has a 1 input and 1 output pin.

The module can also be configured for an arbitrary number of input and output pins. In this case, the ith input pin is scaled and copied to the ith output pin. The same scale factor is used in all cases and the dimensions and sample rate of each signal can be arbitrary.

Note that the module is not smoothly varying. If you update the gain value, you may introduce an audible click. For clickless operation, use the ScalerSmoothed module instead.

Module Pack

Deprecated

ClassID

classID = 2038

Type Definition

typedef struct _ModuleScaler
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 gain;                                 // Gain in linear units.
} ModuleScalerClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
gain float parameter 0 1 -10:10 linear

Pins

Input Pins

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

Output Pins

Name out1
Description Output signal
Data Type float

Matlab Usage

File Name: scaler_module.m 
 M=scaler_module(NAME, NUMPINS)  
 Creates a 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.