MIDI latency measurement?

In first place, I would like to thanks all the developers for the awesome release of A4.
My question is about a new feature listed in the “What’s new” page of Ardour website which is called “MIDI latency measurement”. I’m not able to find the way to perform such measurement, plus I’m not sure what is the concrete purpose of this new feature. Is it to compensate the MIDI recording delay? Please can someone clarify what is this for and how to use it? Thanks in advance.

It’s only available for the ALSA backend. (JACK cannot do this, Coreaudio directly provides the numbers).

If you chose ALSA as engine in the Audio/Midi setup, the button “Midi devices” will become active where you can configure and measure latency (it requires a midi-cable to close the loop).

The main purpose is to get accurate alignment of MTC, Midi-clock. It’s also useful to precisely align midi event with incoming or outgoing audio.

If you measure midi latency with Alsa, and then switch to jack does the latency measurement still apply? Actually, in my case I have the additional issue of using a firewire device with ffado so that my midi connection is done directly with jack, so midi latency measurement would be impossible. However, I know that some recent kernels also can support firewire with alsa though I’ve never tried it. (In general I’d prefer to use ffado with firewire since I prefer the midi going directly to jack).

@Edward, no. Currently no version of JACK allows to set systemic midi-latency (for audio jackd has -i/-o options to set additional latency).

When using jackd, ardour uses what JACK reports (run jack_lsp -l to port query latency).
Alike jack_delay (aka jack_iodelay), the tool to measure midi latency is available as standalone jack client: https://github.com/x42/jack_midi_latency

I tried to patch jack2 first, but various implementation issues make it very hard to add support for it. That actually motivated me to write Ardour’s ALSA backend in the first place.

PS. The kernel firewire/ALSA support is coming along nicely and already works very well from what I hear.

PPS. firewire is ISO-synchroneous. Audio+MIDI are always in sync on the transport-layer.

It depends what the real hardware is doing, but in most cases MIDI has exactly the same latency as audio. That’s one of the great benefits of using a firewire device.

I don’t know what the ffado jack backend does, it may set the midi-port latency correctly.

Thanks, now I understand that feature, however I would like to get some recommendation about midi recording best practices. When I record audio, I’m used to use a large buffer setting (1024 samples) and hardware monitoring through my mixing desk. Due the great latency compensation of Ardour I obtain time accurate takes with reduced CPU usage and a reliable recording platform (I’m capable of recording up to 24 tracks at once monitoring around 50 pre-recorded tracks without any xrun in a full-day session). But when I try to apply the same approach to midi recording, for example recording a musician who is playing midi keyboard, the latency compensation doesn’t work at all and in fact midi notes appears delayed by the amount of latency (using jack).

I know that most people is trying to get really low latency all the time, but I don’t believe in such thing if you can go with hardware monitoring, in my opinion latency must be compensated. So, what is the right MIDI recording method to achieve an accurate latency compensation in ardour?
Thanks again for your support