(8.D.2.4) PresetArrayHandlerV2
Overview
Updates module array from different preset tables.
Discussion
This module updates the array of any other module from the values in presetsArray. The presetsArray is a 3-D array of numArrays, each with size numRows x numCols. The 3-D array is arranged as cascaded 2-D arrays For example, 3 arrays with size 2 x 3 each is arranged as 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 2 where 2x3 array with zeros is one array, 2x3 array with ones is second array and so on. The cascaded 2-D array is multiplied or added element by element to create one 2-D array of size numRows x numCols, which is then used to update the array of the other module. The math operation is controlled by the operation argument, either multiplication or addition. This module also has additional pointers in to the presetArray memory, useful for standalone tuning
Type Definition
typedef struct _ModulePresetArrayHandlerV2
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 numArrays; // number of presets.
INT32 numRows; // the number of vectors.
INT32 numCols; // the size of each vector.
INT32 operation; // math operation on presets. 0 - multiplication and 1 - addition.
INT32 initialFlag; // boolean flag which handles initial setup.
FLOAT32* presetsArray; // 3-D presets array table.
FLOAT32* pg1; // Points to the 1st preset group elements in the presetsArray.
FLOAT32* pg2; // Points to the 2nd preset group elements in the presetsArray.
FLOAT32* pg3; // Points to the 3rd preset group elements in the presetsArray.
FLOAT32* pg4; // Points to the 4th preset group elements in the presetsArray.
FLOAT32* pg5; // Points to the 5th preset group elements in the presetsArray.
FLOAT32* pg6; // Points to the 6th preset group elements in the presetsArray.
FLOAT32* pg7; // Points to the 7th preset group elements in the presetsArray.
FLOAT32* pg8; // Points to the 8th preset group elements in the presetsArray.
FLOAT32* pg9; // Points to the 9th preset group elements in the presetsArray.
FLOAT32* pg10; // Points to the 10th preset group elements in the presetsArray.
void * modPtr; // Points to the module to set.
void * varPtr; // Points to the variable to set within the module instance structure.
} ModulePresetArrayHandlerV2Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
numArrays | int | const | 0 | 2 | Unrestricted | Â |
numRows | int | const | 0 | 1 | Unrestricted | Â |
numCols | int | const | 0 | 5 | Unrestricted | Â |
operation | int | const | 0 | 0 | Unrestricted | Â |
initialFlag | int | state | 0 | 1 | Unrestricted | Â |
presetsArray | float* | parameter | 0 | [2 x 5] | Unrestricted | Â |
pg1 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg2 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg3 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg4 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg5 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg6 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg7 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg8 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg9 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
pg10 | float* | state | 1 | [1 x 1] | Unrestricted | Â |
modPtr | void * | parameter | 1 | Â | Unrestricted | Â |
varPtr | void * | parameter | 1 | Â | Unrestricted | Â |
MATLAB Usage
File Name: preset_array_handler_v2_module.m
M=preset_array_handler_v2_module(NAME, NUMARRAYS, NUMROWS, NUMCOLS, OPERATION, MODVAR)
Array set module. This module can reach into the instance structure
of other modules and set array values.
Arguments:
NAME - name of the module.
NUMARRAYS - number of presets, the Z dimension of internal table.
NUMROWS - the dimension X of internal table.
NUMCOLS - the dimension Y of internal table.
OPERATION - operation to be performed on presets (multiply or addition).
0 - Multiplication
1 - Addition
VARNAME - specifies the module and variable name using the form:
'MOD.VAR' where MOD is the module name and VAR is the
variable name. You can also specify internal subsystems using
'SUBSYS.MOD.VAR'.
Â