audio compression

Music production basics – Part 2: audio compression and panning

Twitter
Visit Us
YouTube
Instagram
RSS
LinkedIn
Share

Understanding the functions of audio compression and panning are part of music production basics and will help you in the recording and mixing phases of your project.

music production basicsThis post was adapted and excerpted from Getting Started with Music Production by Robert Willey (Hal Leonard). Published with permission.

What is audio compression?

The word compression has a number of meanings in music production. The first relates to acoustics and describes an increase in pressure that air molecules can undergo. The times when air pressure is high are represented by peaks or high points in the graph of a waveform. The opposite of this type of compression is rarefaction – when air molecules are pulled apart and air pressure drops below normal. These times are indicated in the graph of waveform as dips or troughs.

How audio compression works
Figure 1. Peaks and troughs in a waveform caused by compression and rarefaction.

A second meaning of the word compression is in regard to data compression. This comes into play when converting full-fidelity WAV or AIFF audio file to a smaller file in MP3 format.

The type of compression that interests us here is audio compression, a process that automatically controls volume. Audio compression turns down the loudest parts of a track and saves the engineer from having to automate volume control by hand – a key element to understanding music production basics.

Let’s create an imaginary human drama to help us understand what the four controls of a compressor do. Imagine a grandmother or another trusted family member who has assumed responsibility for regulating the volume of the audio system in the living room, where she sits with her hand on the volume knob with her mind set on what the maximum volume level of the music should be. That volume level is called the threshold level. Once the amplitude of the signal coming into the amplifier gets louder than the level she has set for the threshold, she automatically turns the volume knob down, reducing the level of what goes out theloudspeakers.

Let’s imagine Grandmother is feeling fine today, and we’re playing a song that she likes. In this case, she sets the threshold fairly high (Figure 2), indicating that she will react to turn down only the very loudest parts of the song. Notice that only the peak amplitudes of the waveform go beyond the threshold volume level she has settled on (Figure 3). These are the parts that will be turned down.

What is compression in music
Figure 2. Settings for a compressor set with a high threshold. Notice the position of the threshold control and its effect on the breakpoint in the graph.
Audio compression
Figure 3. Only the loudest parts of the input waveform exceed the threshold set for the compressor.

Later in the day, Grandmother becomes annoyed with us, partly because we keep playing the same song over and over again. As a result, she now has a lower threshold of tolerance (Figure 4), and will turn the music down anytime it gets above medium loud (Figure 5). Since the input from the whole song is mostly medium loud or louder, she will be turning it down most of the time.

What is compression
Figure 4. Settings for an audio compressor set with a lower threshold. Notice the new position of the threshold control.
How audio compression works
Figure 5. The original input waveform with the new lower threshold level superimposed. Notice that the amplitude of most of the song is now above the threshold.

What the audio compressor does is reduce the volume of just the parts that exceed the threshold. Notice in Figure 6 that the soft parts – those below the threshold – have been left alone, and only the loud parts have been turned down.

How compression works
Figure 6. Everything above the threshold level has been reduced.

Two other main parameters affect the compressor. While Grandmother’s wisdom has grown over time, her response time has become somewhat impaired. There is a period of time between when she notices that the input level has exceeded the threshold and when she reacts and turns the volume down. We call this the attack time. The amount of time it takes for her to notice that the music input level has dropped back down below the threshold and turn the volume back up is called the release time.

Hopefully, thinking about a real-world analogy helped you visualize how audio compression works. Let’s send Grandmother off to find something more enjoyable to do, while we review how a compressor works by seeing how it could take over her job. An audio compressor is a device used for automatic volume control, saving the engineer from having to automate changes in volume over the course of an entire song. It turns down the loudest parts, leaving the softest parts alone. This reduces the dynamic range, since there is less difference in amplitude between the softest and loudest parts of a track.

Volume control

One application of an audio compressor is to raise the volume of quiet passages in music, to make it possible to hear them in noisy environments like cars. If the engineer simply raises the volume of the input to make the very soft parts louder, then the parts that were already very loud will get louder as well, and cause distortion since the speakers cannot handle them, as shown in Figure 7.

Audio distortion before using compression
Figure 7. Turning up everything to make the very softest parts audible will cause the very loudest parts to distort.
How audio compression works
Figure 8. Boosting the compressed signal raises the very softest sounds without distorting the very loudest parts.

The compressor can help avoid this by first turning down the very loudest parts of the input, so that they are only medium loud. The whole compressed signal can then be boosted – the very softest parts will become medium loud, and the very loudest parts will go back to where they originally were. This process is shown in Figure 8.

