How Compression Affects Harmonic Distortion

For most styles of popular music compressors and limiters are a matter of necessity and taste. The advent of close miking came with an increase in the transient levels captured.

We use compressors to put the entire desirable dynamic range of an instrument back into a manageable space. We use limiters on the master bus to attempt to make the song sound louder. We’re aware that if not used correctly compressors can suck the life out of a song, erase an instrument’s transients, or, as we saw in this article, change an instrument’s timbre.

Harmonic Distortion

Harmonic distortion is another consequence of compression and limiting if the attack and release controls are improperly set. From my experience it’s an effect that is often mentioned but rarely discussed in detail. In this article we’ll take a closer look at how a compressor can actually generate harmonics.

Let’s start with a nice 80 Hz sine tone. 80 Hz is high enough of a frequency to ensure that it will be part of most mixes, but low enough to illustrate the compressor’s effects. Figure 1 and Figure 2 show the waveform and spectrum of the sine tone. This view actually includes a compressor that’s enacting a 3 dB gain reduction with a 1 ms attack time and 1 second release time.

Figure 1: 80 Hz sine wave

Figure 1: 80 Hz sine wave

Figure 2: Frequency spectrum of an 80 Hz sine tone

Figure 2: Frequency spectrum of an 80 Hz sine tone

Before we move any further, let’s take a moment to define exactly what we mean by attack and release time.

Attack and Release Time

When an input signal exceeds a compressor’s threshold it enables a certain amount of gain reduction determined by the compressor ratio. Some think of the attack time as the amount of time the compressor waits before it pulls the signal down. This is not quite true. The attack setting is the length of time it will take for the compressor to reduce the gain by a certain number of dB. So if a compressor has an attack parameter that is referenced to 10 dB and is set to 5 ms, that means that if 10 dB of gain reduction is called for (determined by the input signal level and threshold), then it will take 5 ms to attain that attenuation. In this way we see that the attack time parameter is actually a rate of change, not a delay of action. Similarly, the release time is the rate at which the compressor restores the gain reduction after the signal has dropped below the threshold.

Now, with the 1 ms attack and 1 second release times, the compressor is enacting 3 dB of gain reduction. This really doesn’t affect the signal at all. As soon as I turn on the tone generator, the signal exceeds the threshold. The wavelength of an 80 Hz tone is 12.5 ms. With a 1 ms attack time the 3 dB gain reduction has already been enacted long before the sine wave has a chance to complete even one cycle. The 1 second release time ensures that the compressor’s gain reduction never lets up, so all we have is a constant 3 dB reduction.

Taking the attack time all the way down to .05 ms but keeping the release time the same has no effect on the 80 Hz tone. The 3 dB gain reduction is constant with these settings. But let’s restore the attack time to 1 ms and reduce the release time. Figures 3 and 4 show the effect of taking the release time all the way down to .05 ms. We can see the waveform is no longer a nice, smooth sine wave and other frequencies have shown up in our spectrum analyzer.

Figure 3: 80 Hz waveform affected by short release time

Figure 3: 80 Hz waveform affected by short release time

Figure 4: Frequency spectrum of the waveform in Figure 3

Figure 4: Frequency spectrum of the waveform in Figure 3


Looking at the waveform in Figure 3, let’s step through the compressor’s operation.

Starting at the left most edge of the waveform, we see the signal rise. During this period the signal is below the compressor’s threshold. As it approaches its peak it crosses the compressor’s threshold and triggers the gain reduction. With the current attack time, and assuming the attack time is referenced to 10 dB of gain reduction, the compressor is set to take 1 ms to attenuate the signal 10 dB. With 3 dB of actual reduction shown on the compressor, this will take about one third of the attack time to accomplish, which is much shorter than the 80 Hz wavelength of 12.5 ms. But the attack time isn’t really the problem, it’s the release time that’s causing the issue.

Once the waveform dips below the threshold the compressor almost instantaneously restores the gain and eliminates any attenuation. The compressor is only reducing the level of the signal during the peaks, in between those the compressor is inactive. What this means is that instead of just momentarily lowering the level of a signal and slowly restoring it, the compressor is changing the actual shape of the waveform on every cycle.

