StereoDelayA stereo delay: the left and right channel are delayed independently, each with its own delay time. Different times (for example 300 and 450 ms) make the sound wider.
Extends Effector (through the internal DelayEngine base class).
All four delays (MonoDelay, StereoDelay, PingPongDelay and AdvancedDelay) run the same WebAssembly delay engine in a different mode. Delay time changes glide smoothly over about 50 ms, so changing the time while audio plays gives a short pitch bend instead of a click. The delay keeps processing when its input goes silent, so echoes ring out naturally.
import { StereoDelay } from "@fluex/fluexgl-dsp";
const delay = new StereoDelay({ delayLeftMs: 300, delayRightMs: 450, feedback: 0.35, mix: 0.3 });
channel.addEffect(delay);
new StereoDelay(options?: Partial<StereoDelayOptions>): StereoDelay;
options?: Partial<StereoDelayOptions>
Every field is optional, falls back to the defaults below, and is clamped to its valid range.label: string | nullDefaults to "StereoDelay".
name: stringDefaults to "StereoDelay".
delayLeftMs: numberDelay time of the left channel (ms), between 1 and 4000. Defaults to 300.
delayRightMs: numberDelay time of the right channel (ms), between 1 and 4000. Defaults to 450.
feedback: numberBetween 0 and 0.98. Defaults to 0.35.
mix: numberDry/wet mix, between 0 and 1. Defaults to 0.35.
strictMode: StrictModeDefaults to StrictMode.Disabled.
initializeOnAttachment(context: AudioContext): Promise<void>Creates the StereoDelayProcessor AudioWorklet node with the current values.
returnOptionsAsObject(): StereoDelayOptionsReturns a snapshot of the current values.
setDelayLeftMs(delayMs: number): booleanSets the delay time of the left channel (ms).
delayMs: numberboolean - true when the value was sent to the processor (or applied to the audio node), false when the effect is not attached yet. The value is stored either way and used on attachment.setDelayRightMs(delayMs: number): booleanSets the delay time of the right channel (ms).
delayMs: numberboolean - true when the value was sent to the processor (or applied to the audio node), false when the effect is not attached yet. The value is stored either way and used on attachment.setFeedback(feedback: number): booleanSets the feedback, clamped between 0 and 0.98.
feedback: numberboolean - true when the value was sent to the processor (or applied to the audio node), false when the effect is not attached yet. The value is stored either way and used on attachment.setMix(mix: number): booleanSets the dry/wet mix, clamped between 0 and 1.
mix: numberboolean - true when the value was sent to the processor (or applied to the audio node), false when the effect is not attached yet. The value is stored either way and used on attachment.A mono input is treated as the same signal on both sides. With equal times, StereoDelay then sounds like MonoDelay.
Inherited from Effector. The StereoDelayProcessor processor sends processor-wasm-instantiated when its WebAssembly module is ready, and an incoming-processor-message for every parameter change.
Runs on an AudioWorklet backed by WebAssembly. Attach it only after await pipeline.initializeDpsPipeline(), on the AudioDevice returned by resolveDefaultAudioOutputDevice(). Requires a worklet and WASM build from FluexGL-DSP-WebAssembly 0.4.9 or newer, which registers StereoDelayProcessor.