ratio

Decibel – A Short And Simple Explanation

A way of expressing a quantity in relative terms is to do the ratio with respect to a reference value. This helps to put a quantity into perspective. For example, in mechanics the acceleration is often expressed in relation to the gravitational acceleration. Instead of saying the acceleration is 22 m/s² (which is hard to relate to unless you know mechanics), we can also say the acceleration is 22 / 9.81 ≈ 2.2 times the gravitational acceleration or simply 2.2 g’s (which is much easier to comprehend).

The decibel (dB) is also a general way of expressing a quantity in relative terms, sort of a “logarithmic ratio”. And just like the ratio, it is not a physical unit or limited to any field such as mechanics, audio, etc … You can express any quantity in decibels. For example, if we take the reference value to be the gravitational acceleration, the acceleration 22 m/s² corresponds to 3.5 dB.

To calculate the decibel value L of a quantity x relative to the reference value x(0), we can use this formula:

MIXING_html_m6e565f15

In acoustics the decibel is used to express the sound pressure level (SPL), measured in Pascal = Pa, using the threshold of hearing (0.00002 Pa) as reference. However, in this case a factor of twenty instead of ten is used. The change in factor is a result of inputting the squares of the pressure values rather than the linear values.

MIXING_html_297973dd

The sound coming from a stun grenade peaks at a sound pressure level of around 15,000 Pa. In decibel terms this is:

MIXING_html_m75e9ffd9

which is way past the threshold of pain that is around 63.2 Pa (130 dB). Here are some typical values to keep in mind:

0 dB → Threshold of Hearing
20 dB → Whispering
60 dB → Normal Conversation
80 dB → Vacuum Cleaner
110 dB → Front Row at Rock Concert
130 dB → Threshold of Pain
160 dB → Bursting Eardrums

Why use the decibel at all? Isn’t the ratio good enough for putting a quantity into perspective? The ratio works fine as long as the quantity doesn’t go over many order of magnitudes. This is the case for the speeds or accelerations that we encounter in our daily lives. But when a quantity varies significantly and spans many orders of magnitude (which is what the SPL does), the decibel is much more handy and relatable.

Another reason for using the decibel for audio signals is provided by the Weber-Fechner law. It states that a stimulus is perceived in a logarithmic rather than linear fashion. So expressing the SPL in decibels can be regarded as a first approximation to how loud a sound is perceived by a person as opposed to how loud it is from a purely physical point of view.

Note that when combining two or more sound sources, the decibel values are not simply added. Rather, if we combine two sources that are equally loud and in phase, the volume increases by 6 dB (if they are out of phase, it will be less than that). For example, when adding two sources that are at 50 dB, the resulting sound will have a volume of 56 dB (or less).

(This was an excerpt from Audio Effects, Mixing and Mastering. Available for Kindle)

Compressors: Formula for Maximum Volume

Suppose we have an audio signal which peaks at L decibels. We apply a compressor with a threshold T (with T being smaller than L, otherwise the compressor will not spring into action) and ratio r. How does this effect the maximum volume of the audio signal? Let’s derive a formula for that. Remember that the compressor leaves the parts of the signal that are below the threshold unchanged and dampens the excess volume (threshold to signal level) by the ratio we set. So the dynamic range from the threshold to the peak, which is L – T, is compressed to (L – T) / r. Hence, the peak volume after compression is:

L’ = T + (L – T) / r

For example, suppose our mix peaks at L = – 2 dB. We compress it using a threshold of T = – 10 dB and a ratio r = 2:1. The maximum volume after compression is:

L’ = – 10 dB + ( – 2 dB – (- 10 dB) ) / 2 = – 10 dB + 8 dB / 2 = – 6 dB

Audio Effects: All About Compressors

Almost all music and recorded speech that you hear has been sent through at least one compressor at some point during the production process. If you are serious about music production, you need to get familiar with this powerful tool. This means understanding the big picture as well as getting to know each of the parameters (Threshold, Ratio, Attack, Release, Make-Up Gain) intimately.

  • How They Work

Throughout any song the volume level varies over time. It might hover around – 6 dB in the verse, rise to – 2 dB in the first chorus, drop to – 8 dB in the interlude, and so on. A term that is worth knowing in this context is the dynamic range. It refers to the difference in volume level from the softest to the loudest part. Some genres of music, such as orchestral music, generally have a large dynamic range, while for mainstream pop and rock a much smaller dynamic range is desired. A symphony might range from – 20 dB in the soft oboe solo to – 2 dB for the exciting final chord (dynamic range: 18 dB), whereas your common pop song will rather go from – 8 dB in the first verse to 0 dB in the last chorus (dynamic range: 8 dB).

During a recording we have some control over what dynamic range we will end up with. We can tell the musicians to take it easy in the verse and really go for it in the chorus. But of course this is not very accurate and we’d like to have full control of the dynamic range rather than just some. We’d also like to be able to to change the dynamic range later on. Compressors make this (and much more) possible.

