Versions Compared

Key

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

Overview

Smoothly varying channel router module

Discussion

This module routes (or copies) an arbitrary collection of input pins to a single multichannel output pin. Each input pin can have an arbitrary number of interleaved channels, but they must all have the same block size. The array channelIndex specifies the mapping from input pin/channel to the output pin/channel. The array has the same length as the number of output channels and the kth array value specifies the mapping from the input pins to the kth output channel. Each array value is a 32-bit packed integer. The high 16 bits represents the input pin number (zero-based) and the low 16 bits represent the channel number (zero-based) to select. If the pin index or channel index is out of range, then the particular output channel is muted. For example, you can mute a channel by setting the index to -1 (unless, of course, you happen to have 65536 pins and 65536 channels). When a router is first instantiated, all of the channel index values are -1.

...

Note that this module is smoothly varying. If you need a more efficient unsmoothed implementation, use the router_module.m instead.

Type Definition

Code Block
typedef struct _ModuleRouterSmoothed
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 smoothingTime;                        // Time constant of the smoothing process.
    FLOAT32 smoothingCoeff;                       // Smoothing coefficient.
    INT32* channelIndex;                          // Specifies input to output channel routing. Each item in the array corresponds to an output pin and contains two packed values: input pin number in the high 16 bits; input channel number in the low 16 bits.
    INT32* currentChannelIndex;                   // Similar to the channelIndex, but specifies the current routing for each channel.
    FLOAT32* currentGain;                         // Instantaneous gain for each output channel.
} ModuleRouterSmoothedClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

smoothingTime

float

parameter

0

10

0:1000

msec

smoothingCoeff

float

derived

1

0.002081

Unrestricted

channelIndex

int*

parameter

0

[1 x 1]

Unrestricted

currentChannelIndex

int*

state

1

[1 x 1]

Unrestricted

currentGain

float*

state

1

[1 x 1]

Unrestricted

Pins

Input Pins

Name: in1

Description: Input signal

...

Complex support: Real and Complex

Output Pins

Name: out

Description: Output signal

Data type: float

MATLAB Usage

File Name: router_smoothed_module.m

...