Talk:Overdubbing using your computer's on-board sound card

=Archiving Koz' latency section on the Talk page= Removed in favor of the Latency Test page in the manual.

Setting the Recording Latency

 * To achieve lower latency software playthrough on Windows you can:
 * (Only gives somewhat lower latency): On Windows Vista and 7, right-click over the Speaker icon by the clock, choose Recording Devices, right-click over the input, choose Properties then on the "Listen" tab, enable "Listen to this device".
 * (Advanced) Compile Audacity with ASIO® true low latency support. Ask on the Compiling Audacity board of the Forum if you need help.

Click "Home" then click "Record" and you will get a new recording underneath the first one. Sing or perform in time to the first track; when finished click on "Stop" then "Home".

The show will have two tracks, one from each performance, but it may be seriously out of time or rhythm -- even though you were in perfect time when you recorded it. This is recording latency and you can adjust it to zero using Audacity's latency tools; done properly, both the live recording session and the later playback will be in perfect time.


 * Choose click "Don't Save".


 * Choose.


 * Choose click "OK".


 * Audacity Preferences > Recording set "Latency Correction" to [ 0 ] milliseconds, click "OK".


 * Play the new track and set Audacity's volume to loud but not painful.


 * Take off your earphones; place one of the headphones or earbuds against the built-in microphone.
 * [[File:EarbudMacBookProMic.jpg]]


 * Click "Record". Track one's click track is now being recorded -- badly -- on track two through the headphone and microphone -- good fidelity here is irrelevant.


 * Do this for five or ten seconds and click "Stop".


 * Select the new track and choose Effect > Amplify... (accepting the defaults) click "OK".


 * Put your headphones back on.


 * Click "Play", both tracks will probably play out of step.


 * Magnify the Timeline around one of the pair of clicks (drag-select and CTRL+E or CMD+E ).


 * Drag-Select the distance between the start of the click on the top track and the start of the same click on the bottom track.
 * [[image:LatencyMonoMac.png‎|Audacity Project with latency - Mac OS X screen shot]]
 * That's how much the rhythm misses and that's the latency. Keep magnifying until you can get a good shot at accuracy. CTRL+3 or CMD+3 to back out slightly if you magnify too much by accident.


 * At the bottom of the Audacity window in the Selection Toolbar set the middle time control to "Length" (one of the two radio buttons) then change the format using the dropdown menu to:
 * hh:mm:ss: + milliseconds
 * You're mostly interested in the milliseconds -- the last numbers on the right. The reading in the example above is 209msec.


 * Audacity Preferences > Recording... set Latency Correction to [-209] milliseconds then click "OK".


 * Close the bottom track ([X] to delete in the top left corner of the track); put the headphone over the microphone grill again and click "Record".
 * This time the two click tracks should look perfectly aligned (or very close to it) and sound perfectly in time. If not, zoom in, measure the new difference and add that number to the latency value.
 * [[image:NoLatencyMonoMac.png‎|Audacity Project with no latency - Mac OS X screen shot]]
 * In this example, the tracks align to within 23 samples, which is about 0.5 milliseconds - less than the smallest correction you can make in the Latency Correction. This is as good as it gets.

Before you get too obsessive about this, an orchestral musician once told me that the chances of any two instruments in the orchestra starting the same note at the same time is zero, so you don't need to adjust things down to the digital sample level. The latency values on home computers can wander in normal use.