The compressor constantly monitors the volume level. As long as the level is below a certain threshold, the compressor will not do anything. Only when the level exceeds the threshold does it become active and dampen the excess volume by a certain ratio. In short: everything below the threshold stays as it is, everything above the threshold gets compressed. Keep this in mind.

Suppose for example we set the threshold to – 10 dB and the ratio to 4:1. Before applying the compressor, our song varies from a minimum value of – 12 dB in the verse to a maximum value – 2 dB in the chorus. Let’s look at the verse first. Here the volume does not exceed the threshold and thus the compressor does not spring into action. The signal will pass through unchanged. The story is different for the chorus. Its volume level is 8 dB above the threshold. The compressor takes this excess volume and dampens it according to the ratio we set. To be more specific: the compressor turns the 8 dB excess volume into a mere 8 dB / 4 = 2 dB. So the compressed song ranges from – 12 dB in the verse to -10 dB + 2 dB = – 8 dB in the chorus.

Here’s a summary of the process:

Settings:

Threshold: – 10 dB
Ratio: 4:1

Before:

Minimum: – 12 dB
Maximum: – 2 dB
Dynamic range: 10 dB

Excess volume (threshold to maximum): 8 dB
With ratio applied: 8 dB / 4 = 2 dB

After:

Minimum: – 12 dB
Maximum: – 8 dB
Dynamic range: 4 dB

As you can see, the compressor had a significant effect on the dynamic range. Choosing appropriate values for the threshold and ratio, we are free to compress the song to any dynamic range we desire. When using a DAW (Digital Audio Workstation such as Cubase, FL Studio or Ableton Live), it is possible to see the workings of a compressor with your own eyes. The image below shows the uncompressed file (top) and the compressed file (bottom) with the threshold set to – 12 dB and the ratio to 2:1.

MIXING_html_26d7be80

The soft parts are identical, while the louder parts (including the short and possibly problematic peaks) have been reduced in volume. The dynamic range clearly shrunk in the process. Note that after applying the compressor, the song’s effective volume (RMS) is much lower. Since this is usually not desired, most compressors have a parameter called make-up gain. Here you can specify by how much you’d like the compressor to raise the volume of the song after the compression process is finished. This increase in volume is applied to all parts of the song, soft or loud, so there will not be another change in the dynamic range. It only makes up for the loss in loudness (hence the name).

  • Usage of Compressors

We already got to know one application of the compressor: controlling the dynamic range of a song. But usually this is just a first step in reaching another goal: increasing the effective volume of the song. Suppose you have a song with a dynamic range of 10 dB and you want to make it as loud as possible. So you move the volume fader until the maximum level is at 0 dB. According to the dynamic range, the minimum level will now be at – 10 dB. The effective volume will obviously be somewhere in-between the two values. For the sake of simplicity, we’ll assume it to be right in the middle, at – 5 dB. But this is too soft for your taste. What to do?

You insert a compressor with a threshold of – 6 dB and a ratio of 3:1. The 4 dB range from the minimum level – 10 dB to the threshold – 6 dB is unchanged, while the 6 dB range from the threshold – 6 dB to the maximum level 0 dB is compressed to 6 dB / 3 = 2 dB. So overall the dynamic range is reduced to 4 dB + 2 dB = 6 dB. Again you move the volume fader until the maximum volume level coincides with 0 dB. However, this time the minimum volume will be higher, at – 6 dB, and the effective volume at – 3 dB (up from the – 5 dB we started with). Mission accomplished, the combination of compression and gain indeed left us with a higher average volume.

In theory, this means we can get the effective volume up to almost any value we desire by compressing a song and then making it louder. We could have the whole song close to 0 dB. This possibility has led to a “loudness war” in music production. Why not go along with that? For one, you always want to put as much emphasis as possible on the hook. This is hard to do if the intro and verse is already blaring at maximum volume. Another reason is that severely reducing the dynamic range kills the expressive elements in your song. It is not a coincidence that music which strongly relies on expressive elements (orchestral and acoustic music) usually has the highest dynamic range. It needs the wide range to go from expressing peaceful serenity to expressing destructive desperation. Read the following out loud and memorize it: the more expression it has, the less you should compress. While a techno song might work at maximum volume, a ballad sure won’t.

————————————-

Background Info – SPL and Loudness

Talking about how loud something is can be surprisingly complicated. The problem is that our brain does not process sound inputs in a linear fashion. A sound wave with twice the sound pressure does not necessarily seem twice as loud to us. So when expressing how loud something is, we can either do this by using well-defined physical quantities such as the sound pressure level (which unfortunately does not reflect how loud a person perceives something to be) or by using subjective psycho-acoustic quantities such as loudness (which is hard to define and measure properly).

