Maybe this is something noone cares about or maybe most have already figured out but I’ve written a logic/midi/hardware-sync guide. What do you think?
On the topic of syncing hardware synths and outboard drum machines/sequencers to Logic
I think I’ve found explanations to some problems I’ve been having and wanted to write it down. The text is rather long and a bit complicated. Before you read the whole thing, the best advice if you are having problems with latency/delays when recording outboard gear is simply:
–> set the IO-buffer to the lowest possible value and turn off any plugin that has “look ahead” for example logics limiter plugin.
This will make all the problems here underneath much smaller, and in most cases so small that you don’t have to care about them. If you for some reason are forced to record with a larger IO buffer than you will get into problems, and to solve those you have understand why they arise and how to solve them.
The process of recording outboard gear that I have thought of involves one of the following ways to sync:
The four cases
-
While recording, Logic plays back the project, the musician is playing a hardware synth via a keyboard or a pad, no midi clock is used. For now we will say that no midi notes are recorded in logic from this recording. This situation is just like putting vocals on a track since only audio is involved. This situation is usually handled by logic in a good way where the musician doesn’t have to use any special settings to make it work. Even if the IO buffer is set to a high value, the recording will still be in sync, at least to a very large extent.
-
Logic is playing back an external instrument track with midi information, the midi is sent from the midi-out on the sound interface to the midi-in on the hardware synth. The audio is sent from the synth back to the audio interface. This situation logic doesn’t handle in a good way by default. However, if you turn on automatic delay compensation on the track/midi-channel this will work well.
-
Logic is playing back audio and also sending a midi clock from the midi out, into the midi in on drum machine/sequencer. The audio from the sequencer is sent back to the sound interface. This situation is not handled very well by logic by default, and the fix is not as easy as pushing one button. The solution is to calibrate the midi clock latency in the sync section of the midi settings. You make a recording, observe how much early (it’s always early, never late) the beat of the audio is and set the “midi clock delay” to a value using trial and error. A good way to start is half the time distance between the beat and the audio when the midi clock delay is set to 0.
We also have a fourth case which does not involve recording any audio from an external source:
- Recording midi into logic. This is not handled very well on an external instrument track. However, if you record onto a software instrument track, the midi usually ends up in the right place. Not very intuitive.
The root of the problem
The root of the problem is that converting digital information to audio and back takes time, more time the larger the IO buffer is set. The midi sent/received from/to logic appears not to be affected by any delay that I’ve been able to measure. This has the following consequences in the four cases above.
Consequences
-
At time x a sound is played, it takes d1 milliseconds to convert the digital information to a sound, the sound arrives at time x + d1. The musician plays/sings for this examples plays right on the beat at time x + d1. That sound is converted back to logic, which takes d2. Maybe d1=d2, I don’t know. The sounds arrives back to logic at x + d1 + d2. Logic however has a pretty good idea the value of d1 and d2, therefore subtracts d1 +d2 from the sounds that arrives at x + d1 + d2, which yields x. All is well as long as you don’t turn off automatic delay compensation. You can test this by playing a track trough an output on your sound interface and connect that with a cable right back to an input. Make sure not to use software monitoring if you want to do this test, otherwise you will get a nasty feedback. If you record that on to a new track, you can compare the original sound wave form with the one that has traveled thru both the DA and the AD converters. They should aline pretty good. On my system, it was only off by 2 ms. If that’s not acceptable to you you can adjust the recording delay in logic at the audio settings. Try different settings till you get there. The offset is measured in number of samples. 44 100 samples is usually equal to 1 s.
-
If you don’t turn on the automatic delay compensation on the external instrument track, the midi notes will arrive at x, the hardware synth will play the note, the sound will be arrive to logic and recorded at time x + d2. Logic then uses its automatic recording delay compensation and again subtracts d1 + d2 from x +d2, which yields x - d1. The recording when played back is d1 ms too early. The solution is to turn on the automatic delay compensation on the external instruments track. This setting have to be made before the audio recording is made. Depending on how large value d1 is you can hear that it’s not sitting right while you are recording.
-
This is actually the same problem that was described in point two above. But since the midi signal is not a midi note, but rather a midi clock signal you can’t solve the problem the same way. You have to enter the logic midi settings -> midi sync and try entering a positive value to delay the midi clock. Try different values until you end up with a good result. In this situation it is practical to program a 4/4 beat on your sequencer, or a metronome sound and record that. This will make it easy to check for alignment with the grid in logic.
-
If we choose an external instrument track to record a few notes in to begin with. The sound from logic is played at time x, if the musician plays a note on an external keyboard right when she hears the sound (at x + d1), the midi is recorded at x+d1 in logic. If you look at the midi region the notes appeared to have been played at time x + d1, logic does not apply any delay compensation. EDIT: When I first posted this I thought that this problem was solved by instead of an external instrument track, use a software instrument track for recording midi. When I tried to do that the other day I didn’t manage to solve the latency issue. So at this time, this case 4 is unsolved actually.
In point four, the only way that I’ve come up with of measuring how much too late the midi is, is to record the audio of a hardware synth at the same time. We then have to trust that the audio is correct like in point one and then measure the distance between the midi and the audio waveform.
Conclusions
All in all, you can basically forget that these issues exists if you choose a low IO buffer value and turn off plugins with “look ahead”. I discovered this because I have an older computer where I choose a higher IO buffer value. I like to add a limiter to the master bus when I bounce out different versions, then maybe I’ll add a track forgetting to remove the limiter. The limiter have to be removed, just disable it doesn’t work in my experience. And since I some time like to record stuff and not quantise it, I became worried that the computer recorded the midi notes to late or to early, and when I recorded audio at the same time as midi, the audio and the midi didn’t line up. Then I didn’t know which timing to “trust”, and that led me to do a little research and think this through a little more extendedly.
Anyone read the whole thing and follows. Do you agree with what I’ve found?