Editor's note: The following has been excerpted from Craig Anderton's book How to Choose and Use Audio Interfaces, from Hal Leonard's 12-part Musician's Guide to Home Recording book series. You can order the ebook here or the softcover from Hal Leonard.
Musicians expect an instant audible response: Hit a string, blow a note, play a key, and hear a sound. That’s why it’s important to minimize latency—the delay your computer introduces between the time you play or sing a note and when you hear the sound come out of the speakers or headphones.
Explaining this requires getting a bit geeky, but latency can be a tremendous source of irritation and confusion for many people who use computers for recording. Minimizing latency can make the difference between an enjoyable recording experience and a frustrating one, so let’s tackle this subject head-on.
If you find this whole subject too confusing, here’s a simple rule of thumb: Adjust the latency in your recording software’s control panel to the lowest possible setting that doesn’t affect audio quality or performance.
Key Takeaways
- Lower latencies give the best experience when using virtual instruments and plug-ins—use the lowest sample buffer possible, consistent with the audio not breaking up or distorting.
- If possible, record CPU-heavy parts early in a project so you can use lower latency settings than if you record those parts in a project that already has a lot going on.
- Some plug-ins increase latency. Avoid using them while tracking, or substitute something similar that requires less CPU power until mixdown.
- The interface technology you use influences latency. Thunderbolt interfaces have the least latency.
Latency Basics
Latency occurs in the conversion process from analog to digital and digital to analog, as well as in the computer itself—even the most powerful processor can only do so many millions of calculations per second, and sometimes it can’t keep up. To compensate, the computer holds some of the incoming audio samples in a buffer, which is like an audio savings account: When the computer is so busy elsewhere that it can’t deal with audio, your recording software makes a “withdrawal” from the buffer instead. The larger the buffer, the less likely the computer will run out of audio data when it needs it. But a larger buffer diverts the audio for a longer period of time to keep the buffer filled, which increases latency.
Latency is usually specified in samples in an interface’s control panel, but it may also be displayed as milliseconds inside the host program. Each millisecond (1/1000th of a second) of delay is approximately equal to moving 1 foot away from a sound source. For example, 3 ms of delay is the same amount of delay as moving about 3 feet (about 1 meter) further away from your speakers.
Most musicians would likely agree that latencies below 5 ms are fine and between 5 to 15 ms are acceptable, but anything much over 15 ms can be annoying. Latencies over 20 to 25 ms can take the fun out of playing and can affect performance.
Unfortunately, latency is a moving target. Projects that have a lot of tracks or loads of plug-ins will tax your computer more than simpler projects, so the computer has to work harder. This requires a bigger audio buffer, which increases the latency.
Adjusting Latency
You adjust the latency in your interface’s control panel, but almost all host software will be able to call up this setting so you can adjust latency from within the host (Fig. 1).
Converting Sample Buffers to Milliseconds of Latency
Although most manufacturers specify the audio buffer in samples, this isn’t as intuitive as milliseconds. Some programs include both—you adjust the buffer size in samples, but can also see a readout in milliseconds. If needed, you can convert samples to milliseconds fairly easily, if basic math doesn’t make your head explode.
Here are some examples:
- With a 44.1 kHz sampling rate, there are 44,100 samples taken per second. So each sample represents 1/44,100 of a second, or about 0.023 ms. If a sound card’s latency is 256 samples, at 44.1 kHz that results in a delay of 256 x 0.023 ms—about 5.8 ms.
- 128 samples of delay at 44.1 kHz would be half as much as 256 samples, or about 2.9 ms.
- At a sample rate of 88.2 kHz, each sample lasts half as long as a sample at 44.1 kHz, so each sample represents about 0.0125 ms. Therefore, a delay of 256 samples at 88.2 kHz would be around 2.9 ms.
Latency Specifications
In some cases, latency specifications are misleading not because manufacturers intend to deceive anyone, but because they can’t predict what additional delays a computer will cause. For example, an unspecified delay can be caused by going through a particular USB port, and there may be additional, fixed “safety buffers” that aren’t under your control.
As a result, you may find that an interface’s theoretical latency is less than what you experience in the real world. Audio interfaces are supposed to report their latency back to the host program, so you can see the amount of latency when making adjustments.
You might assume that a sound card with a listed latency of 5.8 ms is outperforming one with a listed latency of 11.6 ms. But that’s not necessarily true, because one program might list the one-way latency a signal encounters going into the computer, while another might give the round-trip latency—the delay caused by going into, and then returning from, the computer. Today’s programs usually give both readings—you might be surprised to see that latency contributed by the sample buffer can end up being only a quarter of the total system latency (Fig. 2).
To complicate matters, the reported latency readings are not always accurate. Some audio interfaces do not report latency correctly and might be off by several milliseconds. There’s no need to get paranoid about this, but be aware that although one audio interface claims a lower latency than another model, you may still sense more of a delay with the “lower latency” audio interface, and it very well might not be lower. Also, some plug-ins increase latency, and this may not be reflected in the latency reading.
So all of this comes back to the question of what latency setting you should use. And the answer remains as stated before: the lowest one that doesn’t cause problems!
How to Obtain the Lowest Possible Latency
Before choosing a latency setting, make sure your system is set up to provide the lowest potential latency. You always want the best “feel” when playing and monitoring instruments. To help you get there, here are various ways to minimize latency.
Use a Computer with a Fast Processor. With today’s multicore processors, a quality audio interface, and well-written drivers, it’s possible to obtain very low latencies. If you have a computer with multiple processors (dual-core, quad-core, etc.), check whether your host recording program supports multi-processor or hyper-threading operation. This increases performance by distributing tasks within the computer over multiple computer cores instead of limiting them to a single core. You may need to look for this option in a preferences or options menu (Fig. 3); some programs default to a setting that will work with all computers, which means it’s set for the lowest common denominator of a single processor.
Check for Driver Updates. Updates can help with anything from squashing bugs to increasing efficiency and reducing latency.
Choose a Modern Audio Interface with a Fast Protocol. For the minimum possible latency, a Thunderbolt 3 interface will outperform other options, at least for now. Recent USB generations like USB 3.1 are faster than previous generations. When it comes to older interfaces, FireWire 800 outperforms the older FireWire 400...you get the idea.
Adjust Latency Depending on the Project. Even if your computer can theoretically obtain low latencies, in practice lower latencies place a greater burden on the processor. Because most audio interfaces provide a choice of latency settings, you can choose the “sweet spot” between low latency and computer performance. If your computer has to record only a few tracks, then you can probably adjust your settings for really low latency. But if you’re running a complex digital audio recording program and playing back lots of tracks with virtual instruments, you may need to set the latency higher.
Some musicians make it a practice to record parts that require a lot of computer power—like guitars using amp sims, or virtual keyboards—early on in a project. This lets them enjoy the lowest possible latency settings. Later on when mixing, where low latency isn’t as important because they’re no longer recording instruments in real time, they’ll increase the latency setting.
Freeze Virtual Instrument Parts. Most recording software has an option to freeze virtual instrument parts. This renders the instrument part as audio, which requires less CPU power to play than the virtual instrument. If you need to make changes to a frozen instrument part, you can unfreeze it, make the required changes, and then refreeze it.
In a project with lots of virtual instruments (requiring high sample buffers), freezing the parts can allow for reduced latency. Consult your recording software’s documentation for details on how to freeze and unfreeze instrument tracks.
Select the Right Driver Protocol for Your Sound Card and Program. On the Mac, it’s easy: Choose Core Audio. On Windows, an audio interface might offer several possible driver protocols, such as ASIO, DirectX, MME, emulated ASIO, etc. If an audio interface includes an ASIO driver written specifically for the device (it should), that’s the one to use. Typically, it will include the manufacturer’s name. Do not use an “emulated” driver, as it will run much more slowly.
Monitor through Headphones. If you’re listening to monitor speakers and you’re sitting around 3 to 4 feet away from them, you’ve just added another 3 to 4 milliseconds of delay. Monitoring through headphones will remove that latency, leaving only the latency caused by using the audio interface and computer.
Record Projects at Higher Sample Rates. Because a higher sample rate causes the computer to process the audio more rapidly, it fills and empties the buffer faster. However, whether the computer can process the audio more rapidly is not always a given.
Use Zero-Latency Direct Monitoring. An audio interface feature called zero-latency monitoring or direct monitoring reduces latency to virtually nothing, so what you hear as you monitor is essentially in real time. However, interfaces do this by monitoring the signal at the audio interface’s audio input, thus bypassing the computer completely—it’s as if you used a Y-cable, and sent one feed to the audio interface and the other one to your monitor speakers or headphones. Therefore if your audio playback requires software running inside the computer, like a virtual instrument, amp sim, or crucial plug-in, zero-latency monitoring will not be appropriate as the computer processing will not be included. On the other hand if you’re a singer who just wants to hear yourself in the headphones, zero-latency monitoring is very useful.
About the Author: Craig Anderton is an internationally recognized authority on musical technology. As a musician, producer, and engineer, he has played on or produced over 20 albums and has mastered hundreds of tracks. He has authored over 35 books and more than 1,000 articles for Guitar Player, Sound on Sound, Electronic Musician (which he co-founded), Pro Sound News, Mix, and several international publications. Visit his personal website here.