Latency (audio)
Encyclopedia
Latency refers to a short period of delay (usually measured in milliseconds) between when an audio signal enters and when it emerges from a system. Potential contributors to latency in an audio system include analog-to-digital conversion, buffering, digital signal processing
, transmission time
, digital-to-analog conversion and the speed of sound
in air.
over a satellite
or similar link with high delay, where the person in the main studio has to wait for the contributor at the other end of the link to react to questions. Latency in this context could be between several hundred milliseconds and a few seconds. Dealing with audio latencies as high as this takes special training in order to make the resulting combined audio output reasonably acceptable to the listeners. Wherever practical, it is important to try to keep live production audio latency low throughout the production system in order to keep the reactions and interchange of participants as natural as possible. A latency of 10 milliseconds or better is the target for audio circuits within professional production structures, local circuits should ideally have a latency of 1 millisecond or better.
delay, Playout delay and Network
delay.
audio platforms, but is much less so in Apple's Mac OS X
and most Linux
operating systems. Mac OS X uses Apple's built-in CoreAudio architecture, which is prepared to run low latencies (as opposed to Windows' WDM architecture). A popular solution is Steinberg's ASIO, which bypasses these layers and connects audio signals directly to the sound card's hardware. Most professional and semi-professional audio applications utilize the ASIO driver, allowing Windows users to work with audio in real time.
With most Linux
operating systems, latency tends to be better than with the MME or DirectX drivers of Microsoft Windows
, if the modern ALSA sound-architecture is used.
The RT-kernel (RealTime-kernel) is a modified Linux-kernel, that alters the standard timer frequency the Linux kernel uses and gives all processes or threads the ability to have realtime-priority. (This means, that a time-critical process like an audio-stream can get priority over another, less-critical process like network activity. This is also configurable per user (for example, the processes of user "tux" could have priority over processes of user "nobody" or over the processes of several system daemon
s). On a standard Linux-system, this is only possible with one process at the same time.
equipment has latency associated with two general processes: conversion from one format to another, and digital signal processing
(DSP) tasks such as equalization, compression and routing. Analog audio equipment has no appreciable latency.
Digital conversion processes include analog-to-digital converter
s (ADC), digital-to-analog converter
s (DAC), and various changes from one digital format to another, such as AES3 which carries low-voltage electrical signals to ADAT
, an optical transport. Any such process takes a small amount of time to accomplish; typical latencies are in the range of 0.2 to 1.5 milliseconds, depending on sampling rate, bit depth, software design and hardware architecture.
DSP can take several forms; for instance, Finite impulse response
(FIR) and Infinite impulse response
(IIR) filters take two different mathematical approaches to the same end and can have different latencies, depending on the lowest audio frequency that is being processed as well as on software and hardware implementations. Typical latencies range from 0.5 to ten milliseconds with some designs having as much as 30 milliseconds.
Individual digital audio devices can be designed with a fixed overall latency from input to output or they can have a total latency that fluctuates with changes to internal processing architecture. In the latter design, engaging additional functions adds latency.
Latency in digital audio equipment is most noticeable when a singer's voice is transmitted through their microphone, through digital audio mixing, processing and routing paths, and then sent to their own ears via in ear monitors or headphones. In this case, the singer's vocal sound is conducted to their own ear through the bones of the head and then a few milliseconds later through the digital pathway to their ears.
Latency for other musical activity such as playing a guitar doesn't have the same critical concern. Ten milliseconds of latency isn't as noticeable to a listener who isn't hearing his or her own voice.
for music or speech presentation in large venues, it is optimal to deliver sufficient sound volume to the back of the venue without resorting to excessive sound volumes near the front. One way for audio engineers to achieve this is to use additional loudspeakers placed at a distance from the stage but closer to the rear of the audience. Sound travels through air at the speed of sound
(around 343 metres (1,125.3 ft) per second depending on air temperature and humidity). By measuring or estimating the difference in latency between the loudspeakers near the stage and the loudspeakers nearer the audience, the audio engineer can introduce an appropriate delay in the audio signal going to the latter loudspeakers. Because of the Haas effect
approximately 15 milliseconds can be added to the delay time of the loudspeakers nearer the audience, to focus the audience's attention on the stage rather than the local loudspeaker. The slightly later sound from delayed loudspeakers simply increases the perceived sound level without negatively affecting localization.
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...
, transmission time
Transmission time
In telecommunication networks, the transmission time, is the amount of time from the beginning until the end of a message transmission. In the case of a digital message, it is the time from the first bit until the last bit of a message has left the transmitting node...
, digital-to-analog conversion and the speed of sound
Speed of sound
The speed of sound is the distance travelled during a unit of time by a sound wave propagating through an elastic medium. In dry air at , the speed of sound is . This is , or about one kilometer in three seconds or approximately one mile in five seconds....
in air.
Latency in broadcast audio
Audio latency can be experienced in broadcast systems where someone is contributing to a live broadcastLive television
Live television refers to a television production broadcast in real-time, as events happen, in the present. From the early days of television until about 1958, live television was used heavily, except for filmed shows such as I Love Lucy and Gunsmoke. Video tape did not exist until 1957...
over a satellite
Satellite
In the context of spaceflight, a satellite is an object which has been placed into orbit by human endeavour. Such objects are sometimes called artificial satellites to distinguish them from natural satellites such as the Moon....
or similar link with high delay, where the person in the main studio has to wait for the contributor at the other end of the link to react to questions. Latency in this context could be between several hundred milliseconds and a few seconds. Dealing with audio latencies as high as this takes special training in order to make the resulting combined audio output reasonably acceptable to the listeners. Wherever practical, it is important to try to keep live production audio latency low throughout the production system in order to keep the reactions and interchange of participants as natural as possible. A latency of 10 milliseconds or better is the target for audio circuits within professional production structures, local circuits should ideally have a latency of 1 millisecond or better.
Latency in telephone calls
Latency in telephone calls is sometimes referred to as mouth-to-ear delay. VoIP systems typically have a minimum of 20 ms latency and target 150 ms as a maximum latency. Latency is a larger consideration in these systems when an echo is present. delay consist of three delays, namely: CodecCodec
A codec is a device or computer program capable of encoding or decoding a digital data stream or signal. The word codec is a portmanteau of "compressor-decompressor" or, more commonly, "coder-decoder"...
delay, Playout delay and Network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....
delay.
Latency in computer audio
Latency can be a particular problem in current Microsoft WindowsMicrosoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
audio platforms, but is much less so in Apple's Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
and most Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
operating systems. Mac OS X uses Apple's built-in CoreAudio architecture, which is prepared to run low latencies (as opposed to Windows' WDM architecture). A popular solution is Steinberg's ASIO, which bypasses these layers and connects audio signals directly to the sound card's hardware. Most professional and semi-professional audio applications utilize the ASIO driver, allowing Windows users to work with audio in real time.
With most Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
operating systems, latency tends to be better than with the MME or DirectX drivers of Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, if the modern ALSA sound-architecture is used.
The RT-kernel (RealTime-kernel) is a modified Linux-kernel, that alters the standard timer frequency the Linux kernel uses and gives all processes or threads the ability to have realtime-priority. (This means, that a time-critical process like an audio-stream can get priority over another, less-critical process like network activity. This is also configurable per user (for example, the processes of user "tux" could have priority over processes of user "nobody" or over the processes of several system daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...
s). On a standard Linux-system, this is only possible with one process at the same time.
Audio latency in live performance
Professional digital audioDigital audio
Digital audio is sound reproduction using pulse-code modulation and digital signals. Digital audio systems include analog-to-digital conversion , digital-to-analog conversion , digital storage, processing and transmission components...
equipment has latency associated with two general processes: conversion from one format to another, and digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...
(DSP) tasks such as equalization, compression and routing. Analog audio equipment has no appreciable latency.
Digital conversion processes include analog-to-digital converter
Analog-to-digital converter
An analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...
s (ADC), digital-to-analog converter
Digital-to-analog converter
In electronics, a digital-to-analog converter is a device that converts a digital code to an analog signal . An analog-to-digital converter performs the reverse operation...
s (DAC), and various changes from one digital format to another, such as AES3 which carries low-voltage electrical signals to ADAT
ADAT
Alesis Digital Audio Tape or ADAT is a magnetic tape format used for the simultaneous digital recording of eight analog audio or digital audio tracks at once, onto a Super VHS tape that is used by consumer VCRs.- History :...
, an optical transport. Any such process takes a small amount of time to accomplish; typical latencies are in the range of 0.2 to 1.5 milliseconds, depending on sampling rate, bit depth, software design and hardware architecture.
DSP can take several forms; for instance, Finite impulse response
Finite impulse response
A finite impulse response filter is a type of a signal processing filter whose impulse response is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response filters, which have internal feedback and may continue to respond indefinitely...
(FIR) and Infinite impulse response
Infinite impulse response
Infinite impulse response is a property of signal processing systems. Systems with this property are known as IIR systems or, when dealing with filter systems, as IIR filters. IIR systems have an impulse response function that is non-zero over an infinite length of time...
(IIR) filters take two different mathematical approaches to the same end and can have different latencies, depending on the lowest audio frequency that is being processed as well as on software and hardware implementations. Typical latencies range from 0.5 to ten milliseconds with some designs having as much as 30 milliseconds.
Individual digital audio devices can be designed with a fixed overall latency from input to output or they can have a total latency that fluctuates with changes to internal processing architecture. In the latter design, engaging additional functions adds latency.
Latency in digital audio equipment is most noticeable when a singer's voice is transmitted through their microphone, through digital audio mixing, processing and routing paths, and then sent to their own ears via in ear monitors or headphones. In this case, the singer's vocal sound is conducted to their own ear through the bones of the head and then a few milliseconds later through the digital pathway to their ears.
Latency for other musical activity such as playing a guitar doesn't have the same critical concern. Ten milliseconds of latency isn't as noticeable to a listener who isn't hearing his or her own voice.
Latency used for delayed loudspeakers
In audio reinforcementSound reinforcement system
A sound reinforcement system is the combination of microphones, signal processors, amplifiers, and loudspeakers that makes live or pre-recorded sounds louder and may also distribute those sounds to a larger or more distant audience...
for music or speech presentation in large venues, it is optimal to deliver sufficient sound volume to the back of the venue without resorting to excessive sound volumes near the front. One way for audio engineers to achieve this is to use additional loudspeakers placed at a distance from the stage but closer to the rear of the audience. Sound travels through air at the speed of sound
Speed of sound
The speed of sound is the distance travelled during a unit of time by a sound wave propagating through an elastic medium. In dry air at , the speed of sound is . This is , or about one kilometer in three seconds or approximately one mile in five seconds....
(around 343 metres (1,125.3 ft) per second depending on air temperature and humidity). By measuring or estimating the difference in latency between the loudspeakers near the stage and the loudspeakers nearer the audience, the audio engineer can introduce an appropriate delay in the audio signal going to the latter loudspeakers. Because of the Haas effect
Haas effect
The Haas effect is a psychoacoustic effect, described in 1949 by Helmut Haas in his Ph.D. thesis. It is often equated with the underlying precedence effect .- Experiments and findings :...
approximately 15 milliseconds can be added to the delay time of the loudspeakers nearer the audience, to focus the audience's attention on the stage rather than the local loudspeaker. The slightly later sound from delayed loudspeakers simply increases the perceived sound level without negatively affecting localization.