Versions Compared

Key

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

Overview

Mutes and unmutes to hide artifacts

Discussion

This module is used to hide pops and clicks during transitions. The module smoothly mutes, outputs silence, and then smoothly unmutes. You have full control over mute period, silence period, and unmuting period.

...

The constructor argument INITIALSTATE allows you to set the initial state of the trigger variable. By default, INITIALSTATE = 0 meaning that the module starts up unmuted. If you set INITIALSTATE = 1, then the module starts out muted.

Type Definition

Code Block
typedef struct _ModuleMuteUnmute
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 trigger;                                // Begins the muting and unmuting process
    FLOAT32 muteTime;                             // Muting time, in msec
    FLOAT32 silenceTime;                          // Duration of the silence period, in msec
    FLOAT32 unmuteTime;                           // Unmuting time, in msec
    INT32 muteTimeSamples;                        // Muting time, in samples
    INT32 silenceTimeSamples;                     // Silence time, in samples
    INT32 unmuteTimeSamples;                      // Unmuting time, in samples
    FLOAT32 muteCoeffR;                           // One of two coefficients used to compute the muting profile
    FLOAT32 muteCoeffI;                           // One of two coefficients used to compute the muting profile
    FLOAT32 unmuteCoeffR;                         // One of two coefficients used to compute the unmuting profile
    FLOAT32 unmuteCoeffI;                         // One of two coefficients used to compute the unmuting profile
    FLOAT32 stateR;                               // One of two state variables which control the ramping profile
    FLOAT32 stateI;                               // One of two state variables which control the ramping profile
    INT32 sampleTime;                             // Counts the samples elapsed in the entire mute/silence/unmute cycle
} ModuleMuteUnmuteClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

trigger

int

state

0

0

0:1

muteTime

float

parameter

0

5

1:1000

silenceTime

float

parameter

0

100

0:10000

unmuteTime

float

parameter

0

50

1:1000

muteTimeSamples

int

derived

1

240

Unrestricted

silenceTimeSamples

int

derived

1

4800

Unrestricted

unmuteTimeSamples

int

derived

1

2400

Unrestricted

muteCoeffR

float

derived

1

0.9999

Unrestricted

muteCoeffI

float

derived

1

0.01309

Unrestricted

unmuteCoeffR

float

derived

1

1

Unrestricted

unmuteCoeffI

float

derived

1

0.001309

Unrestricted

stateR

float

state

1

0

Unrestricted

stateI

float

state

1

0

Unrestricted

sampleTime

int

state

1

0

Unrestricted

Pins

Input Pins

Name: in

Description: audio input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: float

Scratch Pins

Channel count: 1

Block size: 32

Sample rate: 48000

MATLAB Usage

File Name: mute_unmute_module.m

...