Overview
Smooth scaler in which the gain (in linear units) is taken from an input pin
Discussion
The Scaler Control module smoothly scales multichannel input data by a single gain value. The first pin is the control pin. The gain (in linear units) value is provided at the first sample of the first pin. So the module has N+1 number of input pins and N number of output pins Internally, currentGain represents the instantaneous smoothed gain that is applied. currentGain exponentially approaches gain with a time constant equal to smoothingTime.
Type Definition
Code Block |
---|
typedef struct _ModuleScalerControl { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 smoothingTime; // Time constant of the smoothing process FLOAT32 currentGain; // Instantaneous gain applied by the module. FLOAT32 smoothingCoeff; // Smoothing coefficient } ModuleScalerControlClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
smoothingTime | float | parameter | 0 | 10 | 0:1000 | msec |
currentGain | float | state | 1 | 0 | Unrestricted | |
smoothingCoeff | float | derived | 1 | 0.002081 | Unrestricted |
Pins
Input Pins
Name: g
Description: linear gain to apply
...
Complex support: Real and Complex
Output Pins
Name: out1
Description: audio output
Data type: float
MATLAB Usage
File Name: scaler_control_module.m
...