{"id":19499,"date":"2014-10-28T10:51:37","date_gmt":"2014-10-28T14:51:37","guid":{"rendered":"https:\/\/noelborthwick.com\/cakewalk\/?p=19499"},"modified":"2014-10-28T10:51:37","modified_gmt":"2014-10-28T14:51:37","slug":"recording-latency","status":"publish","type":"post","link":"https:\/\/noelborthwick.com\/cakewalk\/2014\/10\/28\/recording-latency\/","title":{"rendered":"Basics: Five Questions about Latency and Computer Recording"},"content":{"rendered":"<p><em>Get the lowdown on low latency, and what it means to you<\/em><\/p>\n<p><span style=\"font-size: 13px;\">By Craig Anderton<\/span><span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>Recording with computers has brought incredible power to musicians at amazing prices. However, there are some compromises\u2014such as <em>latency.<\/em> Let\u2019s find out what causes it, how it affects you, and how to minimize it.\u00a0<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p><strong>1. What is latency?<\/strong> When recording, a computer is often busy doing other tasks and may ignore the incoming audio for short amounts of time. This can result in audio dropouts, clicks, excessive distortion, and sometimes program crashes. To compensate, recording software like <a title=\"SONAR X3\" href=\"http:\/\/www.cakewalk.com\/Products\/SONAR\" target=\"_blank\">SONAR<\/a> dedicates some memory (called a <em>sample buffer<\/em>) to store incoming audio temporarily\u2014sort of like an \u201caudio savings account.\u201d If needed, your recording program can make a \u201cwithdrawal\u201d from the buffer to keep the audio stream flowing.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p><em>Latency<\/em> is \u201cgeek speak\u201d for the delay that occurs between when you play or sing a note, and what you hear when you monitor your playing through your computer\u2019s output. Latency has three main causes:<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<ul>\n<li><strong>The sample buffer.<\/strong> For example, storing 5 milliseconds (abbreviated ms, which equals 1\/1000<sup>th<\/sup> of a second) of audio adds 5 ms of latency (<strong>Fig. 1<\/strong>). Most buffers sizes are specified in samples, although some specify this in ms.<span style=\"font-size: 13px;\">\u00a0<\/span><\/li>\n<\/ul>\n<p style=\"text-align: center;\"><em><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-19501\" title=\"US-2x2 art\" src=\"https:\/\/noelborthwick.com\/cakewalk\/wp-content\/uploads\/2014\/10\/US-2x2-art.png\" alt=\"\" width=\"608\" height=\"266\" \/><strong>\u00a0<\/strong><\/em><strong><em style=\"font-size: 13px;\">Fig. 1: The control panel for TASCAM\u2019s US-2&#215;2 and US-4&#215;4 audio interfaces is showing that the sample buffer is set to 64 samples.<\/em><\/strong><span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<ul>\n<li><strong>Other hardware.<\/strong> Converting analog signals into digital and back again takes some time. Also, the USB port that connects to your interface has additional buffers. These involve the <em>audio interface<\/em> that connects to your computer and converts audio signals into digital signals your computer can understand (and vice-versa\u2014it also converts computer data back into audio).<\/li>\n<li><strong>Delays within the recording software itself. <\/strong>A full explanation would require another article, but in short, this usually involves inserting certain types of processors within your recording software.<span style=\"font-size: 13px;\">\u00a0<\/span><\/li>\n<\/ul>\n<p><strong>2. Why does latency matter?<!--more--> <\/strong>As musicians, we\u2019re used to an immediate response: Pluck a string, hit a key, or sing a sound, and you hear the results immediately. When latency is short, it\u2019s not a problem. But when there\u2019s an audible delay, latency is not only annoying, it can throw off your timing.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p><strong>3. How much latency is too much? <\/strong>Reactions vary. Drummers are a short distance from their drums and timing is everything, so they tend to be more picky about latency. Guitar players are typically several feet away from their amps, so they\u2019re used to several milliseconds of latency anyway\u2014sound takes about 1 ms to travel 1 foot (30 cm). If you\u2019re standing 6 feet (2 meters) from your amp, the sound you\u2019re hearing is delayed by about 6 ms.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>Here\u2019s a very rough (and subjective) guideline on how players react to latency, expressed as both milliseconds and samples (at a 44.1 kHz sample rate).<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<ul>\n<li><strong style=\"font-size: 13px;\"><\/strong><strong>0-5 ms (0-220 samples)<\/strong>:<span style=\"font-size: 13px;\"> Not a problem. Latencies under 5 ms are about as good as you\u2019ll get with today\u2019s computers anyway.<\/span><\/li>\n<li><strong style=\"font-size: 13px;\"><\/strong><strong>5-10 ms (220-440 samples)<\/strong>:<span style=\"font-size: 13px;\"> Most players don\u2019t find this problematic, but some can hear the difference.<\/span><\/li>\n<li><strong style=\"font-size: 13px;\"><\/strong><strong>10-15 ms (440-662 samples)<\/strong>:<span style=\"font-size: 13px;\"> This is where players start to \u201cfeel\u201d the delay.<\/span><\/li>\n<li><strong style=\"font-size: 13px;\"><\/strong><strong>15-20 ms (662-882 samples)<\/strong>:<span style=\"font-size: 13px;\"> For most, this amount of delay is objectionable.<\/span><\/li>\n<li><strong style=\"font-size: 13px;\"><\/strong><strong>Over 20 ms (over 882 samples)<\/strong>:<span style=\"font-size: 13px;\"> This much delay can really take the fun out of playing.<\/span><span style=\"font-size: 13px;\">\u00a0<\/span><\/li>\n<\/ul>\n<p><strong>4. How do you specify latency?<\/strong> The sample buffer latency spec doesn\u2019t tell the full story. A more \u201creal-world\u201d spec, <em>round-trip latency,<\/em> includes <em>all<\/em> hardware causes of latency. This varies depending on several factors, such as the sample rate used for recording. SONAR analyzes the latency figures reported by audio interfaces and displays the round-trip latency amount (<strong>Fig. 2<\/strong>).<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-19500\" title=\"Prefs\" src=\"https:\/\/noelborthwick.com\/cakewalk\/wp-content\/uploads\/2014\/10\/Prefs.png\" alt=\"\" width=\"592\" height=\"515\" \/><\/p>\n<p><strong><em>Fig. 2: SONAR is running at 96 kHz. Using 64 sample buffers with TASCAM\u2019s US-2&#215;2 results in a round-trip latency of only 4.3 ms. The portion of the Preferences menu dealing with latency is outlined in red for clarity.<\/em><\/strong><span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>TASCAM\u2019s US-2&#215;2 and US-4&#215;4, when operating with a modern computer, can use a 64-sample buffer. As shown in Fig. 2, this adds 0.7 ms of latency with a 96 kHz sample rate for recording. Additional hardware-based delays raise that to a \u201creal world\u201d round-trip latency spec of 4.3 ms. When recording at 44.1 kHz (the same sample rate as CDs), the round-trip latency is 9.4 ms\u2014which is still very good.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>However, running at low latency also requires more computer power. With older computers, or complex projects using lots of tracks and\/or virtual instruments, it may be necessary to increase the sample buffer size (thus increasing latency) to avoid audio problems. Fortunately, there\u2019s an alternative: TASCAM\u2019s US-2&#215;2 and US-4&#215;4 offer a \u201czero-latency monitoring\u201d function, where you can listen to an input signal <em>before<\/em> it goes into the computer (and therefore has no latency) rather than after.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p><strong>5. What\u2019s a \u201cdriver,\u201d and why should I care?<\/strong> A <em>driver<\/em> is a small program that oversees shuttling audio data between the computer and audio interface. Mac and Windows operating systems include general-purpose drivers; however, custom drivers can provide better latency and\/or additional features.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>Writing low-latency drivers is difficult, and some manufacturers employ other companies to write their drivers. TASCAM used to do this, however, starting with the US-2&#215;2 and US-4&#215;4 TASCAM is now creating custom drivers in-house. The result is improved performance that at least equals, and in many cases exceeds, other audio interfaces in the same price range. Always use a driver created by the manufacturer for a specific interface if one is available; general-purpose drivers like ASIO4ALL and MME on Windows should be a last resort.<span style=\"font-size: 13px;\">\u00a0<\/span><\/p>\n<p>Finally, note that as more guitar players turn to laptops for onstage amp and effects simulation, running amp sim software at 96 kHz to achieve 4.3 ms latency provides an essentially real-time \u201cfeel.\u201d Also, running amp sims at 96 kHz can often improve sound quality by reproducing harmonics more accurately.<\/p>\n<p>&nbsp;<\/p>\n<p><a title=\"SONAR X3 Free Trial\" href=\"http:\/\/www.cakewalk.com\/Products\/SONAR\/Web-Trial\" target=\"_blank\">Download the SONAR X3 Free Trial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get the lowdown on low latency, and what it means to you By Craig Anderton\u00a0 Recording with computers has brought incredible power to musicians at amazing prices. However, there are some compromises\u2014such as latency. Let\u2019s find out what causes it, how it affects you, and how to minimize it.\u00a0\u00a0 1. What is latency? When recording, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/noelborthwick.com\/cakewalk\/2014\/10\/28\/recording-latency\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Basics: Five Questions about Latency and Computer Recording&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,92,2251,1591,1654,1905,73,66,49,78,50,52,90,1,53,54],"tags":[212,2465,2466],"class_list":["post-19499","post","type-post","status-publish","format-standard","hentry","category-audio-analysis","category-daw-best-practices","category-dsp-101","category-guest-blogger","category-music-creator","category-music-creator-6-touch","category-music-production-tips","category-products","category-sonar","category-tips","category-sonar-x2","category-sonar-x3","category-tascam-news-2","category-uncategorized","category-windows-7","category-windows-8","tag-craig-anderton","tag-dsp-month","tag-latency"],"_links":{"self":[{"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/posts\/19499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/comments?post=19499"}],"version-history":[{"count":0,"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/posts\/19499\/revisions"}],"wp:attachment":[{"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/media?parent=19499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/categories?post=19499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/noelborthwick.com\/cakewalk\/wp-json\/wp\/v2\/tags?post=19499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}