Humble guide to leveling (gain, AD/DA, processing)

Share your favorite Ableton Live tips, tricks, and techniques.
Post Reply
Timur
Posts: 2203
Joined: Mon Sep 17, 2007 8:55 am

Humble guide to leveling (gain, AD/DA, processing)

Post by Timur » Tue Mar 11, 2008 12:31 pm

Hey there. This is a copy of an answer I wrote on the Gearslutz forum following this question: 8)
Mister-Newb wrote:I've heard that it's best to track at - 18dbfs. Does this mean that in my recording software, which is Sonar, I bring down the fader to - 18?
The following discussion between those "pro-level" engineers nearly went into a fight, so I felt I should provide what little I have learned about this issue myself.
Timur wrote:Hey folks,

I think you got carried away a bit with your discussion (eventhough it was an interesting read). When starting to fight over digital and analog metering you seem to have missed the obvious: :roll:

What gear are you using Mister-Newb? Do you even use a dedicated pre-amp with analog VU meter or are you using a combined interface with inbuild pre-amps (like Traveller, Fireface and the lots)?

As you define yourself as newbie I suspect the latter and that would make alot of sense for a beginning considering that you don't know how to use a fancy VU-meter yet which you pay extra for. So if you are using an interface with build-in mic-pres then you can forget all posts that correlate dBFS (digital metering with 0 being defined the theoretical maximum) to analog VU meters. These posts do make sense, but they don't affect you at the moment. So better come back to that once you mastered the basics (yes I know, once mastering the VU was considered a basic, but nowaday VU's are not the norm with basic home-recording setups).

Instead I would begin by making sure that the basic steps from analog input through digital DAW processing to analog output are within controllable limits. If you don't care for all the technical mambojambo then just follow the bold written advice in the first paragraphs of the following steps (see my next post two below from here) and skip the rest. If you want to know a bit more about what's going on under the hood read all (subject to error and mistake, so anyone with more insight, feel free to correct me kfhkh :wink: ).

A quick and nice overview over all those technical terms and abbreviations can be found here: Audio Specifications
Last edited by Timur on Tue Mar 11, 2008 12:38 pm, edited 2 times in total.

Timur
Posts: 2203
Joined: Mon Sep 17, 2007 8:55 am

Post by Timur » Tue Mar 11, 2008 12:32 pm

1. Use the gain on the analogue mic-preamp within reasonable limits! It will take some time until you know the goods and bads of your pre-amps. For most normal microphone applications you should come out somewhere around +30 dB gain, mostly depending on your microphone's output level and your sources volume (screaming ought to be louder than wisphering ;)).

Within these reasonable limits both the noise added by the mic-preamps itself (EIN) and the distortion added by the amplification should be OK. The more gain you add (or the louder the source's screaming into the mic) the more distortion you will suffer or benefit from. Most cheap pre-amps don't really offer delightful distortion so you've got to try if you actually like the "character" of your pre-amps.

To give you an idea, here is a comparison (THD = Total Harmonic Distortion; THD+N = THD + Noise, which is always higher than THD; IMD = Intermodulation Distortion, which is not harmonic and which is said to "make music sound harsh and unpleasant") :

RME Octamic D: THD: < 0.006% @ 30 dB Gain
RME Octamic II: THD: < 0.0005 % @ 30 dB Gain
RME Micstacy: THD+N @ 30 dB Gain: < -100 dB, < 0.001 %
Avalon VT737: Distortion THD, IMD 0.5%

As you can see the older Octamic D added "tripple" as much distortion at the very same gain-setting compared to the new Octamic II. That doesn't necessarily mean that it sounds worse to your ears, it just sounds different. Have a look at the spec for the tube-driven Avalon (unfortunately no gain-setting given by the specs, so most likely it's measured at maximum gain), does it sound bad? Unfortunately manufacturers keep mixing specs, THD at +20 dB is not the same as THD at +30 dB is not the same as THD+N is not the same as THD/IMD. Hard to compare specs with this mess.

It can easily happen that your pre-amp will break up/distort well below the limits of the converters, so watch out not to overload your pre-amp just for the sake of high converter levels. And even if you drive your pre-amp into distortion on purpose you might end up overloading the converters without knowing (converter's headroom is somewhere upto +30 dBU for quality gear and around +10 to +20 dBU for your usual Firewire/USB-Interface). There is alot more to know about pre-amps and gain-stages that goes far beyond the scope of this post (and my own humble knowledge jummpp).

2. Use the highest possible bit-settings available to your interface/converters (like 24-bit on a 24-bit converter) and don't ever clip the Digital Inputs in your DAW, which will indicate overs/clipping by its own digital input-meters and clip markers. If no good metering device is available and the metering on the hardware-interface isn't suffient either then better stay on the secure side by having your DAW's meters well below 0 dBFS. This is not because the DAW would clip/distort but to prevent unintentional clipping/distortion of your converters (you can always use intentional overs by using your ears!). Regardless of wether you own an analog VU or not try to stay at an average of around -18 to -12 dBFS with peaks somewhere around -6 to -3 dBFS (this also depends on wether you're using compression before AD conversion or not).

Like stated before converter's headroom is somewhere upto +30 dBU for quality gear and around +10 to +20 dBU for your usual Firewire/USB-Interface, and this is likely one of the reasons for the "-18 dBFS" folklore you heard before. The problem here is that without proper metering the pure digital meter on your interface will not detect distortion/overload/clipping of either the analog pre-amp or the AD converter, and the DAW's metering comes even after that (aka too late). So when you use a separate pre-amp into a converter you have to watch for this, trust your ear or just stay on the secure side. If you are using an interface with inbuild converters then hopefully the designers made some decisions for you and matched the specs, but in general a hot mic signal into a hot pre-amp can still overload the converters.

But when recording a signal (like a mic) any signal-clipping shown by your DAW/Sonar indicates that the converters most likely clip themself (or at least the inbuild opamps will distort). That is because on "relatively inexpensive" interfaces/converters 0 dBFS on the digital input-meter most likely correlates to somewhat near 0 dBFS on the converters. There may be some more headroom, but given the fact that most manufacturers want to provide big numbers for signal-to-noise (SNR) and dynamic range in their specs which in turn can only be archived by running the "relatively inexpensive" converters further to their limit.

RME Micstacy AD Converters:

Signal to Noise ratio AD (SNR) @ +30 dBu: 115.2 dB RMS unweighted, 118.5 dBA
Signal to Noise ratio AD (SNR) @ +21 dBu: 112.7 dB RMS unweighted, 116 dBA
Signal to Noise ratio AD (SNR) @ +13 dBu: 110 dB RMS unweighted, 113 dBA
Distortion THD, IMD 0.5%

As you can see the hotter the input-signal the better the SNR, but even at the lowest measurement given these specific 24-bit converters' noise stays well below -110 dB. The Micstacy's converters are likely not exactly topoftheline, but still better than most converters found in typical Firewire/USB-Interfaces. Still even these usually offer a SNR of well around 100 dB (the best 24-bit converters are said to reach about 20.5-bit realworld performance which corresponds to 123 dB dynamic range).

To make things even more complex there is a difference between using lower (44/48 KHz) and higher (88/96/192 KHz) sample-rates. This is mostly due to the analog filters used by the converters to filter out aliasing noise. This is too complex to be discussed here, but you should at least listen with your own ears if your converters (and your monitor-speakers/headphones) show any audible differences. If differences are small/inaudible then don't care about wasting CPU load and HD space for higher sample-rates when recording (this is different to plugins, see 4.)

3. Modern 32/64-bit floating-point DAWs virtually cannot be clipped so in fact you can drive all your single tracks well into the red as long as you stay within the DAW and do not clip the Master Output, which Sonar will easily indicate by its own digital meters and clip markers. Any clipping of the Master Output over 0 dBFS will result in audible digital distortion at you analog output. Also if you are using external plugins or maybe even external gear (like outboard compressors) you better stay away from clipping your tracks over 0 dBFS.

That is because internally DAWs define a specific value to represent 0 dBFS. Ableton Live for example uses the value 1 as 0 dBFS representation, with all values below 1 being below 0 dBFS and all values above 1 being over 0 dBFS. The maximum value a 32-bit floating-point variable can represent is 3.4028234 x 10^38! If you think this is huge, the maximum value a 64-bit floating-point variable can represent is 1.7976931348623157 x 10^308. Because of this for practical purposes it really doesn't matter wether your single tracks are internally or better to say "virtually" clipping or not as long as your Master Output stay below 0 dBFS (summed up internal value of 1 in Live). So yes, for the sole purpose of summing your tracks you can just lower that Master fader. Still you better use the track faders to control your summed/mixed signal volume, because a: it's a good practice if you ever need to use analog mixers and b: certain plugins/effects might not behave as expected when being fed with signals over 0 dBFS even when they work with 32-bit floating-point themself, plus any external loop (think of track-inserts to analog outboard compressors) going out of your DAW to external gear will also clip at 0 dBFS.

By the way, as you can see the practical difference between 32-bit and 64-bit summing is not in the headroom but in the precision, 64-bit simply offers smaller/more in-between steps. Both the input and output converters work with integer numbers (that is natural numbers without any fractions), so integer values have to be averaged to the next best floating-point value at the input and back to the next best integer at the output. You most likely wont hear an audible difference with simple tracking though, only with lots of summing (tracks) and calculations (effects) the benefits of the higher precision will become a true advantage.

4. Don't drive external plugins into clipping if you don't know how the plugin handles these situations, internal plugins usually should not be a problem because they are fitted into how the DAW handles these things itself..

As someone already stated some plugins simply behave as if you were driving a DAW track into the red and just keep spitting out floating-point numbers of higher value aka increased gain = increased volume.

Other plugins try to simulate analog distortion/oversaturation though and will alter the tone/sound instead of increasing the volume aka increased gain = increased distortion/sound alteration. Most likely these plugins are made/calibrated for 0 dBFS as "natural" maximum, so any gain above that may result in unpleasant results or maybe just different and interesting results.

There is a third kind of plugins that is a variant of the first one. These allow you to drive their internal chain over 0 dBFS but at their own output stage they will clip down anything over 0 dBFS just as the Master output of the DAW does plus they may even clip at their input-stage if driven too hot. One example would be NI Guitar Rig which allows you to drive any internal effect/speaker-simulation/gain well over 0 dBFS as long as its own Master output and Master input do not.

So as long as you don't know how your external plugins handle things you better stay well below 0 dBFS on the input of these.

5. Keep a headroom of around 3 to 6 dB at the Master Output, which means that peaks (!) should stay below that threshold. This will also bring the love of any mastering engineer who has to further process your rendered output.

Just as much as the input converters and analog pre-amps can distort at high levels the output converters and final output-gainstage can as well. So driving these too low will result in worse SNR again, but driving these too hot will result in more distortion again (see 1.). Most audio-interfaces offer no analog output-gain (volume knob), but only virtual software-mixer (digitally calculated at a lower precision than that of your DAW, i.e. RME Fireface's Totalmix works at 42-bit at doesn't even tell us if integer, fixed- or floating-point) and pre-set analog gain at defined levels (+4 dBU/-10 dBV). You may want to use an analog mixer for further volume-control, but given the headroom of modern 24-bit devices the digital mixer is often suffient.

-*-

Well, that should be enough for being one of my first posts. Feel free to discuss and correct any errors you find. For those in here who already discussed the benefits and evils of certain "rules" you may have noticed that I tried to discern between unintentional and intentional overloading of pre-amps, converters and plug-ins. I'm always eager to learn myself, so gimme da feedback! 8)
Last edited by Timur on Wed Mar 12, 2008 1:50 pm, edited 3 times in total.

Timur
Posts: 2203
Joined: Mon Sep 17, 2007 8:55 am

Post by Timur » Tue Mar 11, 2008 12:40 pm

A little free tool (all platforms) to help you some:

http://www.rogernicholsdigital.com/inspector.html
Last edited by Timur on Wed Mar 12, 2008 1:53 pm, edited 1 time in total.

laird
Posts: 1996
Joined: Tue Feb 27, 2007 10:05 pm
Location: PDX
Contact:

Post by laird » Tue Mar 11, 2008 4:34 pm

:)

