How audio delay is generated

Comments · 32 Views

Modern computers are ideal recording devices. They can handle more audio and MIDI tracks than we'll ever need, and computer-based audio control and customization has come a long way.

But it is important to understand that the original task of the PC was not to work with sound at all. There are complexities that are not inherent in tape recording. The biggest of these problems is latency: the time gap between the recorded sound and listening to it through headphones or monitors.

How audio delay is generated

First, let's understand what happens when a signal is recorded on a computer. The microphone measures pressure changes in the air and outputs an electrical signal with corresponding voltage changes. This signal is called analog because the changes in electrical potential are analogous to the pressure fluctuations that make up sound.

A device called an analog-to-digital converter (ADC) then measures or samples the fluctuating voltage at regular intervals - 44,100 times per second (in the case of CD-quality audio) and reports these measurements as a series of numbers.

The sequence of numbers is packaged in the appropriate format and sent via an electrical line to a computer. The software on the PC writes this data to memory and disk, processes it, and "gives" it back so that it can be converted back to an analog signal. This process is performed using a digital-to-analog converter (DAC).

This is a rather complicated sequence of actions, which depends on the speed and reliability of signal transmission. The ideal situation is as follows: each sequence received from the ADC is sent to the computer, stored and sent back to the DAC immediately. But in practice, such a scheme is impossible. Even the slightest delay in sending even one of the millions of samples in an audio recording can lead to a signal dropout.

Signal Buffering

To make the system more reliable, each sample is not recorded and played back as soon as it arrives. Instead, the computer waits to receive several tens or hundreds of samples before proceeding to process them. The same thing happens at the exit. This process is called buffering and makes the system more resilient to unexpected failures. The buffer acts as a safety net: even if the data stream is momentarily interrupted, it is capable of outputting a continuous sequence of samples.

The larger the buffer size, the better the system's ability to deal with unexpected situations, and the less time is spent processing. But there is also a disadvantage associated with a large buffer size: the buffering process takes longer, and at a certain point, the signal coming from the computer begins to noticeably lag behind the recorded sound source. In some situations this is not a problem, but in many scenarios it is definitely the case. Where musicians listen to themselves or colleagues while recording or performing, it is essential that delay never become audible.

I think you should read about how to fix audio delay and it will be useful for you