API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classDuckingEffect

@codexo/exojs-audio-fx / audio / stable

Sidechain compressor (ducker) implemented as an WorkletEffect. Attenuates the main audio signal whenever the `sidechain` AudioBus exceeds the threshold, then releases when it drops back down. Commonly used to duck background music under dialogue or sound effects. Attack and release times are expressed in milliseconds and converted internally to one-pole filter coefficients.

8
props
3
methods
0
events
Import
import { DuckingEffect } from '@codexo/exojs-audio-fx'

Sidechain compressor (ducker) implemented as an WorkletEffect. Attenuates the main audio signal whenever the `sidechain` AudioBus exceeds the threshold, then releases when it drops back down. Commonly used to duck background music under dialogue or sound effects. Attack and release times are expressed in milliseconds and converted internally to one-pole filter coefficients.

Constructors1
Methods3
_onWorkletReady(audioContext: AudioContext): void
Subclass hook - called once the worklet is loaded and inserted into the wet path. Use for additional wiring (e.g. a sidechain input).
_setAudioParam(name: string, value: number): void
Ramps an AudioParam on the underlying AudioWorkletNode to value using a short exponential ramp. No-ops if the worklet is not yet loaded. Part of the effect SDK contract for extension audio effects.
destroy(): void
Disconnects all nodes, cancels any pending worklet load, and releases resources.
Properties8
attackMs: number
Attack time in milliseconds - how quickly the ducker engages. Default 30.
inputNode: AudioNode
The node where audio enters this effect.
outputNode: AudioNode
The node where audio exits this effect.
ratio: number
Compression ratio applied to the main signal above the threshold. Range 1..20, default 4.
ready: Promise<void>
Resolves once the worklet is loaded and inserted into the wet path. Also resolves when the load fails - the effect then stays the clean passthrough it is until the worklet arrives, and the failure is reported through the engine log rather than by rejecting.
releaseMs: number
Release time in milliseconds - how quickly the ducker disengages. Default 300.
threshold: number
Sidechain level above which the main signal is attenuated, in dBFS. Range −100..0, default −20.
wet: number
Wet (processed) mix level, 0..1. The dry level is automatically 1 - wet. Ramped smoothly.
Source