only thing I'd add is to the "keep -3 to -6dB headroom on the master" part, with the clarification "if you intend to render to 24 or 32bit and have the track mastered elsewhere. If you are just making a CDr for yourself and/or a mp3 for myspace, go ahead and add Compressors/Limiters/Dither if you like, set the Master volume output close to or at 0dBfs and render to 16bit.44.1khz file"

...as I've seen some people erroneously wonder "why should my audio CD only hit -12 or -6dBfs?"

Timur
Posts: 2203
Joined: Mon Sep 17, 2007 8:55 am

Post by Timur » Wed Mar 12, 2008 8:58 am

peeder wrote:Hi Timur,

That's a very thoroughly thought out post, which I appreciate. Some comments on it: It's actually not a matter of whether the plugins are "external" or not as to whether they will clip or feature distortion. For instance, many of Logic's built-in plugins will clip at 0dbFS, and others won't. You have to test your gear by using a signal generator and an RTA (in Logic for instance, you can use the channel EQ analyzer with the test tone generator thing). You can use gain plugins to overdrive stuff and learn what the behavior of your system is.
Thanks for the flowers! :D But I guess this post is already lost and buried within the depths of the board. Maybe I should have better started a new thread instead of using this one (where the discussion has mostly come to an end anyway).

Concerning internal plugins of DAWs you are probably right. I first wrote about plugins in general, but then added "external" because assumed that DAW developers should how to incorporate their plugins. Given the fact that most DAWs allow faders to be set upto +6 dB it seems to make sense that internal plugins should never clip (unless they do it intentionally). But I guess that's not the case with all DAWs, especially once they start adding third-party plugins.
Similarly, published specs on converters don't tell you much. Much better is to use your best DAC to output test tones and loopback into your RTA. Then you can see the harmonic distribution of your converters...for instance, an RME converter has very little distortion, most of it the unobtrusive 2nd harmonic (the 1st harmonic being the fundamental). The converters on an API A2D however have significant 3rd harmonic, which gives them that API "zing".
You are mostly right and those specs were only listed to give an idea of that distortion really is happening at pre-amps and even at converters. Most people seem to think that with "digital gear" there will only be distortion once you "digitally clip" your signal. I don't fully agree that specs don't tell us much though. You are right in that they don't tell us much about the resulting "sound", which is the reason why I included the seemingly bad specs of the Avalon asking "does it sound bad?". ;)

