Versions Compared

Key

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

Overview

Updates module array from different preset tables.

Discussion

This module updates the array of any other module from the 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.

Type Definition

Code Block
typedef struct _ModulePresetArrayHandler
{
    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.
    void * modPtr;                                // Points to the module to set.
    void * varPtr;                                // Points to the variable to set within the module instance structure.
} ModulePresetArrayHandlerClass;

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

modPtr

void *

parameter

1

Unrestricted

varPtr

void *

parameter

1

Unrestricted

MATLAB Usage

File Name: preset_array_handler_module.m

...