ChorusA chorus audio effector that creates a thickened, widened sound by duplicating the signal, modulating delay times, and mixing the result back with the dry signal.
This effector is typically used for pads, leads, and guitars to add depth and movement.
import { Chorus } from "@fluex/fluexgl-dsp";
const chorus = new Chorus({
rate: 1.5,
depth: 0.7,
delayTime: 0.03,
feedback: 0.2,
mix: 0.5
});
await chorus.InitializeOnAttachment(audioContext);
new Chorus(options?: Partial<ChorusOptions>): Chorus;
options?: Partial<ChorusOptions>label: string | nullCustom label for this effector. Defaults to "Chorus".
name: stringInternal name for this effector. Defaults to "Chorus".
inputNode: AudioNode | nullThe input node of the chorus effect.
outputNode: AudioNode | nullThe output node of the chorus effect.
InitializeOnAttachment(context: AudioContext): Promise<void>Initializes the chorus effect by constructing internal delay, gain, and modulation nodes and wiring them into the DSP graph.
context: AudioContextPromise<void>SetOptions(options: Partial<ChorusOptions>): voidApplies chorus parameters such as rate, depth, delay time, feedback, and mix. Live-updates internal nodes when possible.
options: Partial<ChorusOptions>void