Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

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

Code Block
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

...

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

...