Upward Compressor - best practice

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I created an upward compressor. The characteristic curve looks good and it works fine until the input signal gets very low, then it starts to blow up.

For me, it looks like a natural behavior regarding the calculation. When the signal gets very quiet the volume increases more:

Code: Select all

if (input < threshold)
    output = threshold + (signal - threshold) / ratio
else
    output = input
    
Is this a normal behavior of this type of compressor and what is a good way to avoid this?

Post

Looks like limiting the maximal amplification to the ratio value seems to work well. Another option would be an additional gate for low signal volumes to avoid endless amplification.

Post

Rather than thinking about upwards or downwards compression in particular, think of a compressor as having an "active range" where there is a lower threshold below which we do nothing and an upper threshold above which we do nothing and then two knees that could be anything from hard to very very soft asymptotic shapes..

Thinking this way, all the upwards and downwards and whatever midwards compression just becomes a matter of choosing different parameters. In practice, when we either set the lower threshold for downwards compression or the upper threshold for upwards compression, if the other threshold differs by about 40dB or so, that's usually enough that it doesn't have a huge practical effect anymore, especially if the "hidden thresholds" knee is soft.

So.. rather than scratching your head with what to do with almost-silence, just set a generous lower threshold some 40 or 60dB (or whatever) below the upper threshold and make the knee soft if you don't want it to be noticeable. Then for very quiet signals the compressor is below active range and there's no gain reduction, just makeup. As the signal increases it passes (eg. through a soft knee) into the active region where we gradually start doing gain reduction.. and then when we hit the upper threshold we stop.. which is the main thing that makes gives "upwards" compression it's character.

But.. algorithmically all different kinds of compressors can use the same basic setup: two thresholds and adjustable knees chosen depending on what kind of compression you want.

Post

mystran wrote: Wed May 01, 2024 7:58 pm But.. algorithmically all different kinds of compressors can use the same basic setup: two thresholds and adjustable knees chosen depending on what kind of compression you want.
Thanks for that idea. It sounds like a good solution to do it that way. When the threshold can be smaller and greater than 1, we probably can use the same setup for expansion.

Post Reply

Return to “DSP and Plugin Development”