Document toolboxDocument toolbox

(8.D.2.3) SampleMultiplexorControl

Overview

N to 1 multiplexor module with a control input operating sample-by-sample

Discussion

Multiplexor module in which the channel to select is taken from a control pin (the first pin). The control pin is an integer value in the range 0 to N-1, where N is the number of audio inputs. If the control value is outside of the allowable range it is clipped. The multiplexor operates on a sample-by-sample basis. The 1st value on the control pin selects which channel and input pin the 1st output is from. The 2nd value on the control pin selects which channel and input pin the 2nd output is from. And so on.

Each audio input pin must have the same number of channels, sample rate, real/complex, and block size. The control pin has to be single channel with the same block size as the audio pins.

Smoothing is not supported by this module.

Type Definition

typedef struct _ModuleSampleMultiplexorControl { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure } ModuleSampleMultiplexorControlClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

indexPinFlag

int

const

0

1

Unrestricted

 

index

int

parameter

0

0

0:2

 

Pins

Input Pins

Name: Ctrl

Description: Control signal

Data type: int

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

 

Name: in1

Description: Input signal

Data type: {float, int, fract32}

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real and Complex

 

Name: in2

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, int, fract32}

MATLAB Usage

File Name: sample_multiplexor_control_module.m

M=sample_multiplexor_control_module(NAME, NUMINPIN) Multiplexor with control pin that operates on a sample-by-sample basis. The control pin's block size is the same size as other input pin's block size. The control pin is an integer value in the range 0 to N-1. (N is the number of data pins). Although the control signal has to be real numbers, the data signals can be either real or complex number. Smoothing is not supported in this module. Arguments: NAME - name of the module. NUMINPIN - number of input pins. All input pins must have the same block size and number of channels.

Â