Back to blog
October 24, 2018

Understanding Plug-In Delay Compensation

Technicalities, before and now

Music production and record-making is a multi-faceted process where many elements play a role. Some of these are artistic, others are merely technical.

“Back in the days” (Scottish accent, this time), all technical elements involved a number of people who knew their way around tape machines, analog desks, outboard, lines and even real reverb chambers. The last thing anyone wanted was to see a session stall, with the artist losing precious time and inspiration, because of some technicality.

All this is still valid today, even if those technicalities have changed, for those who make music with comptuers (Fab told me there seems to be a bunch of them, around).

One of the most overlooked and underestimated aspects of a DAW is its ability to handle internal delays inherent with routing and processing. In this article we will take a look at Pro Tools way of managing its ADC (Automatic Delay Compensation) but the concepts expressed here will give you the skill-set and detective hat required to perform these checks and diagnostics on every DAW.

Buffer size vs Latency Compensation

First off, these two things are not the same. To explain buffer size I always use the following example:

Every time you press “Play” on your DAW, you are requesting data from your computer’s “brain” to your loudspeakers. Think of it as a number of boxes that travel regularly from your computer to your loudspeakers. This box is your buffer.

The smaller your buffer size, the smaller the boxes your computer will use to put data in to send to your loudspeakers. In a given time (e.g. 1 second) your computer will need to use more boxes, more energy to put stuff in them and pack them securely, then ship them to your loudspeakers. Since the box is small, the time required to pack and ship the first box from the time you hit “Play” will be very short, but your computer will need to work more (higher CPU usage) to make sure all those tiny boxes are sent. Just like in real life, those boxes don’t allow much stuff in them, so you’ll need lots of boxes, lots of tape, lots of packing, lots of energy.

With a large buffer size, your computer will take it easy: a large box means lots of data can go in it, and the box will be closed and sent only when full. This means that, from the time you hit “Play” to the time that first box reaches your loudspeakers, more time will pass. On the other hand, larger boxes make the computer work less in a given time interval (e.g. 1 second).

To recap:

  • Smaller buffer sizes: increased responsiveness, higher CPU/system resources usage
  • Larger buffer sizes: decreased responsiveness, lower CPU/system resources usage

This is why, generally, small buffer sizes are preferred in recording (and need the smallest latency between what you play and what you can hear back from your DAW) and larger buffer sizes are preferred in mixing (when you no longer need time-critical responsiveness and prefer to use more plug-ins by relaxing the strain put on your system)

So how is “internal processing delay” different from “buffer size”? While buffer size is a system-wide parameter, processing delay changes dynamically with routing, plug-ins and processing chains. And this is where it can get out of hand.

Processing delay and its compensation

Let's take two audio tracks: Track A has a kick and snare groove, Track B has a bass guitar riff. While we're at it let's suppose the two tracks were recorded by a top-notch, groovy, funky duo. You sit at the mix and decide that Track A needs a bit of EQ, some compression and a hint of reverb. Track B is perfect as is. You press "Play" to hear the result, and everything sounds amazing. Part of this is because your DAW is automatically compensating for plug-in delay. Why is that?

Well, basically it takes Track A more time to reach the end of its signal chain: Track B is completely naked and goes straight through your routing, but Track A has to be processed through an EQ, a compressor and a reverb.

Automatic Delay Compensation makes sure that Track B does not cut through the finish line by itself: instead it will wait for Track A and once they are all together, they will step through the finish line together, thus preserving the original timing-relations between the two.

If your DAW did not have "ADC" (Automatic Delay Compensation) Track A would sound as if it was recorded later in time. If the difference is huge, the drummer will sound completely wrong and out of time compared to the bass player and since - in our example - the two guys are a famous funk band, you'd get fired for this mistake.

It's easy now to understand how important ADC is, considering that you usually have:

  • more than two tracks
  • more than three plug-ins in total
  • more routing, with auxes for bussing and send/returns

