[Ardour-Dev] how to precisely align the audio output of a Jack MIDI client in Ardour?

Markus Grabner mg.2849 at w42.at
Sat Nov 18 14:02:13 PST 2017


Am Sonntag, 12. November 2017, 01:41:06 CET schrieb Robin Gareus:
> On 11/11/2017 11:21 PM, Markus Grabner wrote:
> IMHO, the only case where it would make sense for jackd to delay a
> signal is when summing to align physical (terminal) output ports in case
> of ambiguous playback port-latency.
The jack_lsync tool by Xavier Mendez can do just this (thanks for his hint on 
the Jack-devel mailing list, see https://github.com/jmendeth/jack-tools/tree/
latency-tools).

After fixing the latencies for the external hardware ports, I went on to 
reinvestigate the initial issue of misaligned output of LinuxSampler running 
as a Jack-MIDI client. However, the problem has magically disappeared as soon 
as jack_lsync is operating on the hardware ports, although the ports related 
to LinuxSampler were not even touched in any way. Lucky, but strange, maybe 
due to different internal processing order and/or cycle breaking?

> > Let me describe my setup in some more detail:
> > *) a Focusrite Saffire PRO 14 for microphone and line input and for
> > monitor and headphone output
> > *) a Line6 PODxt Live for guitar recording, guitar monitoring, effects
> > processing, and reamping
> 
> Is that a USB device?
Yes, but it's not USB audio compliant. I developed a custom driver for it, 
which is now included in the mainline Linux kernel (module snd_usb_line6).

> If so the systemic latency may be different every
> time you use the device
Zita-ajbridge does a good job synchronizing the streams. I just measured the 
deviation between the streams with the latencies measured a couple of weeks 
ago and found a residual error after compensation of 30 to 33 frames (ca. 
0.65ms). I have no idea whether this is optimal running a preemptive but non-
realtime kernel, but it is small enough that I don't really care.

> Do you patch the Line6 using an Ardour Port Insert?
No, but that's an interesting idea, though probably a huge amount of work 
since it would require to also include Zita-ajbridge or something similar in 
the insert.

> As for Ardour, the solution will be rather simple: Don't use JACK :)
I'm using the Jack transport mechanism to synchronize Ardour and Hydrogen, so 
unless there is an ALSA-equivalent of Jack transport (I'm not aware of any), 
this is not an option. And the last time I checked, the ALSA driver for the 
Focusrite device was crappy, but this might have changed in the meantime.

	Kind regards,
		Markus




More information about the Ardour-Dev mailing list