Skip to main content
Skip table of contents



Overrides wire properties


The SetWireProperties modules is used to override wire information in an Audio Weaver layout. It is used rarely when you need to change the channel or sample count, or the real/complex properties of a wire. One common use case is to convert a wire with 1 channel and a blockSize of N to a wire with N channels and a blockSize of 1. At instantiation time (in Module Name and Arguments in Audio Weaver Designer), you specify the output blockSize, channel count, sample rate, data type, and real/complex properties of the output wire.

Internally, the module just performs a copy operation. A copy operation is required because the wire's pinType data structure has changed. When bypassed, the module continues to operate. That is, the module's bypass function is set to the module's process function.

The module's prebuild function checks to make sure that the number of samples in the output wire equals the number of samples in the input wire. If there is a mismatch in the number of samples then an error is thrown.

Type Definition

typedef struct _ModuleSetWireProperties
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleSetWirePropertiesClass;


Input Pins

Name: in

Description: Input signal

Data type: {float, int, fract32}

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real and Complex

Output Pins

Name: out

Description: Output signal

Data type: float


File Name: set_wire_properties_module.m

 Creates a module which overrides wire properties (number of  channels, block size,
 sample rate, and real/complex).  This module is used in rare cases, for example,
 when you need to convert from a block of data to multiple individual channels.
 Note, the number of samples in the output wire have to match the number
 of samples in the input wire.  Arguments:
    NAME - name of the module.
    NUMCHANNELS - number of interleaved channels in each output pin.
         By default, NUMCHANNELS=1;
    BLOCKSIZE - number of samples per output channel. By default,
    SAMPLERATE - sample rate of the output signal in Hz. By default,
    DATATYPE - specifies the data type of the output pin.  Possible values are:
         1 = 'float', 2 = 'fract32', 3 = 'int'.  By default, DATATYPE = 1.
    ISCOMPLEX - Boolean indicating whether the output holds complex data.
         By default, ISCOMPLEX=0.

JavaScript errors detected

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

If this problem persists, please contact our support.