Help - Search - Members - Calendar
Full Version: @ sound engineers: How shall good DRC work?
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
LigH
Dear members,

as some of you may know, a few years ago (before BeSweet was made as a bridge between Azid and LAME) I dreamed of a good sounding and cheap dynamic compressor, because I didn't like the kind of DRC the usual AC3 decoders applied to their output. Mainly, I didn't like the "pumping": Amplifying the quiet parts is fine, but not if the loud parts loose so much power. I don't know if some of you remember the days when we recorded radio songs using a cassette recorder with "Automatic Gain Control"... sick.gif

I listened to the results of several dynamic compressor filters at PC musicians (mainly using different kinds of VST plugins in Cubase & Co.), but they all had some attack and release times. Therefore I guess they all work linear and ... well, let's call it "block based".

I know that it is impossible to linearly raise the volume of a quite normalised audio with high dynamic range. I have to treat quiet and loud parts differently or I would risk clipping. From what I learned in school about amplificating electronic components, semiconductor triodes clip hard when leaving their working area, tubes instead rather saturate. So I simply tried to find a kind of sinusoidal function which would allow to raise the volume of quiet parts, and avoid clipping due to the saturating behaviour towards infinity. These are:

(1) tangens hyperbolicus: Nicely linear around 0, rather sharp saturation;
(2) arcus tangens (scaled): A bit softer saturation;
(3) x / (|x|+1): Very soft saturation, probably hardly useful.

Of course, this is no "Tube Amp Simulation", not at all. But: In my tests with at first only function (1) on stereo audio, I was amazed by the powerful yet clear sound; I don't own many classical audio samples, but e.g. "Yello: Flag" was almost dynamically uncompressed on CD, hardly normalized - the difference was remarkable. Later I decided that function (2) was more suitable for compressing downmixed multi-channel audio streams of DVD movies (not everyone has an own home cinema in his own house, instead we have to care about our neighbors).