But specs can tell us about the limits and culprits of a system and at least can indicate the quality differences between pre-amps and converters of different price (like within the RME range). Because of that they can also help to find the weakest link when problems occur and thus save hours of frustration with EQ and effects when the simplest solution would be to change to another pre-amp. Also when buying gear then specs are often the first (and sometimes only) hard evidence you can check, because most dealers cannot offer a proper listening room for doing sound comparisons. So usually you end up buying something first and checking its sound/quality only after you already spend your money.

I copied your proposed test methods in case I might want to try them anytime later. But considering that I am no engineer but a mere musician and wannabe producer of my own stuff I feel like I already dove too deep into the tech already anyway. mezed
Glance at your meters but don't be ruled by them. You can, and always must anyway, easily adjust the printed levels when mixing ITB (using a trim or gain plug or just the input trim knob on your first plugin: do NOT normalize) and you do so with no introduction of noise. Internal clip lights in a DAW are just for reference and don't mean anything actually clipped. Don't sweat your internal bus levels, you can just adjust those with a master fader or one more trim plugin to feed your bus processors and the DAC the exact level you want.
:!:
Oh and don't get worked up about mastering engineers. heppy They don't need any peak headroom to work with...that's just part of the loudness jihad that some of them are on (but more of them caused in the first place). They always have to adjust gain just like everyone else does.
Well, yes and no. Mastering might include effects that raise the level of certain frequencies (although in general we only want attenuation if possible). And if you chose to spend money on Mastering (or your label choses you to) then you should leave the educated decision about the final level to the mastering engineer. A headroom of 3 dB to 6 dB should not be too much of a compromise.

