I got this idea while studying how precision digital limiters work. Along the way, I found someone had already produced and patented this idea...
http://www.jbkaudio.com/DOSSIER%20PDF/Aphex%20PDF/720-722.pdf
But that doesn't mean we can't enjoy our own private implementations...
As they point out in their brochure, limiters tend to suffer from pumping and lifelessness when they kick in hard. Since the music is usually dominated by the bass, that region also tends to pull along the mid and high frequencies in conventional limiters.
By splitting the sound into 3 bands, low, mid, and high, and placing identical limiters on each subband, the bass is most likely to be limiting, while the other two are less likely.
However, limiting is just compression with a high ratio. It cannot prevent the output from climbing above its threshold level (!Limiter). So in addition to independent multiband limiting, we take the summed outputs from the limiters and compare against another user settable threshold (!Threshold). When the summed output climbs above that second threshold (which doesn't have to be the same as the Limiter thresholds!), we feed back a little of the error signal to the limiters, causing them to further reduce their own thresholds until the summed output is at or below that second threshold.
This tends to make the limiter sound more transparent, because while the limiters have their thresholds reduced by the feedback system, the bass is most likely the one to begin limiting, while the other two bands may not even be anywhere near their thresholds. This situation can reverse in some kinds of music. But at any rate, likely only one of the 3 bands is in need of limiting.
The version attached here works in stereo and uses the average peak detected output from both L and R to drive the system feedback. Otherwise you could end up destroying the stereo balance.
It uses a DSP sound of mine calle Log2Norm. If you don't want to use that you can use a wavetable instead. This Sound computes the log2(input)/32. It is related to the dB scale given as dB(signal)/192. (32 was chosen for ease of multiplication and division by use of a left or right shift.)
I have to say this sounds pretty good.
--
DavidMcClain? - 25 Feb 2004
[Now why was I studying Precision Digital Limiters?... good question you ask...
I found an excellent discussion of the effects of clipping in digital mixing systems on the TC Electronics Web Site. They have a whole page of published articles by their people and many of these are well worth reading.
As one author correctly points out, just because you normalize your audio tracks to something like -0.3 or -0.5 dBFS doesn't mean you will avoid clipping of the audio. In fact, you need something like 3 dB of additional headroom to accommodate the effects of the output D/A conversion filters.
For various reasons, e.g., phase relationships, just because your digital peak level meter shows that you never go above the clipping level, the output could actually be driven by 3 dB higher. So digital peak level meters are suspect to begin with. Having recently implemented several of these in DSP code, I can also attest to the fact that actual peak values may be missed by the system that reports these to the user interface. It all has to do with sampling...
So, perhaps that is why SSC wisely highlights levels above -3 dBFS in red letters in their DSP Status window.
So in a desire to avoid the possibility of clipping, which itself induces aliasing artifacts in the sound reproduction (ugly!), I wanted to explore the use of a "Precision Digital Limiter" on the output of some of my systems. But good limiting is a nontrivial exercise. Just because you limit the audio in 3 subbands, and each therefore has a predictable output level, their sum signal at the output mix still has an unpredictable level. That's the whole purpose of the feedback monitor in the sound described above.
Now clipping induces aliasing distortion as well as harmonic generation. Compression and Limiting also induce harmonic distortions. Which is worse? As it turns out the spurious production of harmonics by all but the most extreme compression tend to fall well below the thresholds of human hearing, especially in the presence of a strong signal which further serves to desensitize the ear and mask faint levels. That means that compression and limiting are indeed to be prefered to just letting the signal clip at the digital max level.
This also points out the desirability of operating inside the DSP processing chains with sufficient headroom to avoid ever seeing the saturation limits of +/-1. And while doing this invites a poorer signal to noise, we do have 24 bits of audio -- and for good reason. If you did some of the things we do in Kyma in only 16 bits of precision you would have a pretty tattered sounding result with perhaps 8 or fewer significant bits of output audio. Using 24 bits internally means we have 8 bits of headroom before infringing on high signal-to-noise CD quality audio.
... just some thoughts... I know I have been prone in the past to try to use every bit of the available headroom, and push my audio close to 0 dBFS. I now see that is a big mistake.
--
DavidMcClain - 25 Feb 2004
There are some tools on the maket that prevent some kind of clipping.
Apparently, many normalising tools work at the sample level, meaning that no
single sample will go over 0 db. Obviously, converters don't output samples but a continuous waveform. While converting, some D/A may push signal above 0 by trying to output an even waveform (i.e. there should be a bump between two 0 db samples). That's the explanation I've red to justify a +/- 200$ leveler plug-in.
Sometimes I wonder why they put level knob on amplifiers!!! It seems that volume control
is implemented only to reduce volume!
--
KarlMousseau - 25 Feb 2004
Hi Karl,
Actually the reason for that little bump between two same-valued digital samples has to do with the interpolation filters used by the output convertors. If you take an ideal square wave and try to send it out the back, you'll end up with nice ringy things like we have in the Kyma Square21.aif. The reason is that an ideal square wave requires infinite bandwidth to represent those square corners. Since we don't have infinite bandwidth you get the curvy composition of the component sinewaves, and then a whole lot of aliasing for the higher frequency components that can't be created at the given sample rate.
Those bumps and wiggles between two samples are examples of the "Gibbs Phenomena" where any individual component sinewave might actually have an amplitude about 40% greater than the amplitude of the ideal square wave being represented. That's 2.92 dB, close enough to 3 dB, more headroom needed just to represent that one component. Since the computer stores only the ideal waveform, it doesn't take the precaution of ensuring that you have enough headroom in the output converters. So we have to do that ourselves. That's why the 3 dB limit is recommended.
As another instance, consider a sinewave at 0 dBFS. If you have the spot-on phasing where you actually sample the waveform maximum and minimum values, then you fit within the prescribed headroom. No clipping. But... if you are unlucky enough to have sampled at a quarter wavelength phase offset, then your sample values at 0 dBFS actually represent a p-p sinewave amplitude of about 3 dB greater than 0 dBFS.
So here are two instances where the vagaries of digital signal processing run head first into translation problems back to the analog world. The best advice then is to ensure that you never normalize to higher than -3 dBFS. You can do that yourself without having to pay $200 for a fancy tool to multiply every sample of a full-scale waveform by 0.71.
[ I suspect the only justification for charging $200 for that tool is the enormous effort required to present it with a pretty GUI. That does take real effort for so little action under the hood! ]
This is also the reason to avoid sending full-scale signals through the Kyma filters. If you have a narrow enough bandwidth in the filter a 0 dBFS input signal could well attempt to generate a +3 dBFS output result. But we don't have that extra headroom, our DSP's simply saturate at 0 dBFS and you end up clipping and generating harmonics.
For the longest time I was as confused about how to set proper digital mixing levels as anyone could be. I started with a consumer grade mixer running -10 dBV levels, into the Kyma which uses +4 dBu levels. They are apples and oranges because of the different way of specifying the reference levels, but they are approximately 12 dB apart.
Then came questions of how much headroom to allow. For the longest time I have been using -10 dBFS in the Kyma to represent my 0 dBVU level on the board. But now some recent work has me reconsidering to -15 dBFS, and preferably -12 dBFS because of the ease of that latter conversion (just shift by 2 bits for 12 dB). But some gear here in the studio is consumer grade -10 dBV with a nominal zero level of -15 dBFS. Whew!
It is clear to me that allowing only 10 dB of headroom for the peaks isn't really enough. And that was when I used -10 dBFS as the 0 dBVU level. Now with the need to allow another 3 dB of headroom that means only 7 dB for the peaks in music. Definitely not enough. I understand the big boards like the Neve's allow as much as 24-36 dB of headroom. My power supplies can't provide that much! Heh!
--
DavidMcClain - 25 Feb 2004