k y m a • t w e a k y — the kyma collective || view the current website || February 2015 Archive

/ WebHome / Sounds / Share.DiscussPrecisionSpectralProcessor


Share Section



All Sections


Login / Register 
Change password
Forgot password?

Symbolic Sound

Kyma Forum
Eighth Nerve

TWiki Links

TWiki Formatting FAQ
What is TWiki?
%SESSION_ENDIF% twiki.org
Okay, while the Precision NG/Compressor/Limiter/Clipper was LOUD... this one is more subtle and detailed.

This sound contains the same 5-band stereo precision limiter with feedback control, and the output soft clipper, and the noise gates. But instead of simple compression, this one offers a preliminary 8-band stereo EQ with shelving lo/hi filters at each end, and in the middle a 5-band spectral processor in the Dbx sense...

[... I originally said Dbx, but Dolby is the one with the spectral processor model 740]

Dolby defines a spectral processor as one which offers, in multiple bands, a special kind of compression. Such compression offers none above the upper threshold, and user definable maximum gain away from unity gain at a much lower threshold.

The idea here is, instead of being LOUD, this one offers up compressive enhancement of the finer details in the musical sound. Only those components below the upper threshold (Dolby uses -10 dB) get any sort of compression. And the compression is typically mild, being specified as so many dB gain at the lower threshold (typically 3-10 dB boost at a lower threshold ranging from -60 dB to -40 dB).

So the sound is quite a bit different than simply pushing the music to the max and killing all dynamic range. Instead, we leave the louder portions of the music alone (within the limits imposed by precision limiting), and gain a subtle amount of compression on the softer portions of the music to make these little details stand out a bit better.

The actual compression ratios applied depend on the maximum desired gain at the lower threshold, and the distance in dB between the thresholds.

ratio = (ThreshLo? - ThreshHi?)/(Gmax + (ThreshLo? - ThreshHi?))

Using typical values of ThreshLo? = -50 dB, ThreshHi? = -25 dB, and Gmax = 6 dB, you can see that we are only applying compression with the mild ratio of 1.3.

I don't know why working with ganged compressors is so confusing, but it just seems to be so. At any rate there is a script with some block contexts used as subroutines for computing the required compression ratios and gains.

A Kyma compressor is an object that offers a nominal gain of 1/3, and compresses as 1/Ratio for levels below 0 dBFS. By that I mean simply that if the ratio is R, then for every R dB below 0 dBFS, the Kyma compressor outputs a level 1 dB lower and then offset by -10 dB (= 1/3).

Another way of working with these compressors is to always specify a postgain of

ugain = (3 * (thresh * (1-1/R))dB)

I call this UGain because that amount of post gain in a Kyma compressor is sufficient to make the compressor exhibit unity gain at the threshold. Any additional post-gain applied raises the levels at threshold and below by that much additional gain.

So a dual compressor as used here applies the compressive ratio to all of the sounds above the lower threshold, then uses postgain to assure that the result has unity gain at the upper threshold. The next compressor then starts with that unity gain condition at its (the upper) threshold, and uses a compression ratio of 1/R to flatten out everything above that threshold.

One of the drawbacks of the Kyma compressors is that they work well only for the louder sounds and higher threshold levels. Being table based, they actually appear to use interpolation of slowly changing values at the top end of the scale, but fail to smoothly interpolate at the lower end of the scale where the compressive slope grows higher. The result, at high compression ratios and low thresholds is that the sounds coming out of them start sounding coarse and like they are breaking up.

This happens because instead of paying the price to do a conversion to dB world, they stay in amplitude land and attempt to interpolate a highly curved table based on a power curve of the amplitude. If we instead move into the dB domain, then these curves become straight lines and offer a consistent accuracy from interpolation. The difficulty is that converting amplitude levels to dB takes DSP time, and if you use table lookup to do this, then you are right back where you started with terrific resolution at the top end and poor resolution at the bottom.

