Gain Staging / Gain Structure

jaynm26

New member
Digital vs Analog

I dont feel like typing my own sayings so Im just gonna copy and paste and regurgitate info

Where it all comes together
Digital mixers and digital audio workstations (DAWs) combine much of the functionality of mic preamps, analog mixers, analog-to-digital converters (ADCs), computerized mixing and editing software, and software plug-ins, all in one integrated unit.

As such, we can apply many of the basic gain staging tips and techniques for each of these individual components of a recording signal chain, which can be browsed via the hyperlinks provided above.

Digital vs. analog mixer
A digital mixer serves the same basic function as an analog mixer, but is different in three major ways:

First, most digital mixers can accept one or more types of digital inputs (S/PDIF, ADAT lightpipe, AES/EBU, etc.) along with the standard compliment of analog inputs (both line and mic.)

Second, the main outputs of digital mixers are usually in one or more digital formats such as the input types listed above, optionally along with computer-destined formats such as Firewire and USB (check the spec sheet or owner's manual for any given model of digital mixer to see what digital output options are available for any given model of digital mixer.)

While digital mixers typically have standard analog outputs for standard analog functions such as channel inserts, aux sends, and loudspeaker and headphone monitoring just like analog mixers, and sometimes may even be equipped with main analog output options, they are typically designed with mainly digital output in mind.

Third, digital mixers actually internally operate in the digital domain. After every trim/input gain control on every analog input is an ADC converting that analog input signal immediately to digital. All the internal EQs, reverbs, faders, mixing controls and other routing and processing functions are actually digital controls of digital signals.

Gain staging the input
As the only real analog components on a digital mixer are any microphone preamps and/or any line in trim/gain controls in the inputs, the general analog gain structure guidelines for such input controls as on any other analog device would still apply at that point. Beyond those controls however, every thing goes digital, and the rules change to those of the digital domain.

Gain structure inside the digital mixer
As with the converters on computer interfaces and soundcards, the ADCs in different makes/models of digital mixers don't necessarily all conform to a single dBu/VU-to-dBFS conversion standard. Additionally, digital gain levels can vary from digital component to digital component within the mixer. For example, turning an assignable knob on a digital mixer to 11 when it controls one digital function doesn't necessarily represent the same maximum variable dB range as turning that same knob to 11 when it controls a different function.

For these reason it's good to become as familiar with the mixer's included documentation on the internal gain structure of the digital mixer as possible. Many digital mixers come with excellent "level maps" in their documentation that graphically map out this internal gain structure in a very accessible way.

Digital output levels
The digital outputs on a digital mixer are nothing more than transport paths for carrying the digital information out of the mixer to the next device. Whatever the digital (dBFS) signal level is being sent out of the mixer is the level that will be received by the next digital device downstream. In general, we usually let these levels ride at whatever level they are at; there's no need to match any given line level anymore as we did in analog, we're only passing binary 1s and 0s now, and boosting or cutting at this point will only serve to potentially reduce headroom or dynamic range at the next stage.

The exception to this might be if one is outputting a finished master to a master recording device, then the levels might be set to correspond to the desired final levels, especially if the receiving recording device did not have digital input level controls.

Analog output levels
Because the digital mixer operates internally entirely in the digital domain, it must use it's own internal digital-to-analog converters (DACs) to convert it's signals back to analog before sending them out via any analog output jacks.

Here we have the same dBu-to-dBFS conversion calibrations to worry about as we do with it's ADCs, except in reverse. Most analog outputs on a digital mixer will be designed to operate at the commercial +4dBu line level, but exactly what reading in dBFS on the digital side of the signal path will correspond to a +4dBu analog voltage on the analog out will depend upon the exact calibration specification of that output's DAC. We need to once again check the mixer's documentation for that information.

Additionally, many digital mixers offer unbalanced or "pseudo-balanced" analog outputs for some of their analog routing functions that nominally ride at 6 decibels below line level (-2dBu). We need to be aware of these situations as well and expect adjust the inputs of the receiving analog gear accordingly.

Digital mixer metering
With the level of complexity in the internal gain structure of digital mixers, good metering is very important. For this reason, most digital mixers gives us the option to be able to assign their meters - whether they be on-board meters, or (preferably) their optional full-channel meter bridges - to just about any of the major signal path points within the mixer's signal path.

Once again, because of the complexity of options on digital mixers and difference between makes and models, we need to familiarize ourselves with the specific metering options (and their associated meter scales) available for any given digital mixer by referring to the model's metering documentation.

Recording in a DAW
Digital audio workstations (DAWs) operate much like compact digital mixers, but have the added feature of having a digital recorder (tape or hard drive) built right into the board. They make a nice all-in-one multitrack recording and mixing solution for those with budget or space constraints.

Many DAWs come with instructions to record our tracks as hot as possible without clipping; i.e. to get the peak levels as close to 0dBFS as we can without actually hitting 0dBFS. There are some historical and marketing reasons why they suggest this, but few (if any) of them are really that good. In today's world of 24-bit digital recording, purposely pushing our recording levels up to the brink is not only not necessary, but can be disadvantageous. See the gain browser section on hard disc recording for further explanation.

In order to help ensure the optimum balance between good dynamic range, good headroom and low noise, it's often best to get the analog input levels right and just let the converters do their thing; recording the digital tracks at the level in which they come out of the converter. If our signal is clipping coming out of the converter, then we should adjust for that by pulling back on the analong input gain.
 
Last edited:
DAWS

Let it be
There is a lot of misunderstanding when it comes to signal levels and recording audio to multitrack recording and editing software on a personal computer. But once understood, this is really the easiest stage of the whole gain structure equation, because most of the time the best thing to do here is to record the digital signal as it comes in, unmolested and unmodified.

Whether coming in through an external multitrack interface box, a dedicated ADC, or a simple PC sound card, the last gain stage our audio went through before hitting the recording software was the analog-to-digital conversion. As described in the section on ADCs, when we send a quality analog signal level into the converter, the converter is calibrated to automatically spit out a digital version of that signal of a level that finds the balance between having enough dynamic range to handle the incoming signal, leaving the noise floor low, and leaving enough headroom for transient peaks in the signal without clipping. Therefore, if we set our incoming analog signal into the ADC well, the digital signal level coming out the back and into our computer should be just fine as-is.

Unity, people!
This means that we should try to set out our gain structure so that we have an optimum analog signal going into our converters, and that we have both the output gain on the converters (if available, either by hardware knob or software driver control) as well as the recording input gain controls on the recording software itself all set to unity gain; i.e. 0dB of gain or cut coming out of the converter and into the software.

Mo' hotter is NOT mo' better
There is a lot of misinformation, misunderstanding, and mythology out there surrounding this topic that leads many of us who are new to this to believe otherwise. Usually this is in some form of the "mo' hotter. mo' better" mantra which says we should record our digital signal in our recording software as hot (as high) as possible without causing clipping.

There are several reasons why this is not necessarily true, and there are a few myths to be busted along the way. Let's look at these one by one in some detail:

Myth #1: The analog-to-digital converter operates at the highest efficiency and lowest noise at maximum level. Actually, because of physical design limitations inherent in some ADCs, some non-linearity can creep in into the voltage-to-digital-value conversion rate in the last few dBs at the top of the converter. This would translate into slight distortions in the resulting digital representation of the parts of signals residing at the very top of the digital scale.

Beyond that, what usually matters more in the converter is the efficiency and noise level of the analog input section of the converter. Set the levels for maximum gain quality there, which as with most other analog hardware inputs means averaging the signal somewhere around the designed line level, and the converter will work just fine converting that into a clean digital signal.

Besides, this myth has nothing to do with setting the recording levels in the software after the converter has finished converting the analog signal to digital information.

Myth #2: You need to use all your bits to get maximum digital resolution. While it may be true that the more significant bits one uses when converting from analog to digital, the lower the amount of quantization error in the resulting digital value, the difference is truly inaudibly microscopic, and winds up being effectively negated anyway by other stages in the conversion processes such as oversampling, dithering, and the Nyquist reconstruction from digital back to analog itself.

Additionally, such quantization differences would only matter if the top bits were used during conversion to digital; i.e. by sending hot levels into the converter. This would mean potentially over-gaining the converter input stage to the point of adding analog distortion that would swamp out any small potential increase in digital resolution.

But once a signal has been converted to digital, its precision or resolution is set. Digitally increasing the volume simply shifts the bits up the scale, filling in zeroes in the lower bits they once occupied. This is similar to changing the value of pi from 3.14 to the value 3.140000. The second number is no more precise than the first number; 3.14 and 3.140000 have the exact same value.

Myth #3: You need to use all your bits to record the full dynamic range of the signal. It is true that the more bits we use, the more digital dynamic range we have to work with, but in these days of 24-bit recording, the dynamic range of our digital canvas is spacious enough to not be the concern it arguably once may have been.

Each added bit in our digital sample represents a 6dB increase in volume. Therefore we can use the following table to translate the number of bits (a.k.a. word length) at which we record into the amount of theoretical dynamic range it yields:
Word length (bits) Dynamic range (dB)1
16 96
20 120
24 144
322 192
1The last bit is often considered the beginning of the digital noise floor, and many therefore consider the usable dynamic range to be one bit, or 6dB, less than this theoretical value.

2This refers to full 32-bit integer recording, ant not 32-bit floating point calculation processing.

Even if we drop the last bit as noise, that leaves a 24-bit recording with a real dynamic range of 138 decibels. Assuming that the 0th bit represented the absolute quiet of an empty anechoic chamber, the 24th bit would represent a sound level of 138 decibels, which is well beyond the threshold of pain for most human ears and can cause deafness. There's more than enough range there to record anything we can send it.

Furthermore, when accounting for the typical specifications of the typical recording chain gear, the overall (composite) effective dynamic range of our recording chains from noise floor to signal peak is rarely more than about 110dB, and is often several decibels less. At that rate, we could lop a full 4 bits, or 24dB, off of our recording spec and still have more than enough room to capture the entire signal.

So while in the days of 16-bit recording and 90dB effective dynamic range this may may have been arguably a bit more of an issue, the technology has moved that issue into the realm of history and mythology.

Myth #4: A louder track sounds better and increases the signal-to-noise ratio, making for a cleaner-sounding mix. While the human ear tends to trick us into thinking that louder sounds better, when we increase the volume of a digital signal digitally, we are not expanding it's dynamic range. We are, in fact, increasing the noise level by the same volume as we are increasing the signal level; the signal-to-noise ratio does not change. All we are effectively doing then is increasing the audible volume of the track's noise floor. When we mix our raw tracks together, the level of noise is additive, and therefore will become more noticeable faster than if we leave the volume and the noise level on our individual recorded tracks low.

Furthermore, the higher we raise our individual track levels, the more headroom we use up, and the faster we will reach clipping when we mix the tracks together.

Additionally, every process we perform on a digital signal increases the potential for quantization error in the math that the software performs on the digital data. While quantization error distortion is small, such errors can build up over time as audible distortion. Since there is no real advantage or need to raise the individual track volume, there is no need to increase the potential quantization distortion by doing so. And since raising individual track volume will more likely result in having to lower some track levels again during mixing to avoid clipping (a rather self-defeating extra step backwards again), that extra gain reduction would further increase the chances of such audible distortion.

Finally, if we try boosting the digital signal level by increasing the gain on the analog side of the converter, we are then putting an extra load on the analog input circuitry, asking it operate well outside of it's designed sweet spot and potentially increasing the pre-conversion circuit noise, which will then become part of a higher noise floor in the converted digital signal.
 
Digital Plugins
Plugging our recordings
Some DAW software recording applications allow to us assign plug-in effects to the recording process, acting just as if they were outboard signal processors added to the recording input chain.

The mechanics of how any given recording application has us do this varies, but for the most part the software functionality somewhat mimics the way we'd use outboard signal processors on an analog mixer; the plugs can act like they are plugged into an insert tap on a channel strip, in which case the effects of the plug-in are recorded directly to the designated recording track in the software, or they can act like they are plugged into aux send-and-return effect loops, in which case there is are one or more discrete effects tracks recorded separate from the main (dry) recording track.

Either way, the way we want to process the sound of our audio via software plug-ins is similar to the way we would with outboard processors. However, because we are now dealing strictly within the world of digital, the general principles of gain structure are just a bit (pun intended) different.

Digital line level
As we are now dealing with digital information and not analog voltages, the idea of keeping the signal level hovering somewhere near a designed line level voltage in order to meet the design specs of the hardware is no longer an issue. Any digital plug can handle any valid digital level value equally well. Trying to adhere to a (for example) -18dBFS RMS level when passing the signal from plug to plug is not an issue in the way that it is with analog gear and the 0VU line level.

That said, however, There are still some issues things that we should consider when working with digital gain structure...

Boost or bust?
It's sometimes said that boosting our digital levels to get as close to 0dBFS without clipping gives ups the most our of what digital has to offer. This is often not true once we are already in the digital domain; i.e. once the signal has already been converted to digital, as it already has been when we are dealing with adding digital plug-ins to our recording chain.

Once the signal has already been converted to digital via the ADC, boosting the signal level in digital does little to nothing to improve the signal quality. All that happens when we increase the digital volume is that the digital ones and zeros that represent the volume are moved upwards towards the top of the digital scale.

While it may appear at first blush that because we are using more and higher bits to represent the digital sample, that we are increasing the potential precision or resolution of the signal, as well as increasing the usable dynamic range, a true examination of the numbers shows that neither is actually happening. In fact, the only things that are guaranteed to happen when we boost the digital volume are potentially detrimental to our digital gain structure, because
a) we decrease the amount of available digital headroom downstream because we are taking up more of the top end of the digital scale,

