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);Constructor
Section titled “Constructor”new BitCrusher(bits?: number)Parameters
- bits
numberoptional
new BitCrusher(options?: Partial<BitCrusherWorkletOptions>)Parameters
- options
Partial<BitCrusherWorkletOptions>optional
Properties
Section titled “Properties”↳ 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.
Methods
Section titled “Methods”getDefaults()
Section titled “getDefaults()”static
getDefaults(): BitCrusherOptionsReturns all of the default options belonging to the class.
Returns BitCrusherOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()