Kyma Forum
  Kyma Sound Exchange
  Wide Dynamic Range Compression

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Wide Dynamic Range Compression
David McClain
Member
posted 10 May 2001 13:17         Edit/Delete Message   Reply w/Quote

agc_compressor.kym

 
Here's a sound I found handy...

I needed to apply a fixed compression ratio at all levels down to more than -60 dB. I found that the Kyma compressor starts getting really noisy if the threshold is lower than around -30 dB.

So this compressor applies a long time-constant amplitude follower (e.g., 10 sec) to the input sound to try to get a handle on the mean level. Then the following gain block normalizes the sidechain input to the compressor so that this mean level is at -12 dB. (A poor-man's AGC) I typically run the compressor with a threshold of -18 to -24 dB. The input signal is fed straight into the compressor with this modified side-chain.

The long time constant on the side-chain mean level assures that fast attacks and decays won't pump. A threshold of -24 dB with a mean level of -12 dB gives you +/-12 dB of, play which seems to cover most cases.

The net result is that I can cleanly compress all the way down!

Note that "wide dynamic range" really should read "moderate dynamic range compression applied to signal of wide dynamic range for mean levels..."

When would you use this? Well anytime you want to apply frequency selective compression you have to send the signal through a bandpass filter. The output of that filter is typically much lower than the overall sound level. Often it is not even enough to trigger compression with a threshold of -24 dB. So using this allows the compressor to settle in at the mean level of the filter output and apply its magic.

BTW: For those that worry about this sort of thing (and who may need to adjust the output level of the compressor to proper levels...)

The equation of the compressor seems to be:

1. Divide the input signal by 3 (= -10 dB approx).

2. Apply gain G = S*(1/R - 1) + Gpost
where S = sidechain level (remember it's negative!), R is the compression ratio, and Gpost is the post compression gain.

Hence the output level is:

Vout = Vin - 10 + S*(1/R - 1) + Gpost

when everything is measured in dB. When the input signal is also the sidechain signal this reduces to

Vout = Vin/R - 10 + Gpost

...hence it is a classical compressor in this mode. The decrease in output level is 1/R times the decrease in input level.

Enjoy!

- DM

[This message has been edited by David McClain (edited 10 May 2001).]

IP: Logged

David McClain
Member
posted 10 May 2001 19:11         Edit/Delete Message   Reply w/Quote

agc_compressor.kym

 
...as usual here is an improved version plus the original...

The improved version is really a 2-level compressor that behaves in the small like the one discussed above. But when the gross amplitude of the input changes dramatically over the long term, this one tracks that change and corrects the output gain so that the compression ratio is maintained over the full dynamic range.

In the sound, the only change is to incorporate the AmplitudeFollower output in the post compression gain of the compressor.

!GMax is the max allowable gain increase -- too much and you go all the way to the noise floor.

When the input is a max amplitude the additional gain should be near zero. It won't be because I scaled the input signal of the follower by 0.1. There is also a factor of 1/ln(2) at the output of the follower. So there will be a 23 dB additional gain against the -10 dB already applied to the input to the compressor.

At min input level the gain will be boosted by no more than !GMax.

This works terrifically and I now have a pretty good compressor that has a dynamic range of more than 60 dB.

The output equation for this 2-stage compressor is (everything measured in dB down from max signal, i.e., negative)

Vout = Vin - 10 + (Vin - <Vin> - 12)(1/R - 1) + Gpost + ((<Vin>(1/R - 1)) vmax: Gmax)

where <Vin> represent the amplitude follower output = averaged input level.

Over the long haul, the AGC seeks to keep the compressor centered at a sidechain level of -12 dB. Hence the mean output level over the long haul is

<Vout> = <Vin>/R + 2 + Gpost - 12/R

The last 3 terms are all constants, so in effect the output is the input divided by the compression ratio - over the entire dynamic range.

- DM

[This message has been edited by David McClain (edited 10 May 2001).]

IP: Logged

oivindi
Member
posted 11 May 2001 11:02         Edit/Delete Message   Reply w/Quote
To SSC: Please hire David as a sound designer! His contributions to this forum has been nothing short of outstanding, and boy is he thorough!

keep it up, David!

/Řivind/

IP: Logged

David McClain
Member
posted 11 May 2001 12:27         Edit/Delete Message   Reply w/Quote
Hey thanks /Řivind/!

I just enjoy using the incredibly powerful Kyma/Capy so much that I contribute little snippets of what I run into. I'm still in the learning phase with Kyma.

It turns out that this topic was prompted by some work I am doing on hearing restoration. Last night I sat down and worked out the equations for the errors or artifacts produced by both fixed gain filter banks and by frequency selective gain compression techniques. Both exhibit errors.

Fixed gain filter banks are correct at only one input amplitude level and the errors grow increasingly worse as the sound loudness departs from this level. Louder sounds get subtly too loud, and softer sounds get too soft.

Compressors respond to increases quite rapidly and so they minimize the error of sounds that grow louder. But they tend to hang at this lower gain setting, and so if the sound gets suddenly quieter then it becomes too soft. They are also prone to "pumping" which filter banks are not.

There is no perfect solution that I can think of. If anyone has any other ideas I'm eager to hear them. It appears to be impossible to reconstruct perfect hearing - once lost it is always lost and we can only approximate what it once was.

But at the same time, some of these artifacts can be quite pleasant. I hear percussive high frequencies more acutely than most people, and I can even hear things like the tines of a piano string, and the flapping of clarinet keys. The exaggerated sound colors also add a lot of spice to otherwise humdrum tracks.

- DM


IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c