Skip to content

MixerSmoothedV2b

Discussion

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

This module implements a full M-input x N-output mixer with a total of MxN coefficients. N = number of channels on the one output pin. M = sum of number of channels on all input pins. When using the module in MATLAB, the coefficients are contained in the .coeffs matrix with the gain from the ith input to the jth output found at coeffs(i, j). From the C code point of view, the .coeffs array is a one dimensional array of length MxN. The gain from input m (0 <= m <= M-1) to output n (0 <= n <= N-1) is stored at:

coeffs[m + n*M]

Put another way, the first M coefficients are the gains needed to compute the first output channel. The next M coefficients are the gains needed to compute the second output channel, and so out.

The mixer implements smoothing on a block-by-block basis. Standard 1st order exponential smoothing is used. Gain adjustments are made to the coeffs matrix. Internally, the module holds a second matrix of instantaneous gains, currentCoeff, which smoothly approaches coeffs. The rate of the smoothing operation is controlled by smoothingTime.

When the module is bypassed, it copies the ith input channel to the ith output channel. If the module has more output channels than input channels, the remaining output channels are set to 0.

Module Pack

Deprecated

ClassID

classID = 2024

Type Definition

typedef struct _ModuleMixerSmoothedV2b
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 smoothingTime;                        // Time constant of the smoothing process, in msec.
FLOAT32 smoothingCoeff;                       // Smoothing coefficient.
INT32 numIn;                                  // Number of input channels.
FLOAT32* gain;                                // Linear gain.
FLOAT32* currentGain;                         // Instanteous gain being applied.  This is an internal variable used in the smoothing process
} ModuleMixerSmoothedV2bClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
smoothingTime float parameter 0 10 0:500 msec
smoothingCoeff float derived 1 0.004158 Unrestricted
numIn int derived 1 1 Unrestricted
gain float* parameter 0 [1 x 2] -60:20
currentGain float* state 1 [1 x 2] Unrestricted

Pins

Input Pins

Name in1
Description Input signal
Data type float
Channel range Unrestricted
Block size range 2:1048576
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description audio output
Data Type float

Matlab Usage

File Name: mixer_smoothed_v2b_module.m 
 M=mixer_smoothed_v2b_module(NAME, NUMOUT, NUMINPIN) 
 Creates a smoothly varying multichannel mixer module for use in  
 the Audio Weaver environment. The mixer has multiple input pins and  
 one output pin. Each of the pins can contain multiple interleaved  
 channels. The number of input channels per input pin is determined  
 by the upstream audio module. You must specify the number of input  
 pins and output channels.   

 Arguments: 
   NAME - name of the module. 
   NUMOUT - number of output channels. 
   NUMINPIN - number of input pins 

Copyright (c) 2026 DSP Concepts, Inc.