Guitar | Bass | Keyboard | Microphones | Mixers | Audio Interfaces | Monitors | Sequencers | Soft Synths | Live Sound | Drums | Club | Accessories | Blowouts
What is Latency? How to defeat it
by TweakHeadz Lab
That which makes music 'gel" is within the finest innermost particles of what we know as time. This is not a fancy quote by some writer. This is me telling you what is true. When 'what you hear' is "late" you have latency. Latency is a problem that comes with the modern miracle of digital audio. The conversion from analog sound to numbers and back, and all the processes in between of effects, software instruments and summing during mixing all happen in time. There it is, plain and simple.
Latency is a problem when you are are recording a track while listening to other tracks already recorded. It takes time for the track you are recording to pass through the audio interface, through the converters, CPU, to storage, then back out the converters and back through an analog output to your headphones or speakers. You find that the track you are recording arrives at your ears later than the tracks that are playing back. That difference, even if its just a fraction of a second, can make the performing/recording process difficult. Music depends upon the recording musician "getting in the groove" or in sync with the music on other tracks. If the timing is off, the better a musician you are, the harder time you will have finding your chops. This is why some great musicians have been known to insist on using analog tape, which has no latency. Understanding latency is critical. I'll tell you now, for some latency issues there are no easy, cheap solutions. Other problems are simply a result of not understanding what you are doing.
Latency is really more than one problem. It can have several sources, and as you examine them, you realize there are different types of latency with different causes. OK, let get into them!
Scene One: Lets say you are recording acoustic guitar and are monitoring over headphones. You have the Mic routed to the sequencer and through some great plugins that make the guitar sound so sweet. But when you pick a note, you don't hear it in the headphones till about 1/4 of a second later. Just try to play a intricate finger picked solo. You can't. Your hands and and your ear are not in sync.
People that use their onboard sound device on their laptop or desktop computer often run into this because the only way to monitor what is being recorded is through the sequencer after all the audio processing has taken place. The solution is to either use a mixer and monitor what you are playing there, before it gets to the computer, or to get an audio interface with a zero latency monitoring system. Here you turn off the software monitor in your sequencer and turn on the direct monitoring on the audio interface.
Scene two: You are playing a premium soft synth, a digital model of a famous analog synth. You press a note on your controller keyboard. The note happens later by 1/3rd of a second. You bang on the keyboard shouting, Stupid MIDI latency! I KNEW I should not have gotten a USB midi controller! Heh. You are wrong. This has nothing to do with MIDI. There is a such thing as MIDI latency but its never this bad (unless your computer has sever USB problems or is so old it did not come with USB). You can generally assume the passage from Note on to the sequencer through the midi cable (whether standard or USB) will be not noticeable. Its when the note gets to the software instrument and the CPU starts to construct and generate the sound--that is where the latency happens. It may be part of a backlog of tasks that your poor overburdened CPU is struggling to spit out in real time. And there you are running 5 soft synths, playing string pads with two fisted chords, triggering 20-35 CPU processes where audio must be created out of digital instructions in real time. You are using an ancient laptop and are cursing the MIDI controller? The sequencer may cough up the message "CPU too Slow! or something similar.
Scene Three: You've got your old desktop that still has its original 1GB hard drive from 1996--huge back then. You get the acoustic guitar track down and want to put down the bass. You were smart and bought a zero latency audio interface, so you can hear the bass against the guitar track without additional delay. So you kick the sequencer into record mode. The song position line moves about one inch then stops. Huh? You try again and can get the first 3 bars done and it stops again! $$%#$^) Insert explicative reserved for highly stressful situations). I thought this___interface was __ ____ LATENCY free! Hehehe. Its not the interface's fault. Its your hard drive is too slow. It can't manage to move the head fast enough to read the data from track one and write the data from track two at the same time.
Scene Four: You just bought your brand spanking new interface and got a fast external hard drive for your new computer. You install the interface. All is well. You install the sequencer, lets say its Cubase. A-OK! Excited you boot Cubase for the first time and it finds your audio interface! You select it. Now it wants to know what driver you want. You think, hmmm, I heard asio is best so I will choose 'asio multimedia'. You start your first song and play a note on a popular soft synth and you hear it WAY too late. like a whole second. Wait a minute, this is a NEW computer. What the heck is going on! Tsk. Tsk. You chose the wrong driver, "a fake" asio driver that is designed to work on old computers where nothing else will work. The correct driver is on your system waiting for you to get a clue. Fortunately, this problem does not cost you anything, other than a few shreds of sanity that snapped like a spork during your last happy meal. (Sorry had to use that).
But there are other driver problems that can snare the newbie. Drivers often stop working after a major OS upgrade. Windows Vista drivers might refuse to work with Windows 7. OSX 10.2. drivers may refuse to work with Snow Leopard. You are going to have to wait till the manufacturer updates the driver. Now you have a true timing problem, lol!
Scene 5: You talked to people on studio-central and they told you which driver to use. Now you try it and its still making everything late. Sigh. Dude, you need to set you audio buffer properly. The smaller the buffer, the less latency. However, the smaller the buffer, the harder the CPU has to work to get the data out of the oven on time. So we have a tradeoff. Buffer sizes can range from 64 samples, 128 samples, 256, samples, 512 samples, 1024 samples and 2048 samples. At the smallest and fastest buffer of 64 samples, most CPUs, even the supercharged high end i7's and 8 core, will stop working when you start adding processors. The 128 sample buffer requires a well-tuned, fast, modern machine with no bottle necks. The 256 buffer is for the rest of us. With a reasonably well running desktop computer it will do plenty of tracks with many, many processors and soft synths. There is some latency, but not much. You can feel the difference when you switch to 128 and back, but both on the keyboard or through microphones, 256 is workable.
At 512 samples the buffer is large enough to prevent most CPU errors on a normal computer, but the delay is getting bad. Its almost impossible to track acoustic guitars with any finesse (unless you have the zero latency audio option) and soft synth keyboard playing gets difficult for all but the simple one note passages.
Here Logic is set to the 128 buffer. If I use too many big soft synths I will have to revert back to a 256 buffer.
At 1024 and 2048, as you might imagine, real time recording is off the table. So why use it? Simple answer, you can load up on plugins, softsynths, processors, including high end mastering compressors and EQ (which need a lot of CPU cycles). When you mix or master, who cares if all the tracks start one second late? You press play on the transport and wait 1 second before playback. its NBD! (no big deal) if your processors have the space and air to breathe properly. Even the fast computers benefit from high latency settings.
"Nothing is as far away as 1 minute ago". Jim Bishop
5 sources of Latency and how to fix them
1. CPU is too slow or there is not enough memory to do the task
Get a new computer, upgrade your motherboard and CPU, add memory. You can also try to tweak your Windows installation and get back some CPU cycles, but chances are the CPU just can't handle the demands.
2. Drive is too slow
Get a faster drive, additional drive, or external fast drive. Keep in mind that sometimes a bad driver will fail to feed the drive the right data and will sometimes fail to get the right data. This can cause a message that your drive is too slow when in reality the driver is corrupt. Other things that might help is to defragment your drive so the heads don't have to work as hard.
3. Monitoring through software processors delays the output
Get an audio interface that allows zero latency monitoring or monitor through a mixer. These will send the input of the mix and line preamps directly to the outputs without going through the sequencer. So you hear what you play with no delay.
Motu's cue mix takes the signal from my RNP (preamp) and routes it to a headphone bus directly. I have the option of adding reverb, EQ and compression if I like to tailor the sound in the vocalist's headphones. What they hear is not recorded, but has miniscule latency. If I switch off the processing there is zero latency. These "DSP" processors are included because many vocalists will give a better performance if they hear some reverb. With this kind of system I can tailor the headphones precisely to the performer's needs, and separately record a clean dry track for later processing.
4. the driver you selected was wrong or the driver is old or bad
Try a different driver, download the latest driver, get a product known for good drivers.
5. The correct driver is using the wrong buffer setting.
Try all the different options. Run a 256 buffer, but see if your system can handle the 128 buffer.
There certainly is a lot more information out there on latency is digital audio systems. You might need that if you were taking a course in audio engineering. But what you have above is all you need to know to get your system fine tuned and running well with the least latency possible. With the recording and performing of music, microseconds count. That which makes music 'gel" is within the finest innermost particles of what we know as time.
On to the Next Class
Go to the Previous page
Frank Zappa: "Modern music is people who can't think signing artists who can't write songs to make records for people who can't hear. Most people wouldn't know good music if it came up and bit them on the ass.
Tweak's Articles on Essential Studio Concepts