b) we increase the volume of the converted analog noise floor along with the volume of everything else, and

c) we actually wind up decreasing the the usable digital dynamic range; the decrease in potential headroom described in a) combined with the increase in the noise level described in b) actually equates to an overall reduction in usable dynamic range downstream.

For these reasons, it's usually best not to feel the need to digitally boost the volume of a digital signal going into or coming out of our plug-ins, unless for some designed reason the plug-in simply sounds different at different operating levels (though that should be a rare case indeed.)

Getting clipped
When working at standard 16-bit or 24-bit digital encoding, the standard digital volume scale ends at 0dBFS. That is the highest possible signal in the digital realm regardless of how many bits we use. There theoretically is no such thing as +1dBFS; any waveform that tries rising above 0dBFS will be stopped, or clipped off, at 0dBFS, This clipping is a distortion of the waveform and therefore also a potential distortion in the sound itself. Some small amounts of clipping - say one or two samples in a row - may or may not be audible to the average human ear, but clip more often than that and it can easily add a harshness to your sound, as well as potentially affect the sound of any further downstream plug-ins.

For this reason it is never a bad idea to set you gain in and around your plug-ins so that your peaks never try exceeding 0dBFS.

Rarely - if ever - is there a need to manually boost the levels that high going into a plug-in to begin with anyway, but it's possible that the settings within the plug itself may push the resulting waveform to higher levels (e.g. via EQ boost or the addition of wet reverb to a dry signal, etc.) In such cases, downward adjusting the gain going into the plug in anticipation of the plug's effect on the overall volume is often best for avoiding such internal clipping within the plug.

