[Ardour-Dev] how to precisely align the audio output of a Jack MIDI client in Ardour?
robin at gareus.org
Sat Nov 11 16:41:06 PST 2017
On 11/11/2017 11:21 PM, Markus Grabner wrote:
> Am Freitag, 10. November 2017, 16:36:07 CET schrieb Robin Gareus:
>> c'est la vie. It's arguably a bug or design mistake that jack does not
>> set port-latencies when it splits the graph to include the split  or
>> vice-versa that it doesn't delay signal "in the wire" for internal
>> connections .
> I agree that it's a bug, but I don't see anything in the design of jack which
> would prevent fixing this, although I believe only option  (internal delays)
> could be a generic solution for arbitrarily complex connection graphs.
Jack's design goal is to only provide mechanisms (not policy), so (2) is
out. Also either change would break semantics of the existing API.
Jack users have lived with this issue for over a decade: A circular
dependency between clients will split the process graph. Changing jack's
behavior now will be rather tricky. It would require a major version
bump, ideally also intentionally breaking the API because the behavior
will be different compared to jack1, 2.
... or you may want to contribute to pipewire.org instead.
Personally I'm not in favor of adding delay-lines to jack, mostly
because jack can't know what is the correct way to handle dynamic
latency changes, nor can it handle ambiguous latencies.
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.
[A] output: here, playback to hardware; from a jack-client's POV they're
Anyway, this would indeed be rather something for jack-devel.
As side-note: the idea to add support for "delay in the wire" in
Ardour's backends (and drop JACK support) has been on the table a while
> 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? If so the systemic latency may be different every
time you use the device (That's why Ardour's ALSA backend allows to
measure and set systemic latencies without engine restart).
> *) Zita-ajbridge for conversion between the Focusrite sampling rate (I choose
> 48000Hz) and the weird hard-coded sampling rate of the Line6 device
Do you patch the Line6 using an Ardour Port Insert?
That allows to measure and set dedicated latencies for the insert-path.
> What can we do about this?
As for Ardour, the solution will be rather simple: Don't use JACK :)
Multiple devices are planned (there's a working prototype for Ardour's
ALSA backend but no GUI to configure it yet. It's currently accessible
via the ALSAEXT env variable) on OSX it's already possible, thanks to
Also instead of external apps, prefer plugins. That also saves a context
switch, cannot lead to process-graph-splitting and the plugin's state is
saved with the session.
More information about the Ardour-Dev