2015-03-26

Golden Eyes: Experiments with Audio - Part 7 (Squeezing Those Waves)

[ Catch up:  part 1part 2part 3part 4part 5, part 6 ]

I am back with more eye candy! This time we will squeeze and squash our waveforms for fun and profit, in other words we will compress them. This compression should not be confused with 'audio data compression to reduce size' like in a mp3 format.

The kick sample is a good candidate to demonstrate this effect. We have four tracks with different variations of compression applied to them. The final amplitudes have been roughly matched here for easy comparison (using the makeup gain):

Compression at work

Let's see all the binary comparisons to our original:

A1

A2

A3

A4

You can enlarge the images by clicking on them. If you have first looked for high or low frequency loss or addition, you would have seen that there isn't any. All the frequencies are accounted for. The only difference seems to be in the amplitude or volume of some parts. Let's also look at the comparison between A2 and A3 for the heck of it:

A2 & A3

The amplitudes in the beginning seem to be different though the final parts of the tracks look the same in amplitude. Notice also the timeline. The whole part takes about about 100 ms in time with the first low frequency wave spanning about 10 ms and the longest sinusoidal wave spanning 20 ms (which means the frequencies are 100 Hz and 50 Hz). The amplitude comparison would be really easier if we overlay them like this:

A1 (black) & Original (red)
 A1 looks almost the same except being somewhat quieter in the beginning.

A2 (black) & Original (red)

A2 looks similar but the second low frequency peak in the waveform seems quieter than the rest.

A3 (black) & Original (red)

When we come to A3, the differences become noticeable. It looks like it is quieter overall with larger attenuation for louder parts.

A4 (black) & Original (red)

A4 looks same as A3 in the beginning; however the attenuation is greater in the following section. Let's look at A2 vs A3 vs Original for a better understanding.

A2 (blue) & A3 (black) & Original (red)

The difference lies in the beginning where the amplitudes are greater. Is it a time-based effect, or amplitude-based, or both? Let's add A4:

A2 (blue) & A3 (black) & A4 (green) & Original (red)

A4 is same with A3 in the beginning but then it becomes quieter after some time. Finally, A1 is added:

A1 (orange) & A2 (blue) & A3 (black) & A4 (green) & Original (red)

A1, as we noticed before, only differs in the beginning and about the same in the following parts. So, what is happening here?

The answer is compression! It is both an amplitude-based and a time-based effect. The settings are like this:

  • A1: Maximizer (short attack, short release, practically infinite ratio)
  • A2: Compressor with 10:1 ratio, 50 ms attack, 3 ms release (long attack, short release)
  • A3: Compressor with 10:1 ratio, 5 ms attack, 3 ms release (short attack, short release)
  • A4: Compressor with 10:1 ratio, 5 ms attack, 50 ms release (short attack, long release)

Threshold point is the same for all. In short, maximizer tries to cut all the peaks above a certain threshold immediately to allow an increase in volume and compressors do the same but gradually using a time component for activation and deactivation. This is why A2 (with a slower attack) does not start compressing immediately at the beginning but gradually compresses for 50 milliseconds while A3 starts compressing the offending peaks almost immediately. Meanwhile A4 does not want to let go for a while, even after the offending peaks have been passed :).

The comparison would be easier on a repeating faster drum hits. Notice the timeline on the following example. Every labelled tick is 100 ms in time. Here the compression threshold is also lower.

Drum part compression comparison

 As we can see, maximizer (A1) tries to remove (gently) all the offending peaks to allow for a louder sound (after adding make-up gain) while removing transients (making the sound less 'punchy'). The compressor with a slower attack (A2) passes more of the transient 'attack' part of the beat while compressors with fast attacks (A3 & A4) leaves only the very beginning of the 'attack' sound. This makes the difference between a 'fatter' kick sound and a 'punchier' kick sound. A very-fast (or immediate) attack would make the sound even less punchier and perhaps 'duller'. Adequate use of compressors is a long topic and maybe best left for another article.

Let's compare them one by one (this time on black):

A1-maximizer (white) & Original (red)

Yep, the maximizer removes all of our precious transients (see loudness wars!).

A2 [long attack, short release] (white) & Original (red)

A long attack gently carves out the transients.

A3 [short attack, short release] (white) & Original (red)

A short attack leaves out only the immediate transients carving out the excess fat :).

A4 [long attack, long release] (white) & Original (red)

A long release means we also squeeze the quiet parts (sustain and release part of the drum hit). If there are above-threshold parts encountered during the release part of a compressor, these will be immediately compressed regardless of the attack settings since we are already activated at that time. Therefore, it is not a good idea to time the release longer than two consecutive attacks of our sample.

A2 [long attack] (white) & A3 [short attack] (blue) & Original (red)

Long attack vs. short attack in plain sight above. Let's see the 'difference' tracks also! These difference tracks show 'what' exactly carved out by the compression.

Differences with the original for the tracks A1, A2, A3, and A4
Many variations of compression can also be easily heard with an experienced ear. This post completes this series that was started as a curiosity.

Until next time....
Cagil

No comments:

Post a Comment