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

On the Problem of Peak Compressor Algorithm

SigmaDSP & SigmaStudio chenxuezong509@126.com May 25, 2023 00:00 4 replies Original on forum ↗
Subscribe
chenxuezong509@126.com Question
May 25, 2023 00:00

In the Compressor Curve window, we can set 30 points, 60 points, and 120 points. How do these three values affect the output signal?

I have set up several different sets of curves and exported the data. Can I write these different sets of data through an external controller while the DSP is running?

Thanks & Regards

Gavin

Audio Signal Processors

adau1452

software

SigmaDSP Audio Processors

pastedimage1685069870852v1.png
pastedimage1685069870852v1.png
pastedimage1685069955567v3.png
pastedimage1685069955567v3.png
Harishgowtham Reply
May 26, 2023 00:00

Hello Gavin,

I will try to explain it.

Those 60 points cover the range of 180dB. That is -140dB to +40dB that you can see in the graph. Each point is 3dB apart.

So, take the above screenshot I used 60 points which means each point is 3dB apart. I don't want any compression till -20dB (of my input). If my input goes above -20dB (like -10dB,0dB) then I need a compression as you see in the graph.

As I said, each point is 3dB apart and it starts from -140dB. So, it will take 40 points to come to -20dB. Until then the point value will be unity (1.0, so my input will be multiplied with 1.0 and outputs the same value). You will see 1.0 as a point value up to address 83(Address 44 to 83 = 40 points). At the point 41, it will start compressing.

You can see the value difference between the point 40 and 41 is -3dB and the value difference between the point 41 and 42 is -3dB.

You can see in the capture window that the points value starts from address 44 and will end at address 104(60 points). So, the 40th point address will be 83. The difference between point 40 (address 83) and point 41(address 84) is -3dB. The value of Point 40 (address 83) is 0.9892454.

0.9892454 * 0.707 (-3dB) = 0.706062. This is value of point 41 (address 84).

0.706062 * 0.707 = 0.4985209. This is the value of point 42 (address 85) and so on.

You can verify it in the screenshot attached above.

If you change it to 30 points, then each point is 6dB apart to cover the 180dB range (-140dB to +40dB).

.

Here the address starts from 44 to 74 (30 points). The compression will start from 21st point (address 64).
Because -140 to -80 will take 1st 10 points (1-10) and -80 to -20 will take another 10 points (11-20) and -20 to +40 will take last 10 points (21-30)

The difference between the point 20(address 63) and 21(address 64) is -6dB.

The value of point 20 is 0.9892454.

0.9892454. * 0.5 (-6dB) = 0.4985209. This is the value of point 21(address 64)

0.4985209 * 0.5 = 0.2485231. This is the value of point 22(address 65) and so on. You can verify it in the above attached screenshot.

So, by using more points, you will have more precision over the compression at the cost of memory.

Bob wrote an excellent response on this topic here. Please refer that. It will give you more idea about this topic.

Yes, you can write this value from a uC while the DSP is running. The addresses for these parameters are given in the exported file (params.h file). You may need to safe load these values or mute the outputs while writing.

Regards,

Harish

Inkedcomp7.jpg
Inkedcomp7.jpg
Inkedcomp6.jpg
Inkedcomp6.jpg
chenxuezong509@126.com Reply
May 29, 2023 00:00

Hello Harish,

I calculated using the method you provided, but the data I received was somewhat biased.

0.9892454 * 0.707 (-3dB) = 0.699396,this his value is not 0.706062.

0.706062 * 0.707 = 0.494918, but 0.706062 * 0.706062 = 0.4985210. 0.4985210 is closer to 0.4985209.

I don't understand how to calculate the value of Point 40(0.9892454).

Using the Safeload mode, only 5 addresses of data can be written at a time, but this control has 62 sets of data, and the Safeload cannot write so much data.

When there are changes in the data, do we only need to update the changed data, or do we need to update all 62 sets of data?

Thanks & Regards

Gavin

Harishgowtham Reply
May 29, 2023 00:00

Hello Gavin,

I think sigma studio rounds it off. The example is just for you to understand how the calculation works. If you understand how sigma studio calculates the points, then it's fine.

chenxuezong509@126.com said:
I don't understand how to calculate the value of Point 40(0.9892454).

I guess the thing is, up to point 40 the value must be 1 but, in my example, it was 0.9892454 but it should be 1.0. it may be because of my curve settings. Sigma studio just calculates the value based on the curve points. So, set your required curve right in the graph, it will calculate the correct value.

chenxuezong509@126.com said:
Using the Safeload mode, only 5 addresses of data can be written at a time, but this control has 62 sets of data, and the Safeload cannot write so much data.

As I said above, if it's few parameters then you can safe load by using safe load registers but if it is more than that then you have to mute the outputs while writing new values.

chenxuezong509@126.com said:
When there are changes in the data, do we only need to update the changed data, or do we need to update all 62 sets of data?

That depends on your curve. If you take this above example, you don't have to change the first 40 points since those are unity and by changing next 5 points (point 41 to 45) you can make a gain reduction for the input between -20dB to -5dB (point 41 to 45 will cover 15dB (-20dB to -5dB)). so, it's up to you that where to change the curve points in the graph.

You can refer the link given in my previous reply and can search the forum for more references. There are a lot of posts with compressors.

Regards,

Harish

chenxuezong509@126.com Reply
Jun 4, 2023 00:00

Hello Harish,

The DSP is running and when the compression control changes.

How does this control work during the process of writing new data by a uC? Always keep the same state as before the update?

How long does it take for the control to start new work after the data is written?

Do I need to mute output or write by Safeload mode when updating Holdand Decay controls?

Thanks & Regards

Gavin

pastedimage1685875474344v1.png
pastedimage1685875474344v1.png