Sound waves are pressure and density fluctuations that propagate at a material- and temperature-dependent speed in a medium. For air at 20 °C this speed is roughly 340 m/s. The quantity sound pressure expresses the deviation of the sound wave pressure from the pressure of the surrounding air. The sound pressure level, in short: SPL, is proportional to the logarithm of the effective sound pressure. Long story short: the stronger the sound pressure, the higher the SPL. The SPL is used to objectively measure how loud something is. Another important objective quantity for this purpose is the volume. It is a measure of how much energy is contained in an audio signal and thus closely related to the SPL.

A subjective quantity that reflects how loud we perceive something to be is loudness. Due to our highly non-linear brains, the loudness of an audio signal is not simply proportional to its SPL or volume level. Rather, loudness depends in a complex way on the SPL, frequency, duration of the sound, its bandwidth, etc … In the image below you can see an approximation of the relationship between loudness, SPL and frequency.

MIXING_html_mc95d258

Any red curve is a curve of equal loudness. Here’s how we can read the chart. Take a look at the red curve at the very bottom. It starts at 75 dB SPL and a frequency of 20 Hz and reaches 25 dB SPL at 100 Hz. Since the red curve is a curve of equal loudness, we can conclude we perceive a 75 dB SPL sound at 20 Hz to be just as loud as a 25 dB SPL sound at 100 Hz, even though from a purely physical point of view the first sound is three times as loud as the second (75 dB / 25 dB = 3).

————————————-

MIXING_html_m53a1053e

(Compressor in Cubase)

  • Threshold and Ratio

What’s the ideal threshold to use? This depends on what you are trying to accomplish. Suppose you set the threshold at a relatively high value (for example – 10 dB in a good mix). In this case the compressor will be inactive for most of the song and only kick in during the hook and short peaks. With the threshold set to a high value, you are thus “taking the top off”. This would be a suitable choice if you are happy with the dynamics in general, but would like to make the mix less aggressive.

What about low thresholds (such as -25 dB in a good mix)? In this case the compressor will be active for the most part of the song and will make the entire song quite dense. This is something to consider if you aim to really push the loudness of the song. Once the mix is dense, you can go for a high effective volume. But a low threshold compression can also add warmth to a ballad, so it’s not necessarily a tool restricted to usage in the loudness war.

Onto the ratio. If you set the ratio to a high value (such as 5:1 and higher), you are basically telling the mix: to the threshold and no further. Anything past the threshold will be heavily compressed, which is great if you have pushy peaks that make a mix overly aggressive. This could be the result of a snare that’s way too loud or an inexperienced singer. Whatever the cause, a carefully chosen threshold and a high ratio should take care of it in a satisfying manner. Note though that in this case the compressor should be applied to the track that is causing the problem and not the entire mix.

A low value for the ratio (such as 2:1 or smaller) will have a rather subtle effect. Such values are perfect if you want to apply the compressor to a mix that already sounds well and just needs a finishing touch. The mix will become a little more dense, but its character will be kept intact.

  • Attack and Release

There are two important parameters we have ignored so far: the attack and release. The attack parameter allows you to specify how quickly the compressor sets in once the volume level goes past the threshold. A compressor with a long attack (20 milliseconds or more) will let short peaks pass. As long as these peaks are not over-the-top, this is not necessarily a bad thing. The presence of short peaks, also called transients, is important for a song’s liveliness and natural sound. A long attack makes sure that these qualities are preserved and that the workings of the compressor are less noticeable.

A short attack (5 milliseconds or less) can produce a beautifully crisp sound that is suitable for energetic music. But it is important to note that if the attack is too short, the compressor will kill the transients and the whole mix will sound flat and bland. Even worse, a short attack can lead to clicks and a nervous “pumping effect”. Be sure to watch out for those as you shorten the attack.

The release is the time for the compressor to become inactive once the volume level goes below the threshold. It is usually much longer than the attack, but the overall principles are similar. A long release (600 milliseconds or more) will make sure that the compression happens in a more subtle fashion, while a short release (150 milliseconds or less) can produce a pumping sound.

It is always a good idea to choose the release so that it fits the rhythm of your song (the same of course is true for temporal parameters in reverb and delay). One way to do this is to calculate the time per beat TPB in milliseconds from your song’s tempo as measured in beats per minute BPM and use this value as the point of reference.

TPB [ms] = 60000 / BPM

For example, in a song with the tempo BPM = 120 the duration of one beat is TPB = 60000 / 120 = 500 ms. If you need a longer release, use a multiple of it (1000 ms, 1500 ms, and so on), for a shorter release divide it by any natural number (500 ms / 2 = 250 ms, 500 ms / 3 = 167 ms, and so on). This way the compressor will “breathe” in unison with your music.

If you are not sure where to start regarding attack and release, just make use of the 20/200-rule: Set the attack to 20 ms, the release to 200 ms and work towards the ideal values from there. Alternatively, you can always go through the presets of the compressor to find suitable settings.

 

You can learn about advanced compression techniques as well as other effects from Audio Effects, Mixing and Mastering, available for Kindle for $ 3.95.