API reference

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

C

classAutoWahEffect

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

Auto-wah effect that uses an amplitude envelope follower to modulate a bandpass filter, creating the characteristic "wah" sweep driven by the loudness of the input signal. The envelope follower is built entirely from native Web Audio nodes - no `ScriptProcessor` or `AudioWorklet` required: 1. A `WaveShaperNode` rectifier approximates `|x|` (full-wave rectification), converting the AC audio signal to a unipolar amplitude proxy. 2. A `BiquadFilterNode` (lowpass) smooths the rectified signal. The cutoff is derived from `responseMs` to control attack/release speed. 3. A `GainNode` scales the smoothed envelope by `sensitivity` (Hz/unit) and connects its output directly to the wah filter's `frequency` `AudioParam`, sweeping the filter centre upward with input loudness. Node graph: ``` inputGain ─┬─ dryGain ─────────────────────────────┐ │ ├── outputGain └─ wahFilter(bandpass) ─── wetGain ──────┘ Envelope (control) path - parallel off inputGain, sums into wahFilter.frequency: inputGain → rectifier(WaveShaper,|x|) → smoothingLowpass(BiquadFilter,lowpass) → sensitivityGain → wahFilter.frequency (AudioParam) ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`.

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

Auto-wah effect that uses an amplitude envelope follower to modulate a bandpass filter, creating the characteristic "wah" sweep driven by the loudness of the input signal.

The envelope follower is built entirely from native Web Audio nodes - no `ScriptProcessor` or `AudioWorklet` required:

1. A `WaveShaperNode` rectifier approximates `|x|` (full-wave rectification), converting the AC audio signal to a unipolar amplitude proxy. 2. A `BiquadFilterNode` (lowpass) smooths the rectified signal. The cutoff is derived from `responseMs` to control attack/release speed. 3. A `GainNode` scales the smoothed envelope by `sensitivity` (Hz/unit) and connects its output directly to the wah filter's `frequency` `AudioParam`, sweeping the filter centre upward with input loudness.

Node graph: ``` inputGain ─┬─ dryGain ─────────────────────────────┐ │ ├── outputGain └─ wahFilter(bandpass) ─── wetGain ──────┘

Envelope (control) path - parallel off inputGain, sums into wahFilter.frequency: inputGain → rectifier(WaveShaper,|x|) → smoothingLowpass(BiquadFilter,lowpass) → sensitivityGain → wahFilter.frequency (AudioParam) ```

Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`.

Constructors1
Methods1
destroy(): void
Disconnects all audio nodes and releases resources. Must be called when the effect is no longer needed.
Properties8
baseFrequency: number
Centre frequency of the wah filter in Hz. Range 50..2000, default 200. 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.
q: number
Q (resonance) of the bandpass wah filter. Range 0.1..20, default 4. Changes are ramped smoothly via setTargetAtTime.
ready: Promise<void>
Resolves when the effect is fully initialized. Defaults to immediately-resolved for sync effects.
responseMs: number
Envelope smoothing time constant in milliseconds. Range 1..500, default 30. Updating this adjusts the smoothing lowpass cutoff immediately via setTargetAtTime.
sensitivity: number
Envelope sensitivity in Hz/unit: the maximum filter sweep above baseFrequency when input is at full amplitude. Range 0..6000, default 3000. Changes are ramped smoothly via setTargetAtTime.
wet: number
Wet (wah-filtered) mix level, 0..1. The dry level is automatically 1 - wet. Changes are ramped smoothly via setTargetAtTime. Default 0.7.
Source