Limiter Calc
Hello everybody,
I am working with my SigmaStudio board contains a microcontroller and a ADAU1701, I wonder how the microcontroller to calculate the parameters of the limiter. Attack and Release of preference in mS / dB.
Not found any information about it.
Hugs to all,
Cleber
Audio Signal Processors
SigmaDSP Audio Processors
adau1701
Dear Analog Devices,
Any News ? or Any Solution..
Tks,
Cleber
i Am Wait One Response from analog devices...
Hi
It took me a while to find this too
Timeconstant = 1.0 - (dbperseconds / (10.0 * fs));
Hold = fs * milliseconds / 1000;
Decay = dbperseconds /(96.0 * fs);
fs = samplerate
I found it in the help file under algorithm information ->level detectors
Its also under dynamics processors->compressors->combo peakRMS
only that compressor shows the info in the help file
Cheers
Brett
Brett,
Thank you for the answer but the threshold is different from the compressor will give you a recording of exepmplo I got the Capture window
Limiter:
RMS Limiter TC (500dB/Seg) = 0.00240135192871094
Decay (23dB/Seg) = 1.19209289550781E-07
Complement Decay?? = 0
PeakRMS Compreessor
RMS TC = 0.00240135192871094
PeakRMSComboMon1decayAll = 0.001953125
PeakRMSComboMon1decay = 5.00679016113281E-06
Now below we have the same values calculated according to the formula in excel which you passed:
RMS TC = 0.99895833333333300000 = 1 - (500dB / (10 * 48000))
Decay = 4.9913 E-06 = 23dB / (96 * 48 000)
values of different compressor and limiter, besides having the complement decay in the limiter is still missing something, you can tell me what's going on?
Hugs
Cleber
yes it looks like your correct. The RMS TC formula does not work.
I tested the Hold. And it outputs in 28.0 format correctly
I tested the Decay and it works out reasonably close in 5.23 ( I assumed some rounding errors)
But the RMS TC is very wrong.
Also On the subject of the dynamics.
The Post Gain also DOES NOT appear to follow the same format as other faders or gain blocks.
Can anyone assist here?
Thanks
My Friends,
Can anyone assist here?!!! Please...
Analog Devices,
Help me!!
Tks.
Cleber
The equations for the limiter parameters are:
RMS dB/s = abs(1.0 - 10^(rms/10*fs)), where "rms" is the value entered in the block.
Decay dB/s = 2^(-decay), where "decay" is the value entered in the block
Decay complement = 1.0 - 2^(-1.0*(23 + decay))
The decay complement is only used to determine the flag output of the limiter and is not used in the limiting processing.
Sorry for the delay in getting this information out.
Thanks
The RMS dB/s = abs(1.0 - 10^(rms/10*fs)), where "rms" is the value entered in the block
Works out Ok.
But the decay is still not correct
Decay dB/s = 2^(-decay), where "decay" is the value entered in the block
My Compressor Block is set to 100. The capture Window shows 2.16960906982422E-05
using your furmula does not give me the same answer??
thanks
Sorry for the delayed response. I was out of the office this week.
The decay parameter is actually dependent on sample rate. I figured out the formula simply by using the capture window.
If my project is at a 48 kHz sample rate, and I set decay to 100 dB/s, the capture window displays 0x00 0x00 0x00 0xB6. Moving the slider either way I can see that this value scales linearly and by bringing the control all the way down to zero the capture window displays 0x00 0x00 0x00 0x00.
Similarly, for a 44.1 kHz sample rate, a decay of 100 dB/s gives me 0x00 0x00 0x00 0xC6 and a decay of zero gives me 0x00 0x00 0x00 0x00.
So, converting those numbers to 28.0 integer format, I get 182 and 198, respectively.
I can also convert those to 5.23 decimal format simply, which gives me 2.16960906982421E-05 and 2.36034393310546E-05, respectively.
For more information about number formats and how to do those calculations, see page 11 of this app note: https://www.analog.com/static/imported-files/application_notes/AN-951.pdf
Or here: https://ez.analog.com/message/12605#12605
Or here: https://ez.analog.com/message/13377#13377
Sample Rate
Decay Setting
Hex Value in Capture Window
Converted to 28.0 Integer Format
Converted to 5.23 Decimal Format
48 kHz
100 dB/s
0x00 0x00 0x00 0xB6
182
2.16960906982421E-05
48 kHz
0 dB/s
0x00 0x00 0x00 0x00
0
0
44.1 kHz
100 dB/s
0x00 0x00 0x00 0xC6
198
2.36034393310546E-05
44.1 kHz
0 dB/s
0x00 0x00 0x00 0x00
0
0
So, performing a linear interpolation on those points you get:
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 delay 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.
It's a match!
Note: This will work with all dynamics processors in the SigmaStudio library, as they all use the same decay code.
Thanks everyone,
Jerad, I'm trying to simulate the formula RMS / TC but I can not excel at is giving error.
Below is the formula I am using
= ABS (1-10 ^ (50/10 * 48000))
where 50 means 50dB / S
Thank you for the support,
A giant hug to everyone.
Cleber
Hi Cleber
It works OK for me.
Maybe check your Oder of Calculations
For me
ABS (1-(10 ^ (50/(10 * 48000))))
So 10 x 48000 = 480000
50 / 480000 = 1.0416666666666 E-4
10^1.0416666666666 E-4 = 1.000239881380079 etc
1- 1.000239881380079 = -0.000239849090576172
ABS -0.000239849090576172 = 0.000239849090576172
That matches the Debug Capture for me.
Thanks
Brett
Thanks BrettG for the Decay Calc That works
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
Please log in to reply.