Skip to content

DuckerFract32

Overview

Duck or reduce the audio level of the input

Discussion

The module has the parameter "manualTrigger" to trigger manually. when the trigger signal or manualTrigger is nonzero, the level of the input audio will be changed from 1.0 to duckLevelLinear smoothly, with the time constant determined by the attackTime parameter. duckLevelLinear is the linear value equivalent to the dB value of duckLevel. After the time 3*attackTime + holdTime, the gain of the input audio changed to 1.0 smoothly, with the time constant determined by the releaseTime parameter.

Module Pack

Advanced

ClassID

classID = 1264

Type Definition

typedef struct _ModuleDuckerFract32
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 duckLevel;                            // Level in dB at which the input will be attenuated when ducking is active.
FLOAT32 attackTime;                           // Time constant in msec, which controls the ducking process.
FLOAT32 holdTime;                             // Time constant in msec which controls how long the signal is attenuated for.
FLOAT32 releaseTime;                          // Time constant in msec which controls how fast the gain is restored to 1.0.
INT32 manualTrigger;                          // Boolean parameter to trigger manually.
fract32 duckLevelLinear;                      // Level in dB at which the input will be attenuated when ducking is active.
fract32 attackCoeff;                          // Internal coefficient realizing the attack time.
fract32 releaseCoeff;                         // Internal coefficient realizing the release time.
INT32 timerPeriod;                            // The period of timer in terms of number of blocks.
INT32 timerCount;                             // Instantaneous count of the timer.
fract32 currentGain;                          // Instantaneous gain applied by the module.
fract32 targetGain;                           // Target gain applied by the module.
fract32 smoothingCoeff;                       // Internal coefficient realizing the smoothing time.
} ModuleDuckerFract32Class;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
duckLevel float parameter 0 -20 -60:0 dB
attackTime float parameter 0 20 0.01:1000 msec
holdTime float parameter 0 1000 0.01:1000 msec
releaseTime float parameter 0 100 0.01:1000 msec
manualTrigger int parameter 0 0 0:1
duckLevelLinear fract32 derived 1 0.1 Unrestricted
attackCoeff fract32 derived 1 0.0010412 Unrestricted
releaseCoeff fract32 derived 1 0.00020832 Unrestricted
timerPeriod int derived 1 1590 Unrestricted
timerCount int state 1 0 Unrestricted
currentGain fract32 state 1 1 Unrestricted
targetGain fract32 state 1 1 Unrestricted
smoothingCoeff fract32 state 1 1 Unrestricted

Pins

Input Pins

Name trigger
Description trigger signal
Data type int
Channel range 1
Block size range 1
Sample rate range Unrestricted
Complex support Real
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: ducker_fract32_module.m 
 M = ducker_fract32_module(NAME) 
 Audio Weaver module to reduce the audio level of the input signal based on the  
 trigger input. The module has two input pins and one output pin. 
 The first input pin is the trigger input of single channel and blockSize = 1, 
 contains a Boolean value. The second input pin is the audio input contains  
 N channels and arbitary blockSize. The output pin contains same number of 
 channels and blockSize as the input audio signal.  Arguments: 
    NAME - name of the module. 

Copyright (c) 2026 DSP Concepts, Inc.