Skip to main content
Skip table of contents

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.

Type Definition

CODE
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

CODE
 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)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.