API reference

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

C

classPhaserEffect

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

Phaser effect implemented with native Web Audio nodes (no worklet required). The wet signal passes through a cascade of allpass `BiquadFilterNode`s whose centre frequencies are swept synchronously by a sine LFO. The phase shift produced by each allpass stage creates sweeping notches when summed with the dry signal. An optional feedback path from the last stage back to the first adds resonance and sharpens the effect. Node graph: ``` inputGain ┬── dryGain ───────────────────────────────────────┐ │ ├── outputGain └── allpass[0] ─► ... ─► allpass[N-1] ── wetGain ───┘ ▲ │ └── feedbackDelay ◄── feedbackGain ◄─────────┘ lfoOscillator ── lfoGain (depth × baseFrequency Hz) ──► each allpass.frequency ``` Note: `feedbackDelay` is a DelayNode with `delayTime = 0`. Even at zero delay the node itself breaks the zero-latency cycle, which spec-compliant browsers (Chrome, Edge, Safari) would otherwise mute entirely. Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`; `feedbackGain.gain = feedback`; `lfoGain.gain = depth × baseFrequency`.

9
props
1
methods
0
events
Import
import { PhaserEffect } from '@codexo/exojs-audio-fx'

Phaser effect implemented with native Web Audio nodes (no worklet required).

The wet signal passes through a cascade of allpass `BiquadFilterNode`s whose centre frequencies are swept synchronously by a sine LFO. The phase shift produced by each allpass stage creates sweeping notches when summed with the dry signal. An optional feedback path from the last stage back to the first adds resonance and sharpens the effect.

Node graph: ``` inputGain ┬── dryGain ───────────────────────────────────────┐ │ ├── outputGain └── allpass[0] ─► ... ─► allpass[N-1] ── wetGain ───┘ ▲ │ └── feedbackDelay ◄── feedbackGain ◄─────────┘

lfoOscillator ── lfoGain (depth × baseFrequency Hz) ──► each allpass.frequency ``` Note: `feedbackDelay` is a DelayNode with `delayTime = 0`. Even at zero delay the node itself breaks the zero-latency cycle, which spec-compliant browsers (Chrome, Edge, Safari) would otherwise mute entirely. Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`; `feedbackGain.gain = feedback`; `lfoGain.gain = depth × baseFrequency`.

Constructors1
Methods1
destroy(): void
Disconnects all audio nodes and releases resources. Must be called when the effect is no longer needed.
Properties9
baseFrequency: number
Centre frequency of all allpass stages in Hz. Range 50..5000, default 500. Changes are ramped smoothly and update both the filter frequencies and the absolute LFO depth.
depth: number
LFO modulation depth as a fraction of baseFrequency. Range 0..1, default 0.6. Changes are ramped smoothly via setTargetAtTime.
feedback: number
Feedback gain from the last stage back to the first. Range 0..0.9, default 0.3. Changes are ramped smoothly via setTargetAtTime.
inputNode: AudioNode
The node where audio enters this effect. Throws if the audio context is not yet initialized.
outputNode: AudioNode
The node where audio exits this effect. Throws if the audio context is not yet initialized.
rateHz: number
LFO sweep rate in Hz. Range 0..20, default 0.5. Changes are ramped smoothly via setTargetAtTime.
ready: Promise<void>
Resolves when the effect is fully initialized. Defaults to immediately-resolved for sync effects.
stages: number
Number of allpass filter stages (even integer, 2..12). Set at construction time only; read-only at runtime.
wet: number
Wet (phased) mix level, 0..1. The dry level is automatically 1 - wet. Changes are ramped smoothly via setTargetAtTime. Default 0.5.
Source