MultiplexorSmoothed
Discussion
THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE MultiplexorV2 MODULE INSTEAD.
This module has a variable number of input pins and routes (or copies) one of these pins to the output. Each input pin must have the same number of channels and block size. The parameter .index specifies which of the input pins to route to the output. The parameter index is zero based and must lie in the range [0 NUMINPIN-1] where NUMINPIN is the number of input pins. If index is outside of the allowable range, it is clipped so that it lies in the proper range.
Note that this module has built in smoothing to prevent audible clicks. Use the multiplexor_module.m if you do not need smoothing.
Module Pack
Deprecated
ClassID
classID = 2031
Type Definition
typedef struct _ModuleMultiplexorSmoothed
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 index; // Specifies which input pin to route to the output. The index is zero based.
FLOAT32 smoothingTime; // Time constant of the smoothing process.
FLOAT32 smoothingCoeff; // Smoothing coefficient.
INT32 currentIndex; // This is the index that is currently being used and the module smoothly transitions to index.
FLOAT32 currentGain; // Instantaneous gain being applied. This is an internal variable used in the smoothing process.
} ModuleMultiplexorSmoothedClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| index | int | parameter | 0 | 0 | 0:2 | |
| smoothingTime | float | parameter | 0 | 10 | 0:100 | msec |
| smoothingCoeff | float | derived | 1 | 0.002081 | Unrestricted | |
| currentIndex | int | parameter | 1 | 0 | Unrestricted | |
| currentGain | float | state | 1 | 1 | Unrestricted |
Pins
Input Pins
| 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 |
| Name | in3 |
| 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_smoothed_module.m
M=multiplexor_smoothed_module(NAME, NUMINPIN)
Creates a multiplexor module with built-in smoothing. The module
has multiple input pins and switches from one input to another.
Arguments:
NAME - name of the module.
NUMINPIN - number of input pins.
All input pins must have the same block size and number of channels.
Note, this version has built in smoothing with a progammable smoothing
time. During the transition period, the first signal is smoothly muted
and when a level of -100 dB is reached, the signals are switched and
then unmuted. During the transition period there is a slight drop
out. If you do not need smoothing, use multiplexor_module.m instead
which leads to a more efficient implementation. If you don't want
any audible drop outs then use the multiplexor_fade_module.m
Copyright (c) 2026 DSP Concepts, Inc.