el.compress(atkMs, relMs, threshold, ratio, sidechain, xn)
A simple hard-knee compressor with parameterized attack, release, threshold, and ratio, with an optional sidechain input.
@param {Node | number} atkMs– attack time in milliseconds@param {Node | number} relMs– release time in milliseconds@param {Node | number} threshold– decibel value above which the comp kicks in@param {Node | number} ratio– ratio by which we squash signal above the threshold@param {Node} sidechain – sidechainsignal to drive the compressor@param {Node} xn– input signal to filter
Example:
// Imagine we have some drum sequences with the following names, summed into
// a single drum bus
let drumBus = el.add(kick, hat, snare, cymbals);
// We can compress the drumBus directly by passing it both as the sidechain
// signal and as the signal to filter
let out = el.compress(10, 100, -48, 4, drumBus, drumBus);