API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classBitCrusherEffect
Lo-fi bit-crusher effect implemented as a WorkletEffect. Applies two classic degradation stages in series: 1. **Bit-depth reduction** — each sample is quantized to `2^bits` discrete levels, adding harmonic distortion characteristic of low-resolution audio. 2. **Sample-rate reduction** — a phase-accumulator sample-and-hold circuit re-latches the (quantized) input only `normFreq` times per input sample on average, producing aliasing artefacts reminiscent of early digital hardware. The worklet emits a pure wet signal; dry/wet mixing is handled by the base class.
import { BitCrusherEffect } from '@codexo/exojs-audio-fx' Lo-fi bit-crusher effect implemented as a WorkletEffect. Applies two classic degradation stages in series:
1. **Bit-depth reduction** — each sample is quantized to `2^bits` discrete levels, adding harmonic distortion characteristic of low-resolution audio. 2. **Sample-rate reduction** — a phase-accumulator sample-and-hold circuit re-latches the (quantized) input only `normFreq` times per input sample on average, producing aliasing artefacts reminiscent of early digital hardware.
The worklet emits a pure wet signal; dry/wet mixing is handled by the base class.
new(options: BitCrusherEffectOptions): BitCrusherEffect _onWorkletReady(): void destroy(): void bits: number frequencyReduction: number inputNode: AudioNode outputNode: AudioNode ready: Promise<void> wet: number