Tech Tip:Computer Latency and Recording
It’s the Achilles Heel of computer-based recording: You can’t really play through a computer in real time. But there are some ways to minimize any audible delays.
By Craig Anderton
Lurking deep within your computer is a kill-joy for anyone who wants to play software synthesizers in real time, or play instruments (such as guitar) through processing plug-ins: Latency — the delay your computer introduces between the time you hit a note on a keyboard, and when you hear it come out of the speakers.
But look at it from the computer’s point of view. Even the most powerful processor can only do so many millions of calculations per second; when it’s busy scanning your keyboard, checking its ports, shuffling data in and out of RAM, and generally sweating its little silicon butt off, you can understand why it sometimes has a hard time keeping up. Nonetheless, you want the best possible “feel” when playing soft synths, so let’s investigate how to push your computer to obtain the lowest possible delay.
When using WDM drivers with Sonar, the Control Panel for Creamware’s SCOPE interface sets the minimum latency. However, this has been set somewhat higher within Sonar via the “Mixing Latency” parameter. When using ASIO, Sonar locks to the audio interface’s latency and no further adjustments are possible.
The first step in minimizing delay is, unfortunately, the most expensive one: a processor upgrade. Today’s multi-GHz processors are so fast they actually travel backward in time! Well, not really, but massive computational power is a Good Thing.
The second step involves drivers, little pieces of code that provide communications between your computer and soundcard (or USB/FireWire interface). Don’t let their size fool you — they are the data gatekeepers, and how efficiently they do their task greatly affects latency.
Steinberg devised the first low-latency protocol for soundcards, based on their ASIO (Advanced Streaming Input Output) drivers. These tied in closely with the CPU, bypassing various layers of both Mac and Windows operating systems. At that time the Mac used Sound Manager, and Windows used something that seemed to change names every few weeks, but was equally unsuited to musical needs. Cards that supported ASIO were essential for serious musical applications; ASIO led to ASIO2, which was even better.
Lately, Apple and Microsoft have wised up. Microsoft brought forth the WDM protocol, which was light years ahead of their previous efforts. And starting with OS X, Apple gave us Core Audio, which was tied in even more closely with low-level operating system elements. Rumor has it that Microsoft’s Windows Vista operating system (code-named “Longhorn”), due out in late 2006, will offer audio services beyond WDM. Even so, it’s now possible to obtain latencies of around 1.5 to 3ms with a fast processor and a soundcard that supports low-latency drivers like ASIO, WDM, or Core Audio.
Why Direct Monitoring Isn’t Always The Answer
You may have heard about a soundcard feature called “direct monitoring,” which supposedly reduces latency. And it does, but only for audio input signals (e.g., mic, hardware synth, guitar, etc.). It does this by sending the signal directly to the audio output, essentially bypassing the computer. When you’re playing software synthesizers, or any audio through plug-ins (for example, guitar through guitar amp emulation plug-ins), turn direct monitoring off. What you want to hear is being generated inside the computer, so shunting the audio input to the output is not a solution.
You’ll typically find direct monitoring settings in one of two places: An applet that comes with the soundcard, or within a DAW program.
How Low Can You Go?
In this screen shot, Live 5’s Freeze function is converting a Kontakt 2 instrument track into a hard disk audio track, thus reducing the load on the CPU. This allows for a lower latency setting.
1.5 ms of latency approaches the theoretical minimum, because it will always take a finite amount of time to convert analog to digital at the input, and digital to analog at the output. Unfortunately, though, ultra-low latency settings (or higher sampling rates, for that matter) make your computer work harder, so you’ll be limited as to how many software synthesizers and plug-ins can run before your computer goes compu-psycho. You’ll know your computer is going too far when the audio starts to sputter, crackle, or mute. As latency will continue to be a part of our musical lives for the foreseeable future, before closing out let’s cover some tips on living with latency.
- Set latency to the highest comfortable value. For me, 5ms is sufficiently responsive, and makes the computer happier than choosing 2 or 3ms.
- Sometimes there are two latency adjustments: A Control Panel for the soundcard sets a minimum amount of latency, and the host can increase from this value if needed. Or, the host may “lock” to the control panel setting.
- Seek out and download your sound card’s latest drivers. Dedicated programmers are mainlining Pepsi and eating pizza as we speak so that we can have more efficient audio performance—don’t disappoint them.
- If you have multiple soft synths playing back at once, use your program’s “freeze” function (if available) to disconnect some synths from the CPU. Or, render a soft synth’s output as a hard disk audio track (then remove the soft synth), which is far less taxing on our little microchip buddies. Hint: If you retain the MIDI track driving the soft synth, which places virtually no stress on your CPU, you can always edit the part later by re-inserting the soft synth.