audio

@audio/effect-bitcrusher1.1.6

Bitcrusher

Bitcrusher — sample-rate reduction + bit-depth quantization

Status
calibrated
Updated
Family
effect, 26 packages under it
Plugin
bitcrusher, effect, streaming, 2 parameters
Category
effects
Licence
MIT
Dependencies
none
Downloads
3,152 last month
Tests
138 in audiojs/effect's CI, passed at 5ff5a84,

Listen

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html
audio('/samples/music/modern/local-forecast.mp3').bitcrusher()

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html

Parameters

  • effect
  • streaming
bits
8
1 to 24
rate
0.25
0.01 to 1
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