Latency with SL and JackOSX

Problems getting SL up and running on a Mac? Post here.

Moderator: jesse

Post Reply
Posts: 9
Joined: Thu Apr 02, 2009 10:23 pm

Latency with SL and JackOSX

Post by EasyMac »

So, I'm running audio in from my Apogee Duet (a two-input, two output DAC) through JackOSX to different loops of SL, with even-numbered loops getting individual input from the first input of the Duet, and odd-numbered loops getting input from the second input of the Duet. I'm not using common/main input for anything The outputs of these loops get fed back through Jack individually (I'm not using common/main out either) to corresponding virtual inputs of Logic for effects processing. These get mixed down in Logic to a stereo pair of outputs that get fed back through Jack to the Duet.

It's pretty simple, but here's a basic diagram, if necessary:

[Duet Input 1] -> [SL 0 in], [SL 2 in], [SL 4 in], ...
[Duet Input 2] -> [SL 1 in], [SL 3 in], [SL 5 in], ...

[SL 0 out], [SL 2 out], [SL 4 out], ... -> [Logic 0 in], [Logic 2 in], [Logic 4 in], ...
[SL 1 out], [SL 3 out], [SL 5 out], ... -> [Logic 1 in], [Logic 3 in], [Logic 5 in], ...

[Logic Stereo Out] -> [Duet Output 1] / [Duet Output 2]

So, when I record a second loop on top of an original loop, the second recorded loop is always slightly late relative to the first loop.
Now, I know this is a latency issue, but I'm not sure about the best way to get around it.

When I run input and output from my Duet through Logic alone (not through Jack or SL), I have to keep the buffer at at least 128 samples in order to prevent all audio dropouts. Now. JackOSX has a buffer setting as well, and I'm not sure how to handle having both buffers. Now, for loop's audio path, it must path through Jack three times before it gets from Duet input to output. Does this mean that the total latency of my audio is three times the buffer length I set in Jack's settings (plus Logic's buffer length), so that if I set Logic and Jack to 128 samples, my total latency is actually 512? This line of thinking makes sense to me, but it raises perceptible problems and another question:

Can I lower the buffer length to 32 for both Logic and Jack so that the total latency is 128 samples and still keep the same "safety" from audio dropouts that I had with a 128 buffer in Logic, or will this make my signal four times more prone to drop out?

Also, I've noticed SL has some "latency compensation" controls,which sounds like it might be a solution or aid, but I don't really understand them. Should I have SL automatically manage the values for me like it wants to? Will raising either of these values from zero help my latency problems or only make them worse?

Posts: 535
Joined: Sat Sep 06, 2008 9:46 am

Re: Latency with SL and JackOSX

Post by jesse »

The short answer to your question is, yes, SL's latency compensation features should allow you to work around the issues assuming you aren't concerned with monitoring your live input via software too. Since you appear to be applying effects after SL, I assume you are monitoring via hardware? The reason I ask, is that you don't need ridiculously low (dropout risky) buffer sizes unless you are. SL can compensate for the latency, but the auto setting may not give you the right answer, but it will be a good starting place. If you *are* monitoring through software and you do need tiny buffers, you should still be able to play with SL's compensation to fix the issue.

If overdubs seem late, it means that you need to increase the Output Latency in SL manually. Experiment, you should be able to go too far in one direction enough that it is noticable, then back it down until it feels right.

Post Reply