API reference

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

C

classConvolutionEffect

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

Convolution effect that convolves the input signal with a user-supplied impulse response (IR). Unlike ReverbEffect, which generates a procedural noise-based IR, `ConvolutionEffect` accepts a *real* decoded IR - enabling convolution reverb from acoustic-space captures, cabinet/speaker simulations, telephone/pipe character filtering, and any other linear time-invariant transformation. Pass the IR as an `AudioBuffer` (typically decoded via `AudioContext.decodeAudioData`) or as a `Sound` (its `audioBuffer` is used). Omitting the IR leaves `convolver.buffer` as `null`, making the wet path silent and the effect act as a passthrough until setImpulse is called - safe to add to a bus before an IR is available. Node graph: ``` input(GainNode) → dryGain → output(GainNode) input → convolver → wetGain → output ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet × gain`.

6
props
2
methods
0
events
Import
import { ConvolutionEffect } from '@codexo/exojs-audio-fx'

Convolution effect that convolves the input signal with a user-supplied impulse response (IR). Unlike ReverbEffect, which generates a procedural noise-based IR, `ConvolutionEffect` accepts a *real* decoded IR - enabling convolution reverb from acoustic-space captures, cabinet/speaker simulations, telephone/pipe character filtering, and any other linear time-invariant transformation.

Pass the IR as an `AudioBuffer` (typically decoded via `AudioContext.decodeAudioData`) or as a `Sound` (its `audioBuffer` is used). Omitting the IR leaves `convolver.buffer` as `null`, making the wet path silent and the effect act as a passthrough until setImpulse is called - safe to add to a bus before an IR is available.

Node graph: ``` input(GainNode) → dryGain → output(GainNode) input → convolver → wetGain → output ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet × gain`.

Constructors1
Methods2
destroy(): void
Disconnects all audio nodes and releases resources. Must be called when the effect is no longer needed.
Set or replace the impulse response. Accepts a decoded AudioBuffer, a Sound (its audioBuffer is used), or null to clear the IR (wet path goes silent). Safe to call before the audio context is ready - the impulse is stored and applied once nodes are created. **Web Audio note:** normalize is written to the convolver *before* buffer is assigned, as required by the spec for the value to take effect.
Properties6
gain: number
Makeup gain multiplier applied to the wet path. Range 0..4, default 1. Adjusting this changes the wet-path amplitude without altering the dry/wet balance ratio.
inputNode: AudioNode
The node where audio enters this effect. Throws if the audio context is not yet initialized.
normalize: boolean
Whether the browser normalizes the IR for equal-power loudness. Mirrors ConvolverNode.normalize. Default true. Changing this at runtime re-assigns the current buffer so the new value takes effect (a Web Audio requirement: normalize is only applied on buffer assignment).
outputNode: AudioNode
The node where audio exits this effect. Throws if the audio context is not yet initialized.
ready: Promise<void>
Resolves when the effect is fully initialized. Defaults to immediately-resolved for sync effects.
wet: number
Wet (convolved) mix level, 0..1. The dry level is automatically 1 - wet. Changes are ramped smoothly via setTargetAtTime. Default 1.0.
Source