and most importantly: things don't always sound completely wrong. You might have a tiny phase shift between your channels (e.g. kick and bass and rest of the drums? Horror!) that is making you take mixing decisions based on a technical problem, not on the content of your tracks. And this all shifts with any routing or plug-in addition/modification! Again: horror.

For this reason, let's make sure we know how to diagnose if ADC is working correctly.

Troubleshooting and tweaking ADC

Let's take two identical audio tracks, all routed to the same bus. They contain an identical piece of audio: a 1 kHz sine wave at -20dBfs (but really, anything works as long as it's the same audio clip).

I flip the phase (=invert the polarity) on one channel. Some DAWs have a simple "flip phase" button on the channelstrip, but my Pro Tools doesn't. So I put two identical Trim plug-ins on both tracks, bypass it on the first one and keep it engaged on the second one, to flip the phase. This way I put the same processing amount on both tracks and keep them identical for all intents and purposes.

On the summing bus, called "MIX" I put a simple Phasescope plug-in, to see polarity, levels and stereo imaging.

When I play the session the two tracks cancel other and the result is total silence (-infinite). Ah, the beauty of working with ones and zeroes in the digital domain.

Now, I put a plug-in on the first track and put it in bypass. This way I am adding the workload of the plug-in itself but I am not changing the sound in any way. Be aware that in some DAWs, bypassing a plug-in also deallocates it from its processing path. In my Pro Tools, bypass means that the plug-in still "weights" on the CPU but it does not affect the audio of the track itself.

Now, if ADC works properly, the result will still be a complete null. This is because Track B is faster than Track A (no calculations have to be made for it) but it will be asked to wait for Track A to be ready and then they will be all played back.

If we turn ADC off in Pro Tools (Setup menu > Delay Compensation unticked) you will see that Phasescope is now giving us some leftover signal. This means the two tracks are not getting compensated.

In the third example, we make Track A pass through an additional Aux Track and then we make it go to the MIX buss, while Track B keeps going straight to it. If ADC is working correctly, the compensation still happens and the result must be a complete null.

In the fourth example, we make Track A go through an Audio Track, with input monitoring on. This is where things get interesting. In Pro Tools, we press play and the signal does not null. Is this a bug? No.

Pro Tools has a feature called "Auto Low Latency" that is usually ON by default. The idea behind this is that, if you put an audio track in input monitoring and/or recording mode, you will want to record something to it. And if this happens from a real source (e.g. your guitar player needs to record an overdub), Pro Tools assumes you will want the least possible latency to make sure the guitar player can hear what she's playing (yes, she) in time with her performance. "Auto Low Latency" makes sure that the Automatic Delay Compensation rule is broken for tracks that are put in input monitoring and/or arm record mode (green "I" or red dot turned on).

Most of the time this is what you want (especially if the session has lots of plug-ins already) but in this case we don't. We might use this technique to bounce a track into another, and it's paramount that ADC is maintained so we can monitor correctly and commit to the print.

To fix this, we head over to the "delay compensation" pane, at the bottom of that audio track (make sure you have "Delay Compensation" turned on in the "View > Mix Window" menu, to see it). The three fields indicate, from top to bottom:

  • the total delay, in samples, of that track
  • the user offset, in samples, of that track (if any)
  • the total compensation, in samples, of that track, required to equal the delay of the slowest track in the session

normally these fields are all green, but in Pro Tools they can be orange to highlight the slowest track in the session. If they are red, it means the track is not being compensated correctly. Each DAW has a maximum of samples it can compensate.

To turn off "Auto Low Latency" mode for a given track, we right-click on the third, lowest-field of the Delay Compensation Pane, then click on "Auto Low Latency OFF". The compensation field will now look blue to let you know that Low Latency mode is disabled for that track.

If you play your session now, you will notice the complete null. Things are back working as expected.

You can use this diagnostic in any situation (send/returns, too), just by making sure the end result of two identical tracks (but opposed in polarity) returns in a complete null. This is not debatable: it's not an artistic choice or a way of working: DAWs should NOT influence the timing of your material (be it pre-recorded or generated in real time) based on technical, operational factors.

