ScalerNFract32
Overview
Linear scaler Fract32 with independent gains
Discussion
Multichannel scaler, where each input channel has its own individual gain value. The gain parameter consists of an array of gains, one per input/output channel.
Note that this module does not do smoothing. Changes to gains may introduce audible clicks. ScalerNSmoothedFract32 module is a smoothed version of this module.
Module Pack
Standard
ClassID
classID = 190
Type Definition
typedef struct _ModuleScalerNFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 shift; // Number of bits to shift
FLOAT32* gain; // Array of gains, one per channel
fract32* gainFract32; // Array of gains, one per channel in fract32 format
} ModuleScalerNFract32Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| shift | int | derived | 1 | 1 | Unrestricted | |
| gain | float* | parameter | 0 | [1 x 1] | -10:10 | linear |
| gainFract32 | fract32* | derived | 0 | [1 x 1] | Unrestricted |
Pins
Input Pins
| Name | in |
| Description | Input signal |
| Data type | fract32 |
| Channel range | 1 |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | Output signal |
| Data Type | fract32 |
Matlab Usage
File Name: scalern_fract32_module.m
M=scalern_fract32_module(NAME,NUMCHANNELS)
Multichannel scaler module with individual control of gains in
each channel. Arguments:
NAME - name of the module.
NUMCHANNELS - number of channels (optional)
Copyright (c) 2026 DSP Concepts, Inc.