Skip to content

ScalerDBFract32

Overview

DB Fract32 multichannel scaler

Discussion

The Scaler DB module scales multichannel signals by a single gain value specified in dB, gainDB. gainDB is automatically converted to a linear value: gain. Internally gain is the gain actually applied to the signal. The module has 1 input pin and 1 output pin of the same dimension as the input.

The module is not smoothly varying, and the gain value is applied to both the real and imaginary parts. If you update the gain value, you may introduce an audible click. For clickless operation, use the ScalerDBSmoothedFract32 module instead, which does not work with complex data.

Module Pack

Standard

ClassID

classID = 185

Type Definition

typedef struct _ModuleScalerDBFract32
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 gainDB;                               // Gain in DB
fract32 gainFract32;                          // Gain in fract32 linear units
INT32 shift;                                  // Number of bits to shift
} ModuleScalerDBFract32Class;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
gainDB float parameter 0 0 -40:0.1:20 dB
gainFract32 fract32 derived 1 0.5 Unrestricted linear
shift int derived 1 1 Unrestricted

Pins

Input Pins

Name in1
Description Input signal
Data type fract32
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 fract32

Matlab Usage

File Name: scaler_db_fract32_module.m 
 M=scaler_db_fract32_module(NAME, NUMPINS) 
 Creates a DB scaler for use with the Audio Weaver.  The scaler 
 has a single multichannel input and scales all channels by the same 
 value.  Arguments: 
    NAME - name of the module. 
    NUMPINS - number of input pins (optional) 

Copyright (c) 2026 DSP Concepts, Inc.