Compressor is an audio effect class that performs dynamics compression on an audio input source. This is a very commonly used technique in music and sound production. Compression creates an overall louder, richer, and fuller sound by lowering the volume of louds and raising that of softs. Compression can be used to avoid clipping (sound distortion due to peaks in volume) and is especially useful when many sounds are played at once. Compression can be used on indivudal sound sources in addition to the main output.
This class extends p5.Effect. Methods amp(), chain(), drywet(), connect(), and disconnect() are available.
Fields
The p5.Compressor is built with a Web Audio Dynamics Compressor Node
Methods
Performs the same function as .connect, but also accepts optional parameters to set compressor's audioParams
Set the paramters of a compressor.
Get current attack or set value w/ time ramp
Get current knee or set value w/ time ramp
Get current ratio or set value w/ time ramp
Get current threshold or set value w/ time ramp
Get current release or set value w/ time ramp
Return the current reduction value