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

Markus Grabner mg.2849 at w42.at
Thu Nov 9 14:56:57 PST 2017


	Hi!

I recently made some effort to measure the latencies of my audio equipment to 
get perfectly aligned capturing and playback with Ardour (version 5.11), and 
so far it worked well. However, I failed at a task which I thought should be 
one of the easiest. I have a Jack client which takes MIDI input and produces 
audio output (actually LinuxSampler, but the same issue can be demonstrated 
with the attached minimal Jack client and Ardour session). When recording the 
audio output of the Jack MIDI client into an Ardour audio track, I noticed 
that the signal is delayed by one Jack period, regardless of the latency set 
by the client for its ports. When I change the alignment mode of the audio 
track to which I'm recording from "Automatic (Capture Time)" to "Align With 
Existing Material", the signal is recorded too early by (m-1)*n+o frames, 
where m is the number of periods, n the frame size, and o the output latency 
of the Jack server. Latency of the Jack MIDI client does have an effect now, 
but only shifts the signal even earlier in time.

To summarize:
*) In "Align With Capture Time" mode, the audio signal created by the Jack 
MIDI client is too late, and latency settings of the Jack MIDI client are 
ignored.
*) In "Align With Existing Material" mode, the audio signal created by the 
Jack MIDI client is too early, and can only be shifted to an even earlier time 
by setting the latency of the Jack MIDI client.

So what is the recommended way to get frame-accurate recordings of the audio 
output of a Jack MIDI client receiving input from an Ardour MIDI track (aside 
from manually nudging the recorded regions)?

	Thanks & kind regards,
		Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: midipulse.cpp
Type: text/x-c++src
Size: 1443 bytes
Desc: not available
URL: <http://lists.ardour.org/pipermail/ardour-dev-ardour.org/attachments/20171109/2bc193d3/attachment-0002.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: latency.ardour
Type: application/xml
Size: 61246 bytes
Desc: not available
URL: <http://lists.ardour.org/pipermail/ardour-dev-ardour.org/attachments/20171109/2bc193d3/attachment-0002.wsdl>


More information about the Ardour-Dev mailing list