API reference

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

C

classDistortionEffect

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

Distortion effect built from native Web Audio nodes — no worklet required. The input signal is split into a dry path and a wet path. The wet path runs through a `WaveShaperNode` loaded with a tanh-based soft-clip curve, then through a `BiquadFilterNode` (lowpass) acting as a tone control, before being mixed back with the dry signal. The wave-shaper curve is rebuilt any time `drive` changes. Oversampling is delegated directly to `WaveShaperNode.oversample`. Node graph: ``` input(GainNode) ──── dryGain ─────────────────────────── output(GainNode) input ──── waveShaper ── toneFilter ── wetGain ── output ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`.

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

Distortion effect built from native Web Audio nodes — no worklet required.

The input signal is split into a dry path and a wet path. The wet path runs through a `WaveShaperNode` loaded with a tanh-based soft-clip curve, then through a `BiquadFilterNode` (lowpass) acting as a tone control, before being mixed back with the dry signal. The wave-shaper curve is rebuilt any time `drive` changes. Oversampling is delegated directly to `WaveShaperNode.oversample`.

Node graph: ``` input(GainNode) ──── dryGain ─────────────────────────── output(GainNode) input ──── waveShaper ── toneFilter ── wetGain ── output ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`.

Constructors 1
new(options: DistortionEffectOptions): DistortionEffect
Methods 1
destroy(): void
Properties 7
drive: number
inputNode: AudioNode
outputNode: AudioNode
oversample: OverSampleType
ready: Promise<void>
tone: number
wet: number
Source