Gain Staging

Let’s talk about a technique that falls into the “not fun/unsexy” category of audio, but is absolutely a subject to know and tame before deciding you want to break things – gain staging. We get a number of support tickets asking why Valhalla plugins suddenly stop outputting audio, and the first thing we ask the customer is, “What is the level of the signal entering the plugin?” We have implemented safety limiters inside the plugins so if the input level exceeds +12dBFS (that’s 12 decibels OVER digital 0, which is where your converters are clipping), the output of the plugin immediately shuts off and the audio slowly fades back in when the signal drops below that level. This is designed to protect your speakers and ears, but is also a warning that things may be getting a bit out of control with the gain staging of your project.

Back in Ye Olde Analogue Days™, recording gear was designed with an optimal operating level, and while manufacturers had their own standards for settings, these all fell within a certain range where interfacing pieces of equipment from various companies all worked perfectly well when these operating levels were adhered to; the concept of gain staging was all about maintaining correct levels when chaining various pieces of gear from one to another. At its simplest, this might have been a microphone plugged into a preamp followed by an equalizer, then a compressor, and ultimately the tape machine. The output of the tape machine was patched to the mixing console which had a number of additional gain stages – line input, EQ, maybe a built-in compressor on the channel strips, the internal groups or buses, and the final mix output which may have it’s own compressor, and then finally on to the mix down recorder. That simple scenario for a single microphone might be subject to a dozen gain stages at the most basic level; each of those stages introduces the possibility of distortion or saturation when driven incorrectly (we’ll get to that as a creative tool later, but for now we’re trying to not break things…). With proper levels between the stages in the audio chain, you were treated to a truly fantastic sound.

At this point, you’re probably saying, “Stuff it, old man! We have internal 32-bit floating point levels in our DAWs with over 1000dB of theoretical dynamic range! I don’t need to know or care about proper levels any more – HAHA!” Well, yes and no. First of all, everything audio in your computer has to become analog at some point whether it’s the digital-to-analog converter on the built-in headphone jack, or the output of your audio interface that is connected to your monitor speakers (another digital-to-analog converter, or DAC). These converters have a finite maximum level at which they can operate and pass audio before they clip and distort – think of a bucket that you are filling with water from a hose; once you reach the top of the bucket, the water doesn’t miraculously continue filling it, it begins cascading over the sides and making your wife very mad that you’re getting the floor all wet (this has never happened to me…). That’s digital 0 – you have filled up all the bits the converter can handle and what’s coursing down the sides of our “audio bucket” is distortion.

Another reason why the levels and gain staging within our computer projects is important is that many plugin manufacturers design their products to have an optimal operating level, just like in the Olde Days; if 0dBFS is the maximum they expect their plugin to see, they will design the processes within to be optimized at an operating level of somewhere in the range between -24dB and -16dB; this provides for plenty of headroom within the plugin processing, and can even let it saturate, if the plugin is designed to do so, as the operating level within the plugin approaches 0dBFS. All well and good on that single plugin, but what happens when you follow it with another and you push that to within its theoretical maximum internal operating level? And then another? We’re now at 40dB above 0, so you’re now pulling your master fader in your DAW down close to the bottom of its range because your headphones are clipping. Time to throw a peak limiter on the output bus to catch everything over 0dB and levels be damned! Sure that will absolutely work, but everything in front of that limiter is being pummeled to the very last bit of its poor little audio life. Will it work? Absolutely. Whole genres of music have sprung up around this massively smashed sound (hell, the music industry as a whole and the mastering loudness wars were all about this to an extent) – I’m not passing a value judgement here, just explaining a best-practice scenario.

Let’s say your mix is going along this way, heads are bobbing, but you need a touch of reverb added to the mix bus for a touch of overall ambience; you insert a VintageVerb just before the peak limiter and your mix shuts off. “WTF?!??!?!” This is when we get a support email. Our internal safety limiters are there to make you stop and think about what is happening before our plugin (and prevent your speakers or eardrums from exploding), and that you’re probably over-cooking things by a fair amount. Time to look at your gain staging and adjust.

I’m the last person to tell you not to saturate or distort something; I live for that and love the sound of gear pushed to, or over, its limit – it’s exciting and a little dangerous. I’m also a drummer, so my judgement in general is entirely suspect, but when I’m mixing (my day job), my master fader is parked at analog 0dB (which is +4dBu, or -18dBFS digital, still giving me headroom if I did want to push it around a bit). If I want to hear the mix louder, I turn up my monitors, not the master fader. This ensures that I have a fixed place to maintain a proper output level that I’m not fighting against all the time.

