Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

2-input x 1-output smoothly varying mixer

Discussion

This module implements a 2-input x 1-output mixer with a single mix level. The first input is Dry signal and second input is Wet signal to be mixed with Dry signal. The parameter mix determine how much input1 is to be added to first input. If mix = 0.0 then only the first input is routed to output and if mix = 1.0 then second input is routed to output. The module has second argument to select mixing type. If the MIXTYPE = 0 then output = (1 - mix) * input1 + (mix) * input2. If MIXTYPE = 1 then output = (1 - mix)2 * input1 + (mix)2 * input2.

The module supports mulichannel input and the mixing is performed on per channel of input pins. When the module is bypassed, the first input will be copied to output

Type Definition

Code Block
typedef struct _ModuleWetDry
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 mix;                                  // Linear mixing level.
    INT32 mixType;                                // Selects the type of mixing that is implemented by the module: ConstantAmplitude=0, ConstantEnergy=1
    FLOAT32 smoothingTime;                        // Time constant of the smoothing process, in msec.
    FLOAT32 currentGain1;                         // Instanteous gain being applied to input pin1. This is an internal variable used in the smoothing process
    FLOAT32 currentGain2;                         // Instanteous gain being applied to input pin2. This is an internal variable used in the smoothing process
    FLOAT32 smoothingCoeff;                       // Smoothing coefficient.
} ModuleWetDryClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

mix

float

parameter

0

0

0:1

linear

mixType

int

parameter

0

0

0:1

smoothingTime

float

parameter

0

10

0:1000

msec

currentGain1

float

state

0

1

0:1

linear

currentGain2

float

state

0

0

0:1

linear

smoothingCoeff

float

derived

1

0.002081

Unrestricted

Pins

Input Pins

Name: dry

Description: audio input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: float

MATLAB Usage

File Name: wet_dry_module.m

...