ADC and Virtual Instruments

How about virtual instruments? How do we know for sure that they are all getting compensated correctly? Well, we don't. We trust the software developers. Usually.

But there's a type of virtual instruments that I don't want to overlook: drum libraries and drum-replacement plug-ins. If I am adding a kick and snare sample to an existing drum track, how do I know those two samples are perfectly phase alignment?

In this last example, we have three tracks of drums: Kick, Snare and Overheads and they sound like this:

Original Excerpt

It could be better. I am not hearing enough strength in the kick and snare and I want to reinforce them using samples. To do this, we open a virtual instrument, in my case Slate Digital SSD 4 but you can apply this principle to any similar plug-in.

Once I have selected my kick and snare, I play the session and it sounds like this. Pretty good, it's doing what I want.

Drums with added samples

For me, the first check is done with my ears. It sounds good, so I keep it. However, I know the session will soon be much larger than this and I want to reduce any possibility for things to go wrong. So, instead of leaving the virtual instrument on and have to rely on it, I make the decision to bounce the sample tracks to real audio. This will make the session self-contained and not dependant on a sound library somebody might not have installed years from now, or your mixing engineer might not own... and also it will lock in time those samples and make sure they stay where they are.

Word of advice: loose all virtual instruments as soon as you can, once your arranging/songwriting sessions are done. I personally don't trust MIDI *that much* and prefer to commit to a leaner, more streamlined session before heading to mix it.

In the SSD mixer, I route things as follows:

  • Kick (direct): Stereo Output 2
  • Snare (direct): Stereo Output 3
  • All ambience tracks (Overheads/rooms etc.): Stereo Output 4

Then, in Pro Tools, I create 3 stereo Audio Tracks, name them accordingly and set the inputs to be the outputs of the SSD virtual instruments, the same I've listed above. To add a bit more routing (and put more things to the test) these 3 tracks will go to their own bus and then to the MIX buss.

If I turn Input Monitoring on on those tracks and press play, things will sound weird and off-beat.

Something is wrong

This is because I forgot to set "Auto Low Latency" to OFF, as I explained before. Once this is fixed, everything sounds exactly as it used to be before bouncing.

I then proceed to bounce the tracks and here they are, printed separately and ready to be added to the mix session. The fun thing is that, even with "Auto Low Latency" ON, the printed result would be compensated correctly! Because Pro Tools uses that Low Latency mode only for the monitoring side, not the internal printing (good job, devs).

Now let's zoom in on the drum tracks. While the sampled snare is perfectly aligned and in phase with the original one, you can see a delay between the two kicks. This has nothing to do with the Automatic Delay Compensation but more so with the actual samples in the virtual instrument. They are all different, have different engines, samples and therefore results. This is why a final inspection is always advised.

How about we select the distance between the beginning of the real kick and that one of the sampled kick, find out it's 72 samples (it says so in the Pro Tools transport, once my grid is set to "Samples"). Now we can input "-72" in the "User Offset" field in the delay compensation pane of the sampled kick.

This will tell Pro Tools to shift that track 72 samples "before", thus aligning the sampled kick with the real one. It does not always mean it will sound better, I am only saying it's worth checking! In this case, the aligned version sounds better and makes the two kicks feel more as one. Subtle but it's there.

Original + Samples (aligned kick drum)

Pianist and Resident Engineer of Fuseroom Recording Studio in Berlin, Hollywood's Musicians Institute Scholarship winner and Outstanding Student Award 2005, ee's worked in productions for Italian pop stars like Anna Oxa, Marco Masini and RAF, Stefano 'Cocco' Cantini and Riccardo Galardini, side by side with world-class musicians and mentors like Roger Burn and since 2013 is part of the team at pureMix.net. Alberto has worked with David White, Niels Kurvin, Jenny Wu, Apple and Apple Music, Microsoft, Etihad Airways, Qatar Airways, Virgin Airlines, Cane, Morgan Heritage, Riot Games, Dangerous Music, Focal, Universal Audio and more.