A solution I have used for situations like this goes ahead and pays the price for more accurate Minimax polynomial approximation of the Log2 function over a limited domain from, say, 0.5 to 1.0, then use bit shifting and scaling to develop values for all other amplitudes. Then all compression is carried out in Log (dB) land, and finally converted back up to amplitude by means of another Minimax approximation for 2^x over a similarly limited domain. The results sound absolutely superb at all amplitudes, but this is costly of DSP cycles. However, I have found that the use of the approximation polynomials and scaling is still faster than developing a much larger table with sufficiently fine resolution at the low end, then using table lookup. My own experience has been that doing table lookup on a DSP is almost as expensive of DSP time as computing the minimax approximations. No perfect solution exists.

So just be warned, don't set the maxgains too high (e.g., > 10 dB) and the lower thresholds too high (e.g., > -40 dBSPL). If you do, you will likely hear the breakup in the sounds at lower levels. As long as you keep things subtle, as for mastering, the sound is much sweeter coming out of this processing.

-- DavidMcClain - 20 Mar 2004

Here is an updated SoundFile? containing an additional version of the Spectral Processor. After going to the Dolby Labs website and reading the detailed description of their Model 740, I decided to implement a version the way they describe doing it...

As it turns out, this also alleviates the breakup of high-gain applied at the higher threshold levels of the -60 to -40 dB threshold range. Two interesting things happen in the Dolby version...

1. The breakup of sounds disappears at high gains for very low level signals because I'm no longer using any compressors, and hence no need to interpolate an insufficiently fine table grid. Rather, I'm using a Kyma Constant block to compute the effective sidechain gain needed where there would have been a Compressor operating in Limiter mode at the low threshold.

2. Using the low-level processing and then adding to the original (delay compensated) signal causes the effective compression to extend from a high level of around -10 dBFS and swoop downward in a compression curve that looks like a ski-jump instead of a straight line. The result is that the lower the signal level, the more compression gain it gets, in a nonlinear manner. This happens because we are combining two signals that are related logarithmically. When there is a large difference in their dB amplitudes the two signals effectively sum to the louder of the two. But as they approach equal strength there is substantial curvature, with the result being a strong blend of the two. Finally when the gain situation is reversed, as happens at the lower threshold, you end up hearing mostly the enhanced low level signals.

I find this an interesting application of compression, to get the nonlinear curvature that you do. Unlike multiple compressors in series, however, you don't really get gains of 3 dB if you ask for something that small at the lower threshold. Because of the nonlinear addition of two logarithmically related signals you will actually get a bit more than this. Also there is no longer any VCS parameter to specify the upper threshold. Instead, as you get stronger and stronger the low level enhancements fade away in relation to the stronger signal. The addition of the two effectively becomes the original signal at levels of -10 dBFS and higher.

-- DavidMcClain - 21 Mar 2004

Here is the Dolby Spectral Processor, much cleaned up. I found that I was clipping internally under some conditions. And the Noise Gates have problems when you set the thresholds too low. Again, related to the table interpolation among coarsely spaced values.

So in order to overcome the problems in the Noise Gates, I preamplify the sidechains by 30 dB and internally elevate the thresholds by that much. Now the chatter at the bottom is seriously reduced.

Keeps sounding ever better...

-- DavidMcClain - 21 Mar 2004

Heh!! I was just browsing around the Dolby Lab's website and came upon some historical papers describing the early Dolby noise reduction system:


It turns out that Ray Dolby discovered this same interesting effect of adding linear compression (rather hard limiting) to the original signal, in several different bands, to create Dolby-A Encoding.

So what we have just re-invented here is a Dolby-A Encoder, of sorts... Which means that you might get the same kind of enhancement effets by listening to Dolby-A encoded recordings played back without the Dolby-A decoder!


-- DavidMcClain - 21 Mar 2004

© 2003-2014 by the contributing authors. / You are TWikiGuest