Square Wave

Looking at the frequency spectrum in Figure 4, we can see in addition to the original 80 Hz sine tone another frequency at 240 Hz, 400 Hz, 560 Hz, and so on. Dividing each of these frequencies by the original 80 Hz shows us that we have the fundamental, third, fifth, and seventh harmonic, each with decreasing amplitude. Many of you might already be familiar with this recipe: a square wave.

The attack time is not the cause of this distortion, but it can exacerbate it. Decreasing the attack time makes the gain reduction happen even faster, further changing the shape of the peaks. The result in Figure 5 is a waveform that looks less like the original, and the spectrum in Figure 6 tells the whole story. The more you change the shape of a waveform itself, the more harmonic distortion you’ll produce.

Figure 5: 80 Hz waveform affected by short attack and release time

Figure 5: 80 Hz waveform affected by short attack and release time

Figure 6: Frequency spectrum of the waveform in Figure 5

Figure 6: Frequency spectrum of the waveform in Figure 5


Short attack and release times allow you to tame transients and therefore bring up the overall level of an instrument or mix. You can often hear the distortion creep in if you listen on headphones.

If you are hearing distortion you have a few options.

One method is to attenuate the low end before it hits the compressor or limiter enough to reduce or eliminate the distortion effects. This could mean a substantial, and probably unwanted, alteration to the tonality of your mix. The next method is to start with an increase your release time, followed by increasing your attack time, and playing with the best combination of settings.

The last option is to simply reduce the gain into the limiter or the compression ratio, if possible. This is the best option, and probably the one you should start with. If you’re hearing distortion artifacts from your compressor, it’s most likely you’re squashing the instrument or mix too hard anyway.

For more, check out 7 Resources for Learning Compression and Eric Tarr’s Analyzing Effects series.

Missing the best stuff?

Sign up to be the first to learn about new tutorials, sales, giveaways and more.

We'll never spam you. Unsubscribe at any time. Powered by ConvertKit
Barak Shpiez

Barak Shpiez

Barak Shpiez has earned several degrees in composition, audio engineering, and electrical engineering. His music can be found on programming on MTV, The History Channel, and more. Barak has also worked for several concert venues running live sound and as an engineer for Line 6 and DTS.
Smiley face
  • Walt French

    You’re pretty much stuck with the choices shown here if you’re running sound for a live performance. But in an editing role, you get to look ahead as many seconds as you want. Big 80Hz tone coming up? Ramp everything down 3db before it starts, and/or let the soft clipping add the odd harmonics that sound so awful to me but that tube amp lovers find so endearing.

    I don’t see how this is about tradeoffs, it’s about the sound you want from your recording. You can pretty much choose, hear the results, directly.

    The pity is that today’s audio technology could easily leave this up to users. When I’m in my car, I want the sound pretty heavily compressed so I don’t lose the soft parts or blast the guy 3 lanes over on the loud ones. With my headphones on, I’m much happier with the wider range. It would seem absolutely trivial to include a “track” for the levels appropriate to different environments, and let our phones or other music players conform it to our surroundings.

    • Kill Werk

      Lookahead is one of the worst features to openly hand to inexperienced producers bro, it causes your signals to drift from their timing and it’s hard to calculate how much compensation will be needed to fix the loosening. Specially with longer lookahead time on software. My best advice is to avoid and learn to process signals separately. Compression with lookahead is just as bad as running an auto-fade on freezes, the best way is to literally level your signal automation or be gentle on the compression/sidechaining with 0 lookahead.

    • Walt French

      Gosh, I was simply describing what every good engineer does: listen to the track before applying your magic to it. Nothing to do with changing timing or drift.

  • I like your description of attack and release times. It creates the right vision in your mind when you describe it.

  • Ian Mann

    Interesting article with a nice explanation of the attack and release times. If I can be pedantic – the wavelength of an 80Hz sinusoid is 4.3m at room temperature, 12.5ms refers to the period of an 80Hz waveform. I have a thing about mixing up the time and frequency domains!