In an audio production environment, latency refers to the time taken for an audio signal to travel through and be processed by an audio workflow. Latency matters because when it gets too large it becomes noticeable and hinders the audio production process. Fortunately, a good audio interface can help to reduce latency.
In this article we’ll look at:
- What is audio latency?
- What causes latency?
- How much latency is too much?
- MIDI latency
- How audio interfaces can help to reduce latency
What is audio latency?
Think of a typical digital audio production workflow:
- An instrument (e.g., guitar) or voice generates an (analog) sound signal
- The sound signal is converted to an electrical signal (if necessary via a microphone)
- This signal then travels through cables and into an audio interface
- It gets converted from an analog signal to a digital signal through a process of analog-to-digital conversion (ADC)
- The digital signal flows into a computer system and a digital audio workstation (DAW) software package for processing
- The (digital) output of the DAW flows back to the audio interface and gets converted back to an analog signal through a process of digital-to-analog conversion (DAC)
- Finally, the (analog) signal leaves the audio interface and moves to the output system (i.e., headphones or monitor speakers)
This whole process takes time. And the time that’s taken, or the delay, for an audio signal to loop through this workflow is called latency.
Latency matters because when it gets too high it becomes noticeable and hinders the audio production process.
What causes latency?
Electrical (audio) signal transmission occurs at very fast speeds in modern systems—measured in milliseconds (i.e., thousandths of a second)—but the time taken for an audio signal to traverse an audio production workflow still adds up.
The key causes of latency in a digital audio workflow are:
- ADC and DAC processing
- Internal buffering in the audio interface
- The buffer setting in DAW software
- Computer processor speed
ADC and DAC processing is complex and handled by dedicated hardware in audio interfaces.
Both processes need to occur in an audio workflow, i.e., analog sound needs to be converted to a digital signal (ADC) for computer processing, and then back again to an analog signal (DAC) for amplification and human hearing.
The ADC and DAC processes together can add 1-2 milliseconds to latency.
Set your buffer size carefully
Buffers are used to store temporary memory in digital systems. In a digital audio workflow, buffers are used during signal transport and also by device drivers in the computer system.
The purpose of buffers is to help ease the burden on a computer’s processor—the higher the buffer, the lower the burden on the processor, and vice-versa.
This is because buffers store data before passing it to the processor, so the more data that’s held by the buffer, the more time the processor has to get through its workload.
You can set the buffer size in DAW software packages, typically having a choice between 32, 64, 128, 256, or even 1,024 samples.
There’s a tradeoff, however—the higher your buffer setting, the more latency in your system. And setting your buffer too low may over-tax your processor and lead to distortion or other undesirable effects.
This is where computer processing speed plays a role—the more powerful your computer’s processor, the smaller buffer size you need to use. All else equal, this will result in less latency.
In practice, a fair degree of trial and error is required in setting the right buffer size for your setup.
Device drivers can make a big difference in latency
Device drivers are pieces of software that help complex software programs communicate and interact with pieces of hardware in a digital system.
They are the biggest variable contributing to latency, adding quite a lot—or not so much—depending on the operating system and software-hardware combination in the system.
Some audio interfaces rely on the computer operating system’s built-in driver, while other interfaces come with custom-built driver software—these usually provide better latency performance.
So, in terms of latency, the drivers that an audio interface uses play an important role—the better (or more customized) the driver, the better the latency outcome usually is.
How much latency is too much?
As we’ve seen, latency is unavoidable in a digital audio production workflow. But how much can we tolerate before it starts to become a problem?
To help answer this, consider that sound travels at around 340 meters per second.
If you’re sitting 1 meter away from a piano, for instance, you’ll hear the piano’s sound after around 3 milliseconds. This delay (latency) is small enough to go unnoticed by human ears.
But what about when the delay gets larger?
According to Presonus, a leading audio equipment manufacturer, if the latency starts to exceed around 12 milliseconds then most listeners will notice it.
At this point, latency can start to become quite distracting and counterproductive for a music production environment.
Till now we’ve been discussing audio latency, i.e., the latency associated with analog and digital audio signals. But latency is also an issue for MIDI information.
MIDI is a communication standard that conveys digital information about music—the notes played, how they were played, and their timing—but doesn’t include actual audio data. MIDI, therefore, is like a ‘musical score’ rather than a recording of music itself.
In a common setup, when you strike a key on a MIDI keyboard (or other type of MIDI controller) a message is sent from the keyboard to a connected software instrument (e.g., in a DAW). The latency is the delay between when you strike the key and when you hear the sound produced by the software instrument.
This latency has two parts:
- MIDI latency, which accounts for the time taken for the keyboard to send the MIDI data to your computer, and the time to process the data by the MIDI input port in your computer and DAW or plugin
- Audio playback latency, which is the time taken for your audio system to produce an audible sound from the software instrument
MIDI latency can be affected by several factors, including computer performance, the specific MIDI devices being used (e.g., MIDI instruments, MIDI ports, or MIDI interfaces), and the software and plugins that process the MIDI data.
While you should be aware of MIDI latency, MIDI data is much smaller and simpler than audio data so MIDI latency is usually less of an issue than audio latency.
How audio interfaces can help to reduce latency
As we’ve seen, there are many factors impacting latency in a digital audio system, including the distance to travel through the system, buffering, and ADC/DAC processing, amongst others. All of this will add to latency.
Fortunately, audio interfaces can help to reduce latency. There are three ways in which they do this:
- They are purpose-built hardware and software devices with dedicated drivers
- They come with a variety of connection types
- They offer direct monitoring
Let’s take a closer look.
Latency using a sound card vs an audio interface
So far, we’ve been discussing digital audio workflows that include audio interfaces.
But what if you don’t have an audio interface in your workflow?
In this case, you’ll probably need to rely on your computer’s in-built sound card for the ADC and DAC processing that’s necessary for digital audio production.
(N.B., the ‘sound card’ may simply be a ‘sound chip’ built into your computer’s motherboard—we’ll refer to both possibilities as a sound card.)
But sound cards are not purpose-built for ADC and DAC in the way that audio interfaces are, and they don’t have dedicated drivers.
Hence, sound cards typically result in higher latency than audio interfaces.
The additional latency of sound cards compared with audio interfaces can make a big difference in digital audio workflows.
The latency for a typical headphones output from a sound card, for instance, can be as high as 20 milliseconds. This far exceeds the 12 milliseconds level at which latency becomes noticeable.
By comparison, a good audio interface would have a latency of just a few milliseconds for a similar task.
Most modern audio interfaces come with three ways in which to connect to your computer: USB, Thunderbolt, or PCIe.
Of these, USB is usually the slowest.
PCIe typically comes with high-end professional interfaces and connects directly to a computer’s internal processing, offering the fastest data handling and lowest latency of the three.
Thunderbolt is also very fast as it can employ direct memory access through specially designed drivers, resulting in high data handling efficiency and very low latency.
You can, therefore, choose the audio interface that best meets your latency needs based on the connection type it offers.
Many audio interfaces allow the audio signal to bypass the computer and DAW software, going straight to the headphone and line outputs instead—a feature called direct monitoring.
With direct monitoring, you can listen to the input signal of an interface with near-zero latency.
There is usually an in-built mixer available on interfaces that offer direct monitoring, allowing you to adjust the balance between your (direct) input signal and the playback from your DAW software.
Direct monitoring offers a convenient way of avoiding the issues of latency during an audio production session.
Latency refers to the time it takes for an audio signal to travel through an audio production system.
It’s the delay that you hear between producing a sound (e.g., playing a note on a guitar) and hearing its output from the system (i.e., through headphones or monitor speakers).
When latency gets too large—around 12 milliseconds or more—it becomes noticeable. Beyond this point, latency can hinder the audio production process.
Other than the time taken to travel through cables and hardware, latency is also impacted by ADC and DAC processing, buffering, and computer processing speed.
Fortunately, audio interfaces can help to reduce latency.
Audio interfaces have dedicated hardware (i.e., ADC and DAC units) and software (i.e., drivers) that are far more efficient than using a computer’s in-built sound card.
They also offer a choice of connection types, so you can choose the type that best meets the latency needs of your system.
What’s more, many audio interfaces offer direct monitoring functionality—this allows for near zero-latency monitoring of your input sound. Direct monitoring can be a great way to avoid latency issues in a digital production environment.
So, while latency is unavoidable in a digital audio workflow, audio interfaces can help to reduce and manage it.
You can choose an audio interface that best meets your workflow needs, and adjust your system parameters (such as buffering) to get the best latency outcome for your production process.
What is audio latency?
Audio latency is the time taken for an audio signal to travel through (and be processed by) a computer and be heard through speakers or headphones. When latency gets too large it can hinder the audio production process.
What causes audio latency?
Latency in a modern audio workflow is caused by the time it takes for digital audio data to be converted from analog to digital and back again, as well as the time it takes for the computer to process the audio and output it.
What are latency issues?
Latency issues refer to delays or time lags when audio data is processed. This can result in distortion, audio glitches, delays in monitoring and playback, or synchronization problems between different tracks or devices.
What is a good level of audio latency?
Latency starts to become noticed when it exceeds around 12 milliseconds, so a good audio latency is less than this.
How do I reduce latency in audio?
You can reduce latency in your audio setup by using fast connection types (e.g., Thunderbolt or PCIe), choosing the right device drivers, setting the right buffer size, using a more powerful computer, and using an audio interface.
What is a buffer?
A buffer is a temporary space in the computer’s memory that stores incoming and outgoing audio data. It allows for smooth audio playback and recording by storing and processing audio data in small chunks.
What is the sample rate?
The sample rate refers to the number of audio samples recorded per second. It is measured in hertz (Hz) or kilohertz (kHz). Higher sample rates result in higher quality audio but also require greater processing power.
How are buffer size and sample rate related?
Buffer size and sample rate are related as follows: buffer size / sample rate = latency.
This means that a smaller buffer size and higher sample rate will result in less latency (and vice-versa). But the higher sample rate requires more computer processing power, which in turn may impact latency when recording or playing back audio.
How can I set the buffer size and sample rate?
The buffer size and sample rate can usually be set within the preferences or settings of the DAW software being used.
What is MIDI latency?
MIDI latency is the delay between when a MIDI message is sent by a MIDI controller (e.g., MIDI keyboard) and when the corresponding sound is produced (e.g., by a software instrument).
What is a DAW?
A DAW (Digital Audio Workstation) is software used for recording, editing, and producing digital audio. It includes tools for mixing, mastering, and arranging audio tracks, as well as support for software instruments and effects plugins, and external hardware devices such as MIDI controllers and audio interfaces.
Why is computer processing (CPU) power important for audio latency?
CPU (Central Processing Unit) refers to the primary processing chip in a computer. It’s responsible for executing instructions and performing calculations, including those required for processing digital audio. All else equal, the more CPU processing power your computer system has, the lower the latency (and vice-versa).