Skip to main content
Skip table of contents

MuteSymmetric

Overview

Smoothly mutes with exponential symmetrical fading curves

Discussion

Smoothly mutes all input channels. Muting/unmuting is controlled by the isMuted parameter. It takes equal time to mute and unmute (logarithmic ramp), hence the name: symmetric. The isMuted parameter together with muteThreshold is automatically converted to a value for the internal targetGain variable.

This module works similarly as the existing ScalerSymmetric module. Current gain though can be updated per sample (blockOrSample=0) or per block (blockOrSample=1). It exponentially and sample exact approaches its target gain with the set timeToMute parameter.

When full mute, the module will output zeros. Unmuted the input samples are simply copied one by one

Optional argument isMutedPin can be used to output fully muted/unmuted state.

If timeToMute=0 then no smoothing is being performed.

Type Definition

CODE
typedef struct _ModuleMuteSymmetric
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 isMuted;                                // Boolean that controls muting/unmuting.
    INT32 timeToMute;                             // Time to fully mute/unmute in msec.
    INT32 blockOrSample;                          // Gain computed per block [checked] or per sample [unchecked]
    FLOAT32 targetGain;                           // Computed target gains in linear units
    FLOAT32 muteThreshold;                        // Level (lin) considered to be fully muted
    FLOAT32 gradient;                             // Precalculated delta or gradient.
    FLOAT32 currentGain;                          // Instantaneous gain applied by the module. This is also the starting gain of the module.
    INT32 numSamples;                             // Number of samples over which muting has to be applied
    FLOAT32 muteThreshold_dB;                     // Level (dB) considered to be fully muted
    UINT32 pinID;                                 // Specifies which control pins are available.

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

isMuted

int

parameter

0

0

0:1

timeToMute

int

parameter

0

10

0:1000

msec

blockOrSample

int

const

0

0

Unrestricted

targetGain

float

derived

1

1

0:1

linear

muteThreshold

float

derived

1

1e-10

Unrestricted

gradient

float

derived

1

1

Unrestricted

currentGain

float

state

1

1

0:1

linear

numSamples

int

state

1

480

Unrestricted

muteThreshold_dB

float

const

1

-200

Unrestricted

pinID

uint

const

1

1

Unrestricted

Pins

Input Pins

Name: in

Description: audio input

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real and Complex

Output Pins

Name: out

Description: audio output

Data type: float

Name: isMuted

Description: mute state

Data type: int

Scratch Pins

Channel count: 1

Block size: 32

Sample rate: 48000

MATLAB Usage

File Name: mute_symmetric_module.m

CODE
 M=mute_symmetric_module(NAME)
 Creates a module which smoothly mutes and unmutes using symmetric ramps, 
 meaning it takes equal time for fadeIn and fadeOut. 
 
 Arguments:
    NAME - name of the module.
    MUTETHRESHOLD - level in dB considered to be fully muted
    BLOCKORSAMPLE - gain computed per block or per sample. 
    ISMUTEDPIN    - boolean control signal that tells when the muting occurred
JavaScript errors detected

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

If this problem persists, please contact our support.