On the forum there are several places where the calculation is shown for the peak and RMS compressors.

For the standard compressor that looks like this:

This one the parameters are entered as milliseconds rather than dB per second.

For the Standard compressor, the parameter that is stored in the DSP is the same as all the other compressors which is derived from the dB/second number. What is different in this compressor is that you enter the number as a millisecond of attack or release. So what needs to be done is to translate the millisecond number to dBps (dB per second) then apply the formula to get the gain factor that is applied to every sample.

Attack:

So here it is. I will separate these as two different calculations.

dBps = dB per second

X = the number entered into the GUI, in this case it is the time in milliseconds.

Tc = Time Constant that is entered into the DSP parameter memory location

ln = natural log. (This will be a constant, no need to calculate this every time.) ln(10)= 2.302585093 on my calculator

fs = sampling rate

Step 1: calculate the dBps

dBps = 20,000/ (X * ln(10))

Step 2:

Tc = 1.0- (10^ (dBps / (10*fs) ) )

Decay:

So here it is. I will separate these as two different calculations.

dBps = dB per second

X = the number entered into the GUI, in this case it is the time in milliseconds.

Release = Release that is entered into the DSP parameter memory location

ln = natural log. (This will be a constant, no need to calculate this every time.) ln(10)= 2.302585093 on my calculator

fs = sampling rate

Step 1: calculate the dBps

dBps = 20,000/ (X * ln(10))

Step 2:

Release = dBps / (96*fs)

HOLD:

This is just the number of samples in integer format. It is used as a counter.

Hold = fs * X/1000

Now, when I calculate this using my calculator I get a slightly different number on the last few digits. This means that there is some round-off or truncation happening. For the purpose of attack and release times of a compressor this will not make an audible difference. The numbers are so close.

On the forum there are several places where the calculation is shown for the peak and RMS compressors.

For the standard compressor that looks like this:

This one the parameters are entered as milliseconds rather than dB per second.

For the Standard compressor, the parameter that is stored in the DSP is the same as all the other compressors which is derived from the dB/second number. What is different in this compressor is that you enter the number as a millisecond of attack or release. So what needs to be done is to translate the millisecond number to dBps (dB per second) then apply the formula to get the gain factor that is applied to every sample.

Attack:

So here it is. I will separate these as two different calculations.

dBps = dB per second

X = the number entered into the GUI, in this case it is the time in milliseconds.

Tc = Time Constant that is entered into the DSP parameter memory location

ln = natural log. (This will be a constant, no need to calculate this every time.) ln(10)= 2.302585093 on my calculator

fs = sampling rate

Step 1: calculate the dBps

dBps = 20,000/ (X * ln(10))

Step 2:

Tc = 1.0- (10^ (dBps / (10*fs) ) )

Decay:

So here it is. I will separate these as two different calculations.

dBps = dB per second

X = the number entered into the GUI, in this case it is the time in milliseconds.

Release = Release that is entered into the DSP parameter memory location

ln = natural log. (This will be a constant, no need to calculate this every time.) ln(10)= 2.302585093 on my calculator

fs = sampling rate

Step 1: calculate the dBps

dBps = 20,000/ (X * ln(10))

Step 2:

Release = dBps / (96*fs)

HOLD:

This is just the number of samples in integer format. It is used as a counter.

Hold = fs * X/1000

Now, when I calculate this using my calculator I get a slightly different number on the last few digits. This means that there is some round-off or truncation happening. For the purpose of attack and release times of a compressor this will not make an audible difference. The numbers are so close.