Interface DynamicsOptions

Construction-time configuration for a DynamicsEffect, mirroring the dynamics AudioWorkletProcessor's AudioParam set (see import('./processors/dynamics').DynamicsWorkletProcessor). All fields are optional; the worklet clamps to its documented ranges downstream.

A single parameter set drives compressor, limiter, expander and gate (Giannoulis 2012): ratio > 1 compresses, a very large ratio limits, and ratio < 1 is downward expansion (an extreme low ratio is a gate). The createLimiter / createGate factories are presets over these same params.

interface DynamicsOptions {
    attack?: number;
    knee?: number;
    makeup?: number;
    ratio?: number;
    release?: number;
    threshold?: number;
}

Properties

attack?: number

Attack time tau_A (s). Default 0.003. Range 0..1.

knee?: number

Knee width W (dB), soft-knee transition centered on T (0 = hard). Default 6. Range 0..40.

makeup?: number

Make-up gain M (dB), constant output boost. Default 0. Range -24..24.

ratio?: number

Ratio R (reciprocal of slope above T). Default 4. >1 compress, large=limit, <1 expand. Range 0.05..1000.

release?: number

Release time tau_R (s). Default 0.25. Range 0..5.

threshold?: number

Threshold T (dB), level above which compression starts. Default -24. Range -100..0.