Another thing you might want to consider is that most of todays music is being compressed to MP3 at one point or the other. And since most people and consumer MP3-players have no idea about Replay-Gain it seems to be a good idea to protect the clueless audience from distorting their MP3s by giving them some more headroom to start with.
You might want to give them some peak-to-RMS range to work with (i.e. don't overcompress) and for your own reasons you won't want to have your peak level at full scale because your DAC will sound different up there than anyone else's. I myself mix through a mild limiter and set my output ceiling to -0.5dbFS (with an RMS crest around -11dbFS). This lets me reference against commercial CDs and allows me to mix with the hindsight of what limiting will do to the signal. It also gives the client a loud mix to demo. And I, and many other ITB mixers, will send the limited version to mastering.
This is something I'm curious and interested about: DAC performance of mostly cheap DACs/opamps in consumer CD and MP3 players. Have CDs been driven upto -0.5 dBFS in the past or did they leave headroom to level out the compromises of early converters/opamps? Won't DAC distortion at these high levels be worse than somewhat increasing the noise-floor of a less hot CD with the analog gain on your stereo? I really don't know. At what levels does consumer DAC quality start to be a problem?
And in fact, mastering is starting to be bypassed more and more... heh
Yep, which mostly fits how lots of music is created nowadays, too. But I'm not sure if this is an all positive developement, because it also reflects how music is received nowadays: use one-time then throw into the trashbin (delete from HD). Consider how much effort was put into the audiophile quality of music in the past just to make that record or CD sound good to satisfy those people who put their money into buying it. Now everyone listens to bad quality MP3s (or other compressed and often DRM plaqued formats) via their mobile or cheal MP3-player/headphone combination. Sure we wont need mastering if people get used to listen to crap-sound anyway. But is it all a positive developement?

3dot...
Posts: 9996
Joined: Tue Feb 20, 2007 11:10 pm

Post by 3dot... » Wed Mar 12, 2008 1:47 pm

bump
Image

Timur
Posts: 2203
Joined: Mon Sep 17, 2007 8:55 am

Post by Timur » Wed Mar 12, 2008 2:28 pm

thefool wrote:another german told me
As a side note, most CD players start to clip at levels of about -0.3db so
it's always safe to not go beyond that level.

Post Reply