@audio/ effect-bitcrusher
Status calibrated
npm1.1.5licenseMIT
Bitcrusher — sample-rate reduction + bit-depth quantization
import bitcrusher from '@audio/effect-bitcrusher'
Sample-rate reduction (zero-order hold) + bit-depth quantization.
bits target bit depth 1–24 (default 8) · rate sample rate ratio 0–1 (default 0.25, quarter rate) · fs sample rate
import bitcrusher from '@audio/effect-bitcrusher'
// 8-bit, quarter sample rate (lo-fi)
let p = { bits: 8, rate: 0.25, fs: 44100 }
for (let buf of stream) bitcrusher(buf, p)
// Bit depth only, no rate reduction
bitcrusher(buf, { bits: 4, rate: 1 })
Use when: lo-fi aesthetics, game audio, retro console sound, stutter effects
Not for: smooth saturation (use distortion)
Part of @audio/effect — the effect family umbrella. This README is generated from the umbrella docs.
MIT © audiojs