Note that adjusting the output gain on the offending plug will not remove the clipping that happens inside the plug itself; the clipped waveform will still remain clipped, it's just that the volume level of the clipped to itself will be decreased.

There is an exception to this internal plug clipping situation, however: that is if one is using a plug that operates at a bit level referred to as 32-bit floating point.

Let's see if she floats
Many modern plug-ins use what's called 32-bit floating point math. While still technically working at a 24-bit level, 32-bit floating point uses an extra 8 bits as a mathematical exponent to the 24-bit integer.

Without getting too heavy into the math, this basically means that 32-bit floating point math is more accurate than the standard 24-bit model, and therefore theoretically makes for better-sounding plugs (all else being equal.)

More important to the subject of gain structure, however, is that 32-bit floating point math actually allows one to exceed the theoretical maximum level of 0dBFS without clipping. For all intents and purposes, 32-bit floating point offers practically unlimited headroom above 0dBFS without having to worry about clipping.

What this means is this can - only in plug-ins that use 32-bit floating point math and use it all the way through - virtually eliminate the need to worry about a plug accidentally driving a signal into clipping because it's setting are boosting the signal too far. We can relax a bit in such cases about worrying whether the input level into or inside the plugs are too hot.

This does NOT mean, however, that we have eliminated our worries about clipping altogether, because...

