ΣSigmaStudio Ask AI Русский Log in

Compresser RMS TC from dbpersecond to attack time(ms)

SigmaDSP & SigmaStudio Philip Mar 3, 2011 00:00 10 replies Original on forum ↗
Subscribe
Philip Question
Mar 3, 2011 00:00

I am using the sigmaDSP with a user interface though a MCU control.

I need to control the three parameter of the compresser block(RMS TC, hold, decay)

For the convertion from dbpersecond to the signma audio's number, I did the calculation correctly following the link below:

https://ez.analog.com/message/14502#14502

But I want to create a user interface that allow user to have typical attack time/ release time input in unit of ms.

Any suggestion about how to do that?

Thanks

Philip

Philip Reply
Mar 3, 2011 00:00

By the way, I am using the adau1701 with sigma studio 3.3

ADIApproved Reply
Mar 3, 2011 00:00

Hi Philip,

SigmaStudio's compressors have timing based on the concept of constant-dB transitions. However, what you're used to seeing on most traditional compressors (at least, on the front-panel controls) is the concept of contant-time transitions.

First let's talk about SigmaStudio's compressors. Here's an example: Imagine I have a compressor that limits at -6 dB, with an instant attack, zero hold time, and a release set to 6 dB/s. If I feed in a short full-scale pulse, the compressor will instantly compress to a gain of -6 dB, then immediately start to increase the gain at a rate of 6 dB/s. The total release time is therefore 1 second.

If I then set the limiting threshold to -24 dB, with all other settings the same, and fed in the same pulse, you can calculate that the release takes 4 seconds.

In other words, the timing parameters of the compressor is not constant. It actually depends on many factors, including the compressor's transfer curve and the level of the incoming signal. Let me know if this doesn't make sense.

The funny thing is that in reality, traditional compressors work this way as well. However, since I suppose it was hard for people to get their heads around the concept of dB/s, the attack and release times were shown (incorrectly) in units of milliseconds. You can test this pretty easily by using your favorite compressor and a stopwatch. Set the decay time to something very large, like 10 seconds. Then try inputting impulses of various levels. You'll notice that the release time is anything but constant.

My colleague has written an interesting document about this issue. It contains a formula that will help you to translate SigmaStudio's technically-correct but rarely-seen dB/s units to the technically-incorrect but universally-used ms units. I'll post it here once I get a hold of it.

Philip Reply
Mar 8, 2011 00:00

Thanks a lot for your detail explanation and looking forward for your document.Thanks

ADIApproved Reply
Mar 8, 2011 00:00

The document actually just turned out to be a conversion formula. It's quite interesting because the curves are not linear, but instead are constant-dB, which more closely matches an RC circuit. Therefore, the natural log is used in the calcuation.

Conversion formula: TC(ms) = 20/(dbps *ln(10)) *10^3

where

TC(ms) = Time constant in milliseconds

dbps = the dB/s value displayed in SigmaStudio

ln(10) = the natural log of 10 = 2.30258509

Example: For a value of 100 dB/s, TC = 86.85 ms

Proof:

Two points define a line: (0,0)

(1, -100 dB)

Line: y = mx + b

y = -100*t [y is in dB, t is in sec]

Convert y to linear y’: -100*t = 20log(y’)

-5*t = log(y’)

y’ = 10^(-5*t)

Find the TC for y’: y’ = e^(-t/TC) [t is in sec]

10^(-5*t) = e^(-t/TC)

ln[10^(-5*t)] = -t/TC

TC = -t/[ln[10^(-5*t)]

= -t/(-5*t *ln(10))

= 1/(5*ln(10))

= .08685 s

= 86.85 ms

Using Conversion Formula:

TC = 20/(100*ln(10))*10^3 = 86.85 ms

Soundmax Reply
Mar 21, 2011 00:00

Brett,

these formulas can be applied to the Limiter?

Tks

ADIApproved Reply
Mar 21, 2011 00:00

Yes, the calculations for the RMS compressor and RMS limiter are the same. That's also true for the decay parameter.

stmoeller60 Reply
May 9, 2011 00:00

my measurements show that the

1) RMS/standardResolution/FullRange/NoPostGain/NoDetectorInput/RMS(no gain) compressor

and the

2) Limiter

must have different formulas for calculating release and attack time from db/s to ms .

Why is this so ?

The Formula =20/(B3 *LN(10)) *10^3 seems not right when I look at my measurement :

The upper limiter has : TC=30db/s,Hold=0,decay=30, Threshold : -17db
The lower limiter has : TC=80db/s,Decay=14db/s,Threshold: 20db

3e8a1222077b9c3351c6fe346fc08639.jpg
3e8a1222077b9c3351c6fe346fc08639.jpg
3e8a1222077b9c3351c6fe346fc08639.jpg-450x322.jpg
3e8a1222077b9c3351c6fe346fc08639.jpg-450x322.jpg
stmoeller60 Reply
May 26, 2011 00:00

anybody here to reply ?

ADIApproved Reply
May 26, 2011 00:00

The TC (time constant) parameter is actually not an attack control. It controls how quickly the input of the cell is able to react to a changing input signal level. Basically, you can think of each of these cells as having a "detector" on the front end. The detector tracks the input level by approximating its RMS value. This RMS calculation is not true RMS because that would be very expensive in terms of computation. Instead, it uses a time constant and does a sort of time-averaged level detection of the input signal. So, in your example tests where the input level quickly jumps to a lower value, the detected level of the signal will actually be calculated differently because the TC values for each of the cells is different. I suspect that this might be causing the discrepancy that you're seeing between the two cells.

I will also check with the software team to verify if the release is computed in the same way for each cell.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin