MapperControl
Overview
One shot player with trigger pin
Discussion
This is a control subsystem module with Router, Type Conversion, Clipper and Scale Offset modules. Input of this module is multichannel control pin of any data type and output is the mono channel control pin of float data type. It has control variables channelNum, inputMin, inputMax, outputMin and outputMax. channelNum to select the channel from multichannel input pin. inputMin and inputMax to control the lower and upper thresholds ClipAsym module. outputMin and outputMax to control the gain and offset of ScalerOffset module with the equation
gain = (outputMax - outputMin)/(inputMax - inputMin) offset = outputMin - (gain * inputMin)
Type Definition
typedef struct _ModuleMapperControl
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 channelNum; // Select the channel from the input control bus
FLOAT32 inputMin; // Minimum input value
FLOAT32 inputMax; // Maximum input value
FLOAT32 outputMin; // Minimum output value
FLOAT32 outputMax; // Maximum output value
awe_modRouterInstance *router; // Channel routing without smoothing
awe_modTypeConversionInstance *toFloat; // Converts between numeric data types
awe_modClipAsymInstance *clip; // Asymmetric clipper module with separate upper and lower clipping thresholds
awe_modScaleOffsetInstance *scaleOffset; // Scales a signal and then adds an offset
} ModuleMapperControlClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
channelNum | int | parameter | 0 | 1 | 1:1 | Â |
inputMin | float | parameter | 0 | -1 | -1:1 | Â |
inputMax | float | parameter | 0 | 1 | -1:1 | Â |
outputMin | float | parameter | 0 | -1 | -1:1 | Â |
outputMax | float | parameter | 0 | 1 | -1:1 | Â |
Pins
Input Pins
Name: in
Description: Input audio
Data type: {float, int, fract32}
Channel range: Unrestricted
Block size range: 1
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output audio
Data type: float
Scratch Pins
Channel count: 1
Block size: 1
Sample rate: 48000
MATLAB Usage
File Name: mapper_control_module.m
SYS = mapper_control_module(NAME)
Creates a subsystem module with Router, clipper and scale offset modules.
Arguments:
NAME - name of the module.
Â