She won't float forever
First, we need to be sure just which of our plugs truly use 32-bit floating point operation and which do not. For example, if we add two plug-ins in series to the recording chain, the first one 32-bit floating point an the second one standard 24-bit, we need to make sure the output of the first plug peaks below 0dBFS if we want to avoid clipping in the second plug.

Second, when we reach the end of our plug-in chain and actually record the signal to our hard drive, if our software is not set to record using 32-bit floating point operation, if it is only recording at 24-bit or 16-bit, any signals exceeding 0dBFS when exiting the plugs will be clipped in the recording.

Finally, when it comes time to pass the signal back out to the analog world (for monitoring, external analog processing, recording to analog tape, etc.), or for standard mastering to 16-bit CD or digital tape, we'll need to make sure our levels are throttled back below 0dBFS before they wind up clipping in the conversion.

For output to analog, we'll typically want to send a signal to the DAC (digital-to-analog converter) that average around whatever digital level the DAC is calibrated to convert to 0VU. This way the outgoing analog signal will be running somewhere around the nominal line level as expected by the downstream analog gear to which it is being sent.
 
I dont feel like typing my own sayings so Im just gonna copy and paste and regurgitate info

Where's the fun in that?

So....is there a question somewhere in your posts or did you just feel the need to regurgitated all that info? :)
 
Digital mixers and digital audio workstations (DAWs) combine much of the functionality
You lost me the moment you said 'functionality'. That's sooooo not a jaynm word. In fact, it's so not a home recorder's word. It's such an official, 'advertising on the net' word. Nobody real says "combine much of the functionality". :D
 
miro's got over 7000 posts and I don't think he's used that many words!

I kinda feel like regurgitating my thesis. it was over 300 pages...might be close to the length of what jay's written.
 
Back
Top