Skip to main content
Skip table of contents

Arrayset

Overview

Sets the array elements in the Target module Filters with data from input wire

Discussion

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

Type Definition

CODE
typedef struct _ModuleArrayset
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 setBehavior;                            // Controls the behavior of the module
    void * modPtr;                                // Points to the module to set
    void * varPtr;                                // Points to the variable to set within the module instance structure
} ModuleArraysetClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

setBehavior

int

parameter

0

2

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: arrayset_module.m

CODE
 M = arrayset_module(NAME, MODVAR, CONTROLPIN)
 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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.