The great benefit to practicing good gain staging is that your final audio will actually sound better! Even if you want to compress/distort/slam a number of your individual tracks for effect, maintaining more overall transient information will give your mix far more impact than what happens when you shave off all the peaks by clipping the signal. You can always apply a peak limiter as the last insert of your mix bus if you really want to crush the whole mix (but I would highly recommend against that…), but even then it will sound better if there is more non-clipped program information coming into it.

I don’t want this to sound like “Old Man Yells at Clouds” or that I’m saying you must operate this way when working on your music, I just think it’s helpful to have a little knowledge about the WHY – these things aren’t designed arbitrarily and operating levels weren’t conceived just to slap a number on a piece of gear. Having this tiny bit of extra knowledge might help you make better sounding music!

Comments (6)

  • Martin von Bargen

    Really enjoyed reading that, especially as someone who was born in the analogue era and grew up favouring things being turned up to eleven. It’s been a steep learning curve recording and mixing at home in a DAW, but as a teacher myself, it’s always good to have an analogy to rely upon when explaining things.

    For me it’s like finding the sweet spot on an old 1970s transistor radio before things started to rattle themselves to death.

    By the way, I’ve been taking some wildlife videos here in Norway and then mixing in some Valhalla verbs to add a bit of nature back into the flat audio.

    Reply
    • Sean Costello

      Video links? We are ALWAYS up for seeing Norwegian wildlife videos here at Valhalla HQ!

  • Sean Costello

    Great post, Don! I have several questions for you on this topic, so I’m gonna ask them here, instead of bugging you on the phone all day (not sure what your session/mixing schedule is this week):

    1) We’ve seen videos of people running +20 dB levels throughout their DAW, i.e. a voltage gain of 10. Were these sort of voltage gains even possible with older line level analog circuitry? Obviously, you could do this with stomp pedal boosters for guitar amps, and you could always run a speaker out into a line in (NOT RECOMMENDED DON’T DO THIS IT WILL BREAK STUFF). But were there any pieces of analog pro gear that were designed to, say, slam your input transformers with +20 dB of gain? Could you abuse mic preamps for this?

    2) Gain staging in Eurorack: why is is so difficult? Obviously there are technical difficulties getting gain out of a +/- 12V power supply, when the signal levels can be up to +/- 10V pp. But where was the +/- 5V pp standard available? And how can you drive a filter harder? It seems like +6 dB of gain is about all you can get in most Eurorack setups.

    3) What is the “best” output level to mix towards in 2021? Should we be targeting -6 dB, -0.5 dB, other?

    4) Do floating point WAV or AIFF files allow for these ultimate gain decisions to be left to the mastering engineer? Or are these files clipped to 0 dB before they leave the DAW?

    Reply
    • Don Gunn

      1) All analog gear has a maximum operating level that provides headroom above its “0” (remember, this analog 0 is going to be between -20dB and -14dBFS in digital land); it is usually in the +20 to +28dB range. All this gear can be abused on the input or output, but you’ll have to attenuate it somewhere to bring any eventual level back down into usable territory. Neve preamps are famous for being driven until they start to breakup (or even fully distort), but the fader on the channel strip of a Neve console acts as an output attenuator, so driving the preamp gain gets the crunch, and then you bring it back down with the fader before passing it on to additional processing/tape/converters. Compressors are also good at this. Drive the input on an 1176 until you pin the meter and then bring down the output knob. FUN!

      2) Gadzooks! I don’t know from Eurorack – you’re on your own there!

      3) “Best” output where? When mixing? Post-mastering? For streaming? When mixing, if it is something that will see a mastering engineer, they will love you if you give them 3-6dB of headroom, especially if they are going to run out to analog processing. They can always adjust the gain beforehand, but “do no harm” is going to be the starting place for most great mastering folk. Their master will usually have a max output of -.05 or sometimes -.02dB. For streaming, masters with a maximum level (mastered or not) or -1dB will usually be less compromised in the conversion process to the streaming format. That said, Spotify/Apple Music/YouTube all employ gain normalization to give everything they stream an average LUFS value of -14. This means if your master has a LUFS value of -6, it’s just going to get turned downed to -14, while someone that uploads a much more dynamic master with a LUFS value of -18 will have their file turned up by the algorithm and it may actually sound louder that the -6 file because of the much wider overall dynamic range.

      4) Yes, a 32-bit floating point file will have all the “above 0” information intact when given to a mastering engineer. You won’t see this when playing it back via your 24-bit fixed converters (max of 0dBFS), but the mastering engineer will appreciate it if you forgot to practice good gain staging habits.

      Damn, I’m wordy!

    • Sean Costello

      Thanks, Don!

  • This is a great article and I enjoyed it very much. Especially the reference to drummer’s judgement being a little suspect! As a drummer myself …….there is no doubt!

    Reply

Leave a Reply

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