Skip to content

MultiplexorControl

Discussion

THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE MultiplexorV2 MODULE INSTEAD.

Smoothly varying multiplexor module in which the channel to select is taken from a control pin (pin 1). 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 first sample value of the control pin is used as the index for the multiplexor; all other values are ignored.

Each audio input pin must have the same number of channels and block size.

Note that this module has built in smoothing to prevent audible clicks.

Module Pack

Deprecated

ClassID

classID = 2026

Type Definition

typedef struct _ModuleMultiplexorControl
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 smoothingTime;                        // Time constant of the smoothing process
INT32 index;                                  // Value seen on the control pin.  Specifies which input pin to route to the output. The index is zero based.
FLOAT32 smoothingCoeff;                       // Smoothing coefficient
INT32 currentIndex;                           // This is index that is currently being used and the module smoothly transitions to index
FLOAT32 currentGain;                          // Instanteous gain being applied.  This is an internal variable used in the smoothing process
} ModuleMultiplexorControlClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
smoothingTime float parameter 0 10 0:100 msec
index int state 0 0 0:1
smoothingCoeff float derived 1 0.002081 Unrestricted
currentIndex int parameter 1 0 Unrestricted
currentGain float state 1 1 Unrestricted

Pins

Input Pins

Name Ctrl
Description Control signal
Data type int
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real
Name in1
Description Input signal
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real
Name in2
Description Input signal
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description Output signal
Data Type float

Matlab Usage

File Name: multiplexor_control_module.m 
 M=multiplexor_control_module(NAME, NUMINPIN) 
 Smoothly varying multiplexor module with a control pin.  The control 
 pin is the first pin and determines which of N inputs is selected. 
 The input pin is an integer value in the range 0 to N-1.  Arguments: 
    NAME - name of the module. 
    NUMINPIN - number of input pins. 

 All input pins must have the same block size and number of channels. 

Copyright (c) 2026 DSP Concepts, Inc.