The first thing to adjust when using a compressor is the threshold level. This can be done by locating the loudest parts in a track and then setting the threshold level so that it is below the level of the peaks. Any time the input level to the audio compressor goes above the threshold, the compressor will be activated. Setting the threshold level too low will activate the compressor too often.

The attack time control in the compressor sets the amount of time it takes for the compressor to actually start turning the level down once the input level has exceeded the threshold. If the attack time is very short, the short transient sounds that help the listener identify which instrument is playing will be turned down. Cutting off the initial attack of a sound doesn’t help reduce the overall gain much. What is more helpful is to reduce the level of the steady sustained section, if there is one.

Compression ratio, release, and tremolo

The compression ratio is expressed as a ratio – two numbers separated by a colon. The number on the left side indicates how many dB the input has to increase to cause a 1 dB increase in the output – 3 to 1 is fairly mild, whereas 12 to 1 is severe. A compressor with a ratio of infinity to 1 is called a limiter, since it sets a hard level above which the output will never go.

The release time of an audio compressor refers to how long it takes for the compressor to stop turning down the sound after the input signal level drops back below the threshold level. As with the attack time, sudden changes of dynamics may not be desirable, so you may not want to set the release time too low.
Tremolo is another effect that can be used to automatically control volume. Whereas vibrato creates a repeated pattern of increase and decrease of pitch/frequency, tremolo causes a series of high and low amplitudes (Figure 9).

Music production tremolo effect
Figure 9. A recording of a guitar with a tremolo effect.

Panning

The last topic in this chapter on controlling volume is panning. Like fading (in and out), panning is a term that comes from the film industry: short for “panoramic,” an effect where the camera sweeps from one side of a scene to another. Since the inception of stereo audio reproduction, it has been possible to simulate the position of a sound by sending the track to both output channels with different volume levels. If you want the sound to appear to come out of the left speaker, then you send the full volume of the track to the left side and none to the right. If you want it to seem to come from the center, you send it at equal volume to both speakers. If you want it somewhat right of center, then you send it at a medium-loud level through the right speaker and a medium-soft level through the left.

Monophonic (or mono) means the same sound comes out of both speakers or out of the one speaker found on some televisions and radios. Stereophonic (or stereo) sound provides the option of using pan controls to separate tracks in the stereo field, thereby opening up space for each instrument to be heard.

The bass frequencies in low-pitched sounds spread out from the loudspeakers and fill the room, making it hard to know which speaker they are coming from, so there is not much point to panning them to one side or the other. For this reason, the bass guitar and kick drum are usually panned to the center position, along with other tracks like lead vocals that are meant to be the focus of the listener’s attention.

Start paying attention to the difference in panning effects created by loudspeakers compared with headphones. Spatial effects are easier to control for a listener wearing headphones, because the left ear hears only the left channel, while the right hears only the right channel. An engineer has less control over the how the listener experiences panning effects when the music is being played through loudspeakers, since the signal level that each of the ears receives from each speaker depends on the listener’s position in the room relative to the location of the loudspeakers.

Image of audio engineer via ShutterStock.com.

Getting Started with Music Production is for anyone interested in developing a more efficient and creative approach to music production, and it’s structured so thoughtfully that it can be used as a textbook for a modular, activity-oriented course presented in any learning environment. The fundamental concepts and techniques delivered in this book apply seamlessly to any modern DAW. The book includes 73 video tutorials, formatted for portable devices, that help further explain and expand on the instruction in the text. All supporting media is provided exclusively online, so whether you’re using a desktop computer or a mobile device, you’ll have easy access to all of the supporting content. Buy it at HalLeonardBooks.com.

Robert Willey grew up on the San Francisco peninsula, studied classical piano and performed with the Palo Alto Chamber Orchestra, attended Stanford University, and got a masters in computer music and Ph.D. in theoretical studies from University of California San Diego. He taught at the State University of New York Oneonta for three years, at the University of Louisiana at Lafayette for 11, and since 2013 is at Ball State University in Muncie, Indiana. Other books by Willey include Brazilian Piano – Choro, Samba, and Bossa Nova.

Build your own home recording studio

Read More
Music production basics – Part 1: amplitude and automation
Signal Processing For The Home Studio Owner: Part 1, Compressors, Limiters, and EQ
Using compressors and limiters
What is the difference between loudness, volume and gain?
Signal Processing For The Home Studio Owner: Part 1, Compressors, Limiters, and EQ
Home studio posts – recording tips for producers, engineers, and musicians

One thought on “Music production basics – Part 2: audio compression and panning

Leave a Reply

Your email address will not be published. Required fields are marked *