Tuesday, October 11, 2011

Sounds Get Squished, Sounds Get Gooder

One of the first things I learned about working with music on computers is that the most important effect you can use is compression. The next thing I learned was that it's the least understood effect. Lord knows I didn't understand it. I'm not entirely certain I do now, but I feel confident enough to blather about it in a blog post. I'm pretty sure that I know it well enough to describe it, even if my own application of it would make proper audio engineers point and laugh. But why worry? Nobody reads this blog. And if anyone ever does and they happen to know where I've gone wrong, maybe I'll finally learn!

Original, compressed and final side-by-side-by-side
Quick 'splain
[1] Because of peaks, levels can only be increased so far using just volume controls.
[2] Compression squishes the peaks down.
[3] Now volume controls can raise the levels more effectively.

That's a quick overview, but I'm going to go into more detail about each stage. Read on, if you care.

Uncompressed (normalized) original

Stage one is normalized, uncompressed audio. Normalized means that the volume is increased as much as possible without the loudest parts distorting. Essentially, it's turning up the volume. It gets a fancy name because it scans the audio first to find the maximum. This sounds similar to compression, but there is a key difference: normalizing works on everything by the same amount; compression changes volume dynamically. I didn't really need to normalize, but the source I was using was a little bit quiet and I wanted the peaks to be noticeable. I've put a red circle around one peak in particular. We'll see what compression does to it.

Compressed

In stage two we've compressed the audio. It's not a mysterious process, it simply squishes the loudest parts down to a level more similar to the non-loud parts. Check out what's in the red circle now: nothing! That big peak is still a peak, it's just less of one. The quieter parts have stayed the same. That's compression, and it really doesn't sound like something you'd want to do, does it? It's even more baffling when you think that it's mainly used to turn things up! Look for yourself:

Normalized after compression

In stage three I've used the good ol' normalizer to turn everything up. (You could use just the volume controls and most compressors have a volume (or gain) control, too.) But check out the view of the audio now; it's much fatter. In other words, louder. Everything has been turned up without the peaks distorting; just like we wanted.

It's important to note that the original audio is the loudest it can possibly get using just a volume control. (Without those high peaks distorting badly.) To really make the audio louder, you need to use compression to "tame" the peaks. That's the power of compression. To understand the need for it, imagine a singer whose volume varies. Actually, you don't need to imagine it. Every singer's volume varies unless they're a robot. Without compression, their louder parts can be heard but their quieter parts can get drowned out by the instruments. Use of compression allows their whole singing track to be raised in volume more evenly so that everything they sing can be heard.

You can now scroll back up to the first image that shows all three at the same time. You can also check out the next two images to look at the difference another way.

Before and after together

That's the first and last images overlaid. The original audio is bright green and the final audio looks like a darker green glow around it. Check out how the quieter parts have a thicker glow and the big peaks have a thin glow. To see it better, I've blown it up:

Zoomed-in before and after

So that's compression. It equalizes audio... but it's not an equalizer. It allows us to turn things up by turning some things down. Not so hard after all, is it? Maybe in a future post I'll include actual audio so you can both see and hear the difference.

No comments:

Post a Comment