Reference set()

set()

Set the paramters of a compressor.

Syntax

set(attack, knee, ratio, threshold, release)

Parameters

attack
Number:

The amount of time (in seconds) to reduce the gain by 10dB, default = .003, range 0 - 1

knee
Number:

A decibel value representing the range above the threshold where the curve smoothly transitions to the "ratio" portion. default = 30, range 0 - 40

ratio
Number:

The amount of dB change in input for a 1 dB change in output default = 12, range 1 - 20

threshold
Number:

The decibel value above which the compression will start taking effect default = -24, range -100 - 0

release
Number:

The amount of time (in seconds) to increase the gain by 10dB default = .25, range 0 - 1

Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

Related References