In my opinion, my "sample based" algorithms sound well, compared to "block based" compressors there is no pumping; well, of course, the waveform gest distorted remarkably (from sine towards square) - but I must say, that I enjoy the effect of emphasizing the "upper harmonics" (is that correctly translated? In german, I'd call it "Obertöne").

Now, I'd like to hear from sound engineers who know more about sound theory: Was my attempt useful, horrible, perfect ...?! Whatever: After releasing my WaveBooster (standalone version, processes WAV files - hopefully - with almost any usual sample resolution and channel count) as step between Azid's 24-bit output and LAME's 24-bit input (producing huge intermediate files), it is already quite widely used in other software (in BeSweet, in HeadAC3he, and for a short time also in Vidomi now). Some prefer the DRC provided by Azid, some prefer my Booster, some only normalize.

But all the years moving on, I still wonder if I made a piece of cake or a piece of sh...

(For downloads, please visit: the doom9 website; RareWares; for HeadAC3he: the german doom9/Gleitz forum searching for "Spielzeug"; or any other archive where you may have seen a copy of the mentioned tools.)
airon
QUOTE(LigH @ Aug 20 2004, 10:58 PM)
Dear members,

as some of you may know, a few years ago (before BeSweet was made as a bridge between Azid and LAME) I dreamed of a good sounding and cheap dynamic compressor, because I didn't like the kind of DRC the usual AC3 decoders applied to their output. Mainly, I didn't like the "pumping": Amplifying the quiet parts is fine, but not if the loud parts loose so much power. I don't know if some of you remember the days when we recorded radio songs using a cassette recorder with "Automatic Gain Control"... sick.gif


You can say that again. Always avoided those suckers.


QUOTE(LigH @ Aug 20 2004, 10:58 PM)
I listened to the results of several dynamic compressor filters at PC musicians (mainly using different kinds of VST plugins in Cubase & Co.), but they all had some attack and release times. Therefore I guess they all work linear and ... well, let's call it "block based".


They're all sample based of course. Those with latency "look ahead" too, and most today aren't linear anymore either. Take a look at the Kajaerhus Classic line for a free compressor and limiter, the Waves Renaissance Compressor, Sonalksis and so on.



QUOTE(LigH @ Aug 20 2004, 10:58 PM)
I know that it is impossible to linearly raise the volume of a quite normalised audio with high dynamic range. I have to treat quiet and loud parts differently or I would risk clipping. From what I learned in school about amplificating electronic components, semiconductor triodes clip hard when leaving their working area, tubes instead rather saturate. So I simply tried to find a kind of sinusoidal function which would allow to raise the volume of quiet parts, and avoid clipping due to the saturating behaviour towards infinity. These are:

(1) tangens hyperbolicus: Nicely linear around 0, rather sharp saturation;
(2) arcus tangens (scaled): A bit softer saturation;
(3) x / (|x|+1): Very soft saturation, probably hardly useful.

Of course, this is no "Tube Amp Simulation", not at all. But: In my tests with at first only function (1) on stereo audio, I was amazed by the powerful yet clear sound; I don't own many classical audio samples, but e.g. "Yello: Flag" was almost dynamically uncompressed on CD, hardly normalized - the difference was remarkable. Later I decided that function (2) was more suitable for compressing downmixed multi-channel audio streams of DVD movies (not everyone has an own home cinema in his own house, instead we have to care about our neighbors).

In my opinion, my "sample based" algorithms sound well, compared to "block based" compressors there is no pumping; well, of course, the waveform gest distorted remarkably (from sine towards square) - but I must say, that I enjoy the effect of emphasizing the "upper harmonics" (is that correctly translated? In german, I'd call it "Obertöne").


The pumping effect is usualy a compressor with a tight attack setting reacting to a signal with lots of bass energy, which triggers it, but brings down the entire signal, like someone twisting the volume knob in a rather ugly fashion. Also heard when applying a limiter realy badly.

QUOTE(LigH @ Aug 20 2004, 10:58 PM)
Now, I'd like to hear from sound engineers who know more about sound theory: Was my attempt useful, horrible, perfect ...?! Whatever: After releasing my WaveBooster (standalone version, processes WAV files - hopefully - with almost any usual sample resolution and channel count) as step between Azid's 24-bit output and LAME's 24-bit input (producing huge intermediate files), it is already quite widely used in other software (in BeSweet, in HeadAC3he, and for a short time also in Vidomi now). Some prefer the DRC provided by Azid, some prefer my Booster, some only normalize.

But all the years moving on, I still wonder if I made a piece of cake or a piece of sh...

(For downloads, please visit: the doom9 website; RareWares; for HeadAC3he: the german doom9/Gleitz forum searching for "Spielzeug"; or any other archive where you may have seen a copy of the mentioned tools.)


To be honest I've always shunned the 'compressors' for this kind of material, and I'm sorry to say I thus never tried your Waveboost compressor yet.

If all you want is to increase the loudness of the material, then I suggest you decode your tracks to PCM and run a very good limiter over it, which of course you have to tune if you don't have a Waves L2 or L3.

Compression is a very fine-tune affair, so it's down to taste and how much time you're willing to invest in this effort.

If you'd like to tighten up the dynamic range a bit, use a compressor with long attack and release times after which you place a good limiter. THis is only a starting point too. You can fuck around with multiband compressors, though I wouldn't recommend it, as only a select few refrain from spoiling your material.

There are actualy some free plugin algorythems available via the site
http://plugin.org.uk/

When mastering stuff I attempt to prevent the introduction of artifacts. Wavbooster might not be my cup of tea because of this, but I'll give it a try.
Pio2001
Your method seem OK, if we keep in mind that it is applied to all HDCD ! However, HDCD take cares that the compression is only applied to some isolated peaks. Most of the signal is uncompressed.
However, you will never completely get rid of pumping. Imagine that you have a sine wave of 3000 Hz, at -20 db. Then comes a 100 Hz sine wave at -3 db :

user posted image

If you apply your compression, you will get something like this (simulated) :

user posted image

The 3 kHz sine amplitude is pumped by the compression applied to the 100 Hz one. A multiband compressor should avoid this, I think.
SebastianG
QUOTE(LigH @ Aug 20 2004, 10:58 PM)
(...) In my opinion, my "sample based" algorithms sound well, compared to "block based" compressors there is no pumping; well, of course, the waveform gest distorted remarkably (from sine towards square) - but I must say, that I enjoy the effect of emphasizing the "upper harmonics" (is that correctly translated? In german, I'd call it "Obertöne").

(...)

But all the years moving on, I still wonder if I made a piece of cake or a piece of sh...

*



Funny thing is: I've done the exact same in a MOD-player for DOS using sin(x*pi/2) several years ago. But now I wouldn't make use of this kind of transform anymore. Time passed and I learned more about DSP and stuff. I realized that this kind of transform introduces harmonic distortions (as you correctly pointed out) which not only emphasize upper harmonics but creates them even if they weren't there before. The timbre gets artificially altered. It gets even worse if the signal is more complex than just a sine.

See Pio's example. The 3 kHz sine got amplitude-modulated (200 Hz) by the 100 Hz tone thus a 3,2 kHz and a 2,8 kHz sine is also present.

You should consider softening the gain adjustments in time to minimize those artifacts. IMHO a dynamic range compresser should not alter the timbre / introduce harmonic distortions. The waveform should locally look like a scaled version of the original.

(Time-variant gain adjustments always introduce harmonic distortoins but this effect can be minimized by smoothly adjusting the gain)


Sebastian
SebastianG
QUOTE(Pio2001 @ Aug 21 2004, 03:21 AM)
The 3 kHz sine amplitude is pumped by the compression applied to the 100 Hz one. A multiband compressor should avoid this, I think.
*



A multi band compressor is likely to adjust the gain of the bands differently (that's what it's for) and this will lead to a change of the timbre. I'm personally not interested in changing the timbre... In this example the 3 kHz tone will get amplified more than the 100 Hz tone (apart from the harmonic distortions which will get introduced, too).

A multiband compander is a good tool for special purposes (like hiss reduction or something) but IMHO not suitable for such thinks like DRC of music to get the quiet parts louder...

Sebastian
LigH
Okay - not so great for audiophiles.

But at least not too bad for movies? People who convert AC-3 multi-channel audio streams down to e.g. MP3, Ogg Vorbis or AAC, might be satisfied with these results... You know: To really enjoy the huge dynamic range of cinematic movies, you should own a house and build a cinema into your basement, but you shall definitely not "dwell in new housing development" (says dict.leo.org)...

On one hand, some kind of "pumping effect", on the other, introduced harmonics. I guess there is no easy way to reduce both of them easily with not too complicated algorithms... sad.gif -- So, for me, being someone who likes more harmonics, my results are satisfying for movie audio.
MugFunky
multiband compression only changes timbre in cases where you'd get an audible pump anyway... with loudness maximisation you have to think "lesser of two evils" rather than "perfect compressor".

for a movie, i'd say a very simple 2 or 3 band compressor would handle the large scale stuff, and reduce pumping, and a peak limit will bring the stray peaks down without hurting things much.

of course, the more bands, the more tweaking needed. you can literally spend weeks getting it right. i have a setup in a cool edit multitrack session that i called "shred"... music doesn't change timbre, but it comes out a shirtload louder (like RG -12dB). this is mainly just my own sick game of seeing how far i can push loudness, but i occasionally use it for my portable mp3 discman, which has a very inadequate headphone amp.

btw, this session isn't really good for wavebooster type applications - it runs in less than realtime on my machine (the machine i developed it on was a dual 3Ghz, but my home machine is a lowly p3-733).
Iain
Have you considered using a compressor in parallel with the audio signal. The theory behind this is that the compressor reduces the peaks of the track allowing you to turn up the gain without clipping, the quiet bits also get louder. The clean audio signal is mixed with the compressed signal and you retain the transient response of the clean signal and you have also raised the level of the quiet bits. biggrin.gif
blinded_with_science
QUOTE(LigH @ Aug 20 2004, 10:58 PM)
In my opinion, my "sample based" algorithms sound well, compared to "block based" compressors there is no pumping; well, of course, the waveform gest distorted remarkably (from sine towards square) - but I must say, that I enjoy the effect of emphasizing the "upper harmonics" (is that correctly translated? In german, I'd call it "Obertöne").
*



What you have created is simply called a non-linear transfer function.

The problem with the harmonics created is that they will try to go above nyquist (fs/2), and create severe aliasing. This is why any type of distortion sound so harsh digitally..

On program material with a very high peak-to-average ratio (i.e. tall narrow peaks but low average level), your approach probably sounds fine. However, if the audio maintains high level for any duration of time (a few seconds), it may not sound so good.

The analog equivalent of what you're doing (a diode acting as a soft/spongy clipper) would sound a whole lot cleaner.. Doing it in cleanly in digital is extremely complicated - you'd have to upsample to a very high sample rate (8x perhaps), do the non-linear processing there, and then filter out anything above 20khz before going back to your original sample rate - which you would do simply by using one of every 8 samples, and throwing away all the others. As long as you really filtered out everything above 20k (using a long, sharp FIR filter), this is the proper way to downsample.

Anyway.

Not to toot my own horn or anything, but for a good sounding dynamics processor, you may want to give my Volume Logic a spin. It's available at http://www.octiv.com , it's 5-band, and does a remarkable job of equalizing dynamics while still retaining enough transients to sound punchy and powerful, and without creating harmonics.

///Leif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.