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.
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 ScalerDBSmoothedFract32 module instead.
Type Definition
Code Block |
---|
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
...
Complex support: Real and Complex
Output Pins
Name: out1
Description: Output signal
Data type: fract32
MATLAB Usage
File Name: scaler_db_fract32_module.m
...