API reference

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

C

classWorkletEffect

@codexo/exojs / audio / stable

Base class for filters implemented as AudioWorkletProcessors. Subclasses declare the worklet's name, source code, and node options; this class owns the async lifecycle AND the dry/wet gain staging. Stable input/output nodes are created immediately. The worklet emits a pure wet signal; the base mixes it against the dry signal via `_dryGain`/`_wetGain` (`dryGain = 1 - wet`, `wetGain = wet * _wetMakeupGain`). An optional `_dryDelay` time-aligns the dry path with the worklet's algorithmic latency. While the worklet loads, the wet path is silent and dry passes at unity, so the effect is a clean passthrough (no volume dip) until it is ready.

4
props
3
methods
0
events
Import
import { WorkletEffect } from '@codexo/exojs'

Base class for filters implemented as AudioWorkletProcessors. Subclasses declare the worklet's name, source code, and node options; this class owns the async lifecycle AND the dry/wet gain staging.

Stable input/output nodes are created immediately. The worklet emits a pure wet signal; the base mixes it against the dry signal via `_dryGain`/`_wetGain` (`dryGain = 1 - wet`, `wetGain = wet * _wetMakeupGain`). An optional `_dryDelay` time-aligns the dry path with the worklet's algorithmic latency. While the worklet loads, the wet path is silent and dry passes at unity, so the effect is a clean passthrough (no volume dip) until it is ready.

Constructors1
new(): WorkletEffect
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.
Properties4
inputNode: AudioNode
The node where audio enters this effect.
outputNode: AudioNode
The node where audio exits this effect.
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.
wet: number
Wet (processed) mix level, 0..1. The dry level is automatically 1 - wet. Ramped smoothly.
Source