Skip to content
Tone.js

BitCrusher

class Effect ↳ extends Effect<BitCrusherOptions>

BitCrusher down-samples the incoming signal to a different bit depth. Lowering the bit depth of the signal creates distortion. Read more about BitCrushing on Wikipedia.

// initialize crusher and route a synth through it
const crusher = new Tone.BitCrusher(4).toDestination();
const synth = new Tone.Synth().connect(crusher);
synth.triggerAttackRelease("C2", 2);
new BitCrusher(bits?: number)

Parameters

  • bits number optional
new BitCrusher(options?: Partial<BitCrusherWorkletOptions>)

Parameters

read-only

bits: Param<"positive">

The bit depth of the effect

Range: 1 to 16

↳ inherited from Effect

input: Gain

The effect input node

read-only

name: string

The name of the class

Default: "BitCrusher"

↳ inherited from Effect

output: CrossFade

The effect output

↳ inherited from Effect

wet: Signal<"normalRange">

The wet control is how much of the effected will pass through to the output. 1 = 100% effected signal, 0 = 100% dry signal.

dispose(): this

Dispose and disconnect

Returns this

static

getDefaults(): BitCrusherOptions

Returns all of the default options belonging to the class.

Returns BitCrusherOptions