by Opus Locus
Record offset in Logic
For all the claims of “sample accuracy”, earlier versions of Logic are not in general a very accurate solution for recording overdubs, and software-monitoring realtime audio input or realtime softsynth play will always involve some latency. If you care about the accuracy of your tools, you should at least be aware of the various latencies and misalignments that are occurring.
I'm concentrating on offset for realtime recording here. Playback-only latency induced by audio processing plugins is not within the scope of this discussion. Make some tea, settle in, this is not a short discussion…
Record offset
Record offset, for the purposes of this discussion, is simply the misplacement of recorded audio in the Arrange window, typically (but not for all hardware) a few samples late. Think of it like this: if a “perfect” musician is playing along exactly in time with a prerecorded track, the new recording should be placed in the Arrange window so it is also exactly in time with the prerecorded track. The “perfect” musician’s timing should not be altered on playback.
Similarly, you want to capture exactly what you heard, regardless of the musician’s timing (or lack of it). This extends to capturing the precise phase relationship of an outboard effect, synth, or even a cymbal overdub — a quite small Arrange misplacement of the recorded signal may make a noticeable difference to the phase relationships on playback compared with what you heard while monitoring. If you wonder why “it sounds different”, this might be at least part of the reason.
Unfortunately, Logic versions from 3.5 to 6.3.1 are not accurate in this respect. Recordings will generally be placed at the wrong point in the Arrange window, so the timing you heard while monitoring the recording at source is not exactly what you hear on playback. My old half-inch 8-track, vintage 1979, was considerably tighter than Logic for overdubbing.
Note that any dismissal of this problem via statements like “but the musicians are several feet (ie several ms) from each other (or the monitors, or the microphones, or whatever)” are a complete red herring — we want to record the timing exactly as the musicians played it, not with X samples of Logic-induced delay added or subtracted.
Measuring record offset
To measure the record offset for signals monitored at source (not signals software-monitored solely through Logic), proceed as follows.
- Find, record, or make a mono audio sample of a single click with a fast attack. Trim the sample so the waveform begins at the very start of the audio region. I use a trimmed sample of a drum machine clave.
- Place that audio sample on a mono Audio track in the Arrange exactly at bar 1, beat 1 (1 1 1 1). Use the “repeat objects” command to duplicate it exactly on every beat for a few bars. Make copies of the audio region, not aliases or loops.
- Pan the Audio track so the above click signal comes out a single output of your audio hardware. Ensure there are no plugins or delays of any kind in the signal path from click to output. Ensure the Arrange track does not have a delay parameter applied. Turn the Audio preference for “plugin delay compensation” off.
- Connect that audio output to an audio input — use a real audio cable, don’t do any tricky loopback stuff in your audio hardware control panel/mixer.
- Set the input of another mono Audio track to the looped-back input. Mute and record-enable the track. Re-record a few bars of the audio click.
- Open the re-recorded click in the Sample Editor. Scroll to a click somewhere after the first bar. Switch to bars/beats view and zoom in horizontally so you can see a beat mark and the start of an audio click at sample accuracy.
- Drag-select from the beat mark to the start of the audio click waveform. Watch the “Count” value in the info bar, note the number of samples from the beat mark to the start of the click. This is the Arrange record misplacement. Also note whether the click was early or late relative to the beat mark. Most hardware is late, but some hardware will be early.
- You may want to check a few other clicks and average the values if they are not the same from click to click.
OK, now you know your record offset. Next you should check it again at different audio buffer sizes. It might change. With my RME HDSP Multiface hardware, it did change at different buffer sizes in OS 9. In OS X, I find it’s a constant +128 (prior to Logic 6.3.2) or +64 samples (Logic 6.3.2), regardless of buffer size. Make a note of the record offset at all the buffer sizes you use.
Compensating for record offset
Logic 3.0.x and earlier in OS 9 (and Windows?) and Logic 6.3.2 and above in OS X includes a “Record Delay” parameter in Audio Hardware & Driver preferences. Set this to compensate for the record offset you measured above (ie a measured record offset of +128 samples will require a Record Delay setting of -128 samples). Measure again after setting this just to check you got it right.
For Logic versions from 3.5 to 6.3.1 in OS 9 (and Windows?) you can tweak the ASIO driver “IN” flipmenu, but note this is a coarse adjustment, in multiples of the driver buffer size, not in samples. So for example if your driver buffer size is 128 samples, a setting of “-2” will place recorded audio 256 samples earlier. Not ideal, but you might be able to get closer to the mark.
In Mac OS X, there is no user-settable adjustment available for Logic versions earlier than 6.3.2.
Using any form of “playback delay” to compensate after recording is not a good solution — the Arrange track playback delay is in ticks, which are once again not fine enough, and even worse they are tempo-dependent. Using a Sample Delay plugin is only useful if your recordings are placed early. Additionally, any such “on-the-fly” playback adjustment is problematic when doing close editing — what you are seeing is not where it actually plays if a playback delay of any kind is applied.
That just leaves the option of manually moving the recorded audio. The Arrange window is not sample-accurate, so the only obvious way to do this is by moving the anchor point in the Sample Editor. Proceed as follows…
To move an audio region by minus X samples:
- Open the audio region in the Sample Editor.
- Ensure the Sample Editor
Edit >> Update Arrange Positionmenu is unchecked. - Move the region anchor point (not the region start point) to the right by X samples.
- Close the Sample Editor.
To move an audio region by plus X samples:
- Open the audio region in the Sample Editor.
- Ensure the Sample Editor
Edit >> Update Arrange Positionmenu is checked. - Move the region anchor point (not the region start point) to the right by X samples.
- Uncheck the Sample Editor
Edit >> Update Arrange Positionmenu. - Move the region anchor point back where it was originally.
OK, that's fine for single regions, but it’s a tad mouse-intensive (I suffer from RSI), and it’s a royal pain in the arse if you regularly record multitrack takes. There is another method — if you can record at an arbitrary tempo, use this formula to get the correct tempo for a 1-tick nudge which equals the required shift in samples:
tempo = samplerate / (nudge x 16)
For my Multiface, which needs a post-record nudge of -128 samples in OS X, at 44.1kHz that's:
tempo = 44100 / (128 x 16)
tempo = 44100 / 2048
tempo = 21.5332 bpm
So at 21.5332 bpm, 1 tick = 128 samples. If I record at that tempo, then I can simply assign a key command to nudge -1 tick in the Arrange after recording. Multiples of that are probably a little more practical, ie record at 86.1328bpm and nudge -4 ticks. I have a list of the “magic” tempo multiples for my hardware in a marker in my Autoload.
If your tempo is already set to something else and you have existing stuff in the Arrange, all is not lost. Record, then:
- Select all (watch out for track-locked and hidden tracks)
- SMPTE-lock.
- Change the tempo to a multiple of the “magic” tempo you worked out.
- Select only the newly recorded audio.
- SMPTE-unlock.
- Nudge.
- SMPTE-lock.
- Change the tempo back to the original tempo.
- Select all.
- SMPTE-unlock.
If you have tempo-changes in the song, it's presumably the tempo at the region start that affects the nudge amount, so you'd just change that tempo while SMPTE-locked and leave the rest of the tempo-changes alone. I haven't tested this …
Not exactly ideal, but if you can do it it's a lot quicker than opening each region from a multitrack take individually and moving the anchor point with the mouse (owww my wrist!)...
A better suggestion
Logic 6.3.2 and higher provide a simple “record delay” driver parameter, in samples, which shifts the recorded audio +/- X samples automatically.
But even better, I'd like to see each individual Audio Input object have a “record delay” parameter that automatically adjusts recorded position as above, but only for that input. This would allow extremely flexible and professional record calibration for different inputs and/or different recording methods — analog vs digital inputs, different A/D converter hardware, effect send/return loops, source-monitored inputs vs software-monitored inputs, anything. The record delay should only be applied to the Arrange recording placement, it should not be applied to live monitoring of audio through the Audio Input object.
A simple, elegant, set-and-forget solution for perfect calibration of each input, and a marketing opportunity — “sample accurate recording for all inputs” … how about it, Apple?
John Pitcairn, Opus Locus — ©2002-2007. All rights reserved. Unathorized reproduction prohibited. This page is built using fairly simple, validated XHTML 1.0 and CSS 2. Best viewed on a standards-compliant browser (Safari, Firefox, Camino, etc). If your browser screws it up (cough, MS Internet Explorer), perhaps you should be bitching at your browser manufacturer about better support for web standards…