Distortion
class Effect ↳ extends Effect<DistortionOptions>
A simple distortion effect using Tone.WaveShaper. Algorithm from this stackoverflow answer. Read more about distortion on [Wikipedia](https://en.wikipedia.org/wiki/Distortion_(music).
const dist = new Tone.Distortion(0.8).toDestination();
const fm = new Tone.FMSynth().connect(dist);
fm.triggerAttackRelease("A1", "8n");Constructor
Section titled “Constructor”new Distortion(distortion?: number)Parameters
-
distortion
numberoptionalThe amount of distortion (nominal range of 0-1)
new Distortion(options?: Partial<DistortionOptions>)Parameters
- options
Partial<DistortionOptions>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.
distortion
Section titled “distortion”distortion: numberThe amount of distortion. Nominal range is between 0 and 1.
oversample
Section titled “oversample”oversample: OverSampleTypeThe oversampling of the effect. Can either be “none”, “2x” or “4x”.
Methods
Section titled “Methods”getDefaults()
Section titled “getDefaults()”static
getDefaults(): DistortionOptionsReturns all of the default options belonging to the class.
Returns DistortionOptions
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()