# Formulas for Compressor Decay, Hold, Attack

Question asked by db10 on Mar 15, 2011
Latest reply on Mar 18, 2011 by db10

In the October 28 time period, a discussion was generated in which the formulas for compressor/limiter hold, decay, and attack times were corrected .

Excerpt:

Value stored in RAM (in 28.0 integer format) = Sample Rate (in Hz) / 26373 * Decay Setting.

And to get to 5.23 format just multiply that result by 1.19209289550781E-07.

Here's an example. Type in 50 dB/s in the decay control. You should see 0x00 0x00 0x00 0x5B in the capture window. That equals 91 in 28.0 integer format and 1.08480453491211E-05 in 5.23 decimal format.

So, let's see if that matches the calculation:

48000 / 26373 * 50 = 91.

91 * 1.19209289550781E-07 = 1.08480453491211E-05.

Is a more theoretical treatment of the derivation of the attack and decay formulas available? For example the formula above was essentially derived by test driving different settings and recording what values are reported in the capture window. I'd be interested in understanding why the slope of the line is determined by 48K / 26373 in the above example and where the value 26373 comes from.

Thanks,