Ok, I've taken a first look at the broadcast limiter by Edgar.
Since compressors and limiters are not in my province, I have to put some questions to you (Steve or others).
There are three controls:
- Threshold
- Knee
- Limit "Output Level"
As you can imagine, it's hard to find a bug if you don't know what the plug-in is supposed to do or rather, how it should react to the different settings.
First of all, threshold seems to me an unlucky name. The control goes from 0.05 to 1.0. Normally, I would expect threshold to be a dB unit and the effect takes effect about this value. By entering 0.5, the plug-in will amplify the whole signal by 6 dB or a factor of two. This seems to indicate that "threshold" is rather a ratio (1:2). Either we change the name to ratio with the same value range or substitute it with an amplification slider (in dB). By the by, the code defines "amplication" as 1/threshold.
Then there is the "Limit" control from -20 to 0 dB. Since the official name is "Output Level" one might expect that the maximum sample value will be the linear expression of this control (i.e. -3 dB = +/- 0.707 max. sample value). This seems to work if half of the knee value doesn't exceed the limit value. This means, if you choose 0 dB as the target output level and a knee of 3 dB, the max resulting sample value will be 0.947421 instead of 1.0.
Is this the bug we are looking for? Shouldn't the output level always be the value defined by the user and the knee start at -3 dB(in the case above)?
I suggest the following corrections:
- "threshold" will be changed to either "ratio" or "Amplification"
- "Knee" is changed to "Knee (Range)"
- "Output level" stays the same but the code is such modified that this value is always respected.
I am not sure wheter the input signal should not be better normalized prior to the limiter application. This applies in particular to input signals that are above 0 dB (those peaks are simply hard-clipped). If we do that, the third control could also be named "Min Headroom". On the other Hand, if a Signal below 0 dB is also normalised, this control could alternatively be named "Target Gain" (negative dB) or "headroom" (positive dB), since the output is now absolute.
I don't know yet if the knee function returns the right values, that's hard to tell from the sample values alone.