I want to know more about where it is advantageous to use a soft knee and where and why a hard knee is preferred. Also I would like to get my hands on some good resources which talk about implementation of soft knee in DRC

  • $\begingroup$ we need to be careful with the "compression" tag. most DSPers think of data compression, but this is signal level compression. $\endgroup$ Jan 30 '16 at 2:34
  • $\begingroup$ hey thanks @endolith for creating the tag and applying it to a few different posts. $\endgroup$ Jan 30 '16 at 3:51
  • $\begingroup$ now someone needs to rename "compression" to "data-compression". I'm not allowed apparently $\endgroup$
    – endolith
    Jan 30 '16 at 4:21
  • $\begingroup$ well you got more rep than me, so i can't either. $\endgroup$ Jan 30 '16 at 4:27
  • $\begingroup$ May I suggest a tag for companding (or compansion) which results from a merger of compressing and expanding? @robert bristow-johnson $\endgroup$ Mar 1 '16 at 7:19

Regarding advantages - there is only one I can think of... The soft knee makes the compressor less noticeable. It sounds more natural, especially when you are dealing with higher compression ratios (like 4:1, etc.).

On the other hand, if you want to participate in the "Loudness War", then you should rather use hard knee, as it allows you to squeeze out even more loudness.

Regarding implementation. Assuming the:

$T$ - threshold

$W$ - soft knee width (soft knee extends from $T-\frac{W}{2}$ up to $T+\frac{W}{2}$)

$R$ - compression ratio

The soft knee compressor is governed by the equation:

$$ y_G = \begin{cases} x_G & x_G-T<\frac{-W}{2} \\ x_G+\frac{\left(\frac{1}{R}-1\right)\left( x_G - T+ \frac{W}{2}\right)^2}{2W} & |x_G-T| \le \frac{W}{2} \\ T+\frac{x_G-T}{R} & x_G - T > \frac{W}{2} \end{cases} $$

Here is how the compression curve will look like:

enter image description here

If you want to achieve the hard knee, then just drop the middle equation:

$$ y_G = \begin{cases} x_G & x_G < T \\ T+\frac{x_G-T}{R} & x_G > T \end{cases} $$

Obviously then you will get the following compression characteristic:

enter image description here

Whenever you have to do something about Dynamic Range Compression, I suggest you to take a look at the article below. Those guys did a great job of putting together all the info. Nonetheless I highly recommend reading the articles in references.

Giannoulis D. et al. - Digital Dynamic Range Compressor Design - A Tutorial and Analysis

  • $\begingroup$ I'm curious to know how that soft knee formula is derived. The tutorial doesn't mention anything about it. $\endgroup$
    – Nikolozi
    Jun 7 '19 at 6:17

depends on if you like discontinuities in your signal or parameter processing chain, or if you like it if the mathematics is as continuous as possible.

how to implement a soft knee? consider this function:

$$ f(x) \ = \ \alpha_0 \ x \ - \ \beta \ \log_2 \left(1 + 2^{\frac{\alpha_0 - \alpha_1}{\beta} (x - x_0)} \right) $$

for $ 0 < \alpha_1 < \alpha_0 $ and $ \beta > 0 $.

tell me what you get for tiny $\beta$ and then what you get for nominal $\beta$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.