Overview
M-input x N-output mixer
Discussion
This module implements a full M-input x N-output mixer with a total of MxN coefficients. N = number of channels on the one output pin. M = sum of number of channels on all input pins. When using the module in MATLAB, the coefficients are contained in the .coeffs matrix with the gain from the ith input to the jth output found at coeffs(i, j). From the C code point of view, the .coeffs array is a one dimensional array of length MxN. The gain from input m (0 <= m <= M-1) to output n (0 <= n <= N-1) is stored at:
...
When the module is bypassed, it copies the ith input channel to the ith output channel. If the module has more output channels than input channels, the remaining output channels are set to 0.
Type Definition
Code Block |
---|
typedef struct _ModuleMixerV3Fract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 maxNonZero; // Maximum number of non zero coefficients. INT32 postShift; // Number of bits to shift FLOAT32 gainScale; // Scale coefficients based on postShift. INT32 numIn; // Number of input channels. FLOAT32* gain; // Linear gain. fract32* nonZeroGainFract32; // Instanteous fract32 gain being applied. SparseItem * table; // Internal data holding data for quick processing } ModuleMixerV3Fract32Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
maxNonZero | int | const | 1 | 2 | Unrestricted | |
postShift | int | const | 1 | 4 | Unrestricted | |
gainScale | float | derived | 1 | 0.0625 | Unrestricted | |
numIn | int | derived | 1 | 1 | Unrestricted | |
gain | float* | parameter | 0 | [1 x 2] | -60:20 | |
nonZeroGainFract32 | fract32* | state | 1 | [2 x 1] | Unrestricted | |
table | SparseItem * | parameter | 1 | Unrestricted |
Pins
Input Pins
Name: in1
Description: Input signal
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: mixer_v3_fract32_module.m
...