Document toolboxDocument toolbox

(8.D.2.1) MixerSmoothedFract32

Overview

M-input x N-output smoothly varying mixer

Discussion

This module implements a fixed point version of full M-input x N-output mixer with a total of MxN coefficients. The coefficients are contained in the coeffs matrix with the gain from the ith input to the jth output is found at coeffs(i, j). This mixer implements smoothing on a sample-by-sample 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.

Type Definition

typedef struct _ModuleMixerSmoothedFract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 smoothingTime; // Time constant of the smoothing process fract32 smoothingCoeff; // Smoothing coefficient INT32 postShift; // Number of bits to shift FLOAT32* gain; // Linear gain fract32* targetGain; // Linear gain fract32* currentGain; // Linear gain } ModuleMixerSmoothedFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

smoothingTime

float

parameter

0

10

0:500

msec

smoothingCoeff

fract32

derived

1

0.002081

Unrestricted

 

postShift

int

derived

1

6

Unrestricted

 

gain

float*

parameter

0

[1 x 2]

-60:20

 

targetGain

fract32*

derived

1

[1 x 2]

Unrestricted

 

currentGain

fract32*

state

1

[1 x 2]

Unrestricted

 

Pins

Input Pins

Name: in

Description: audio input

Data type: fract32

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: fract32

MATLAB Usage

File Name: mixer_smoothed_fract32_module.m

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

Â