[Ardour-Dev] how to precisely align the audio output of a Jack MIDI client in Ardour?
Markus Grabner
mg.2849 at w42.at
Fri Nov 10 12:16:48 PST 2017
Am Freitag, 10. November 2017, 16:36:07 CET schrieb Robin Gareus:
> On 11/10/2017 06:26 AM, Markus Grabner wrote:
> > Am Freitag, 10. November 2017, 05:56:00 CET schrieb Robin Gareus:
> >> Hi Markus,
> >>
> >> It looks like you're sending and receiving data in the same jack client.
> >>
> >> your client -> Ardour -> your client.
> >
> > No, it's actually
> >
> > Ardour (MIDI track) -> my client -> Ardour (audio track),
>
> Same thing.
> [...]
Thanks for the explanation!
> in case of
> no-input -> Hydrogen (MIDI in H2) -> LinuxSampler -> Ardour -> output
>
> it can work if you use jack-transport. The corresponding graph above can
> be executed in a single cycle, and all clients (H2, Ardour) share a
> common transport.
I tried with the following connection graph:
no input -> Hydrogen -> midipulse -> Ardour -> no output
i.e., the audio interface was completely disconnected, Hydrogen receives no
input, and Ardour produces no output. This gave the same results, i.e., it
makes no difference whether midipulse receives its MIDI input from Ardour or
Hydrogen.
However, when I switch to "Align With Existing Material" and set the audio
capture latency of the midipulse client to one period, the recorded pulses are
perfectly aligned.
Well, at least technically we found a solution, but it's not a practical one
since it would require to modify LinuxSampler (to report the capture latency)
and to disconnect all audio before recording the output of a MIDI client in an
audio track (and to reconnect after).
> 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 [1] or
> vice-versa that it doesn't delay signal "in the wire" for internal
> connections [2].
>
> [1] set the capture latency of the midipulse audio-port in the first
> example to include the split or [2] delay the midi signal by 1 cycle in
> the second example above. Either would yield the same result.
It seems that jack doesn't process MIDI and audio in the same cycle, even if
each client appears only once (no cyclic graph). How could this be fixed? Could
Ardour examine the connection graph, and if it finds a MIDI/audio transition,
add a latency of one period? What would you suggest?
Thanks & kind regards,
Markus
More information about the Ardour-Dev
mailing list