A Distortion effect created with a Waveshaper Node, with an approach adapted from Kevin Ennis
This class extends p5.Effect. Methods amp(), chain(), drywet(), connect(), and disconnect() are available.
Syntax
p5.Distortion([amount], [oversample])
Parameters
amount
Number:
Unbounded distortion amount. Normal values range from 0-1.
oversample
String:
'none', '2x', or '4x'.
Fields
WaveShaperNode
The p5.Distortion is built with a Web Audio WaveShaper Node.
Methods
process
Process a sound source, optionally specify amount and oversample values.
set
Set the amount and oversample of the waveshaper distortion.
getAmount
Return the distortion amount, typically between 0-1.
getOversample
Return the oversampling.
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!