Skip to main content
Skip table of contents

WetDry

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
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

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Name: wet

Description: audio input

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

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

CODE
 M=wet_dry_module(NAME, MIXTYPE)
 Creates a smoothly varying multichannel WetDry module for use in 
 the Audio Weaver environment. The WetDry has two inputs 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. User can select between constant energy or constant 
 amplitude mixing.  
 
 Arguments:
   NAME - name of the module.
   MIXTYPE - Type of mixing, constant energy or constant amplitude.
             0 - Constant amplitude mixing
             1 - Constant energy mixing

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.