Skip to content
Tone.js

BitCrusherWorklet

internal class ↳ extends ToneAudioWorklet<BitCrusherWorkletOptions>

Internal class which creates an AudioWorklet to do the bit crushing

new BitCrusherWorklet(options?: Partial<BitCrusherWorkletOptions>)

Parameters

read-only

bits: Param<"positive">

read-only

input: Gain

The input node or nodes. If the object is a source, it does not have any input and this.input is undefined.

read-only

name: string

The name of the class

Default: "BitCrusherWorklet"

↳ inherited from ToneAudioWorklet

onprocessorerror: (e: string) => void

Callback which is invoked when there is an error in the processing

Default: noOp

read-only

output: Gain

The output nodes. If the object is a sink, it does not have any output and this.output is undefined.

dispose(): this

Dispose and disconnect

Returns this

onReady(node: AudioWorkletNode): void

Invoked when the module is loaded and the node is created

Parameters

  • node AudioWorkletNode

static

Returns all of the default options belonging to the class.

Returns BitCrusherWorkletOptions