Array Set V2
The Array Set module reads the data coming in from the input wire and reaches into instance structure of the target module to copy the data to the target array. The Array data structure of the target module is pointed to by the argument " MOD.VAR". See the Param Set module for more details on how to specify the target module and array.
An optional control pin is also supported that enables copying the input data to the MOD.VAR array when the first value of the control pin data !=0. If the control pin is not used, then the data is written to the target array on every execution.
The Array Set module also supports 3 different options to set the values at the target (NoSet, DeferredSet, InstantSet).
NoSet: Updates target module array - never calls the target module's set function
DeferredSet: Updates target module array - uses a deferred call to the target module's set function so it executes after processing is complete
InstantSet: Updates target module array - immediately calls the target module's set function during the Array Set process
The argument executionOrder determines when the array set will actually execute in relation to the module it is controlling:
Undefined = Let the build process decide
Before = Set the parameter before the target module executes
After = Set the parameter after the target module executes
This can be confirmed by generating a .AWS file and looking at the order which the modules are added to the layout, which set the execution order.
This is the v2 version of this module and it uses the correct mask value when calling the controlled module's Set() function.
Module Pack
Advanced
ClassID
classID = 1455
Type Definition
typedef struct _ModuleArraySetV2
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 setBehavior; // Controls the behavior of the module
UINT32 mask; // MASK value when calling the controlled module's set function
void * modPtr; // Points to the module to set
void * varPtr; // Points to the variable to set within the module instance structure
} ModuleArraySetV2Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| setBehavior | int | parameter | 0 | 2 | Unrestricted | |
| mask | uint | derived | 1 | 0 | Unrestricted | |
| modPtr | void * | parameter | 1 | Unrestricted | ||
| varPtr | void * | parameter | 1 | Unrestricted |
Pins
Input Pins
| Name | control |
| Description | Input control signal |
| Data type | {float, int, fract32} |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real and Complex |
| Name | in |
| Description | Input data |
| Data type | {float, int, fract32} |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real and Complex |
Matlab Usage
File Name: array_set_v2_module.m
M = array_set_v2_module(NAME, MODVAR, CONTROLPIN, EXECUTIONORDER)
Array set module. This module can reach into the instance structure
of other modules and set array data structures.
This module reads the data coming in from the input wire and reaches into
instance structure of the target module to copy the data. The Array data
structure of the target module is pointed to by the argument "MOD.VAR".
An optional control pin is also supported that controls the setting of the
MOD.VAR array when the value control pin data doesn't equal 0. If the
control pin is not used, then the data is written to the target array on
every execution. The Array Set module also supports 3 different options to
set the values at the target (NoSet, DeferredSet, InstantSet).
Arguments:
NAME - Name of the module.
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'.
CONTROLPIN - Boolean to add control input pin or not
EXECUTIONORDER - Determines when the ParamSet module executes relative
to the module it is controlling. Allowable values are:
'undefined' - the default. The execution order is set
by the routing algorithm and can occur before
or after the module it is controlling.
'before' - forces ParamSet to execute before the module it
is controlling.
'after' - forces ParamSet to execute after the module it
is controlling.
When using 'before' and 'after' you could get a build error
indicating that no more modules can execute or there is a
circular dependency.
Copyright (c) 2026 DSP Concepts, Inc.