[Ardour-Users] A3 MIDI latency adjustment technique/advice

Robin Gareus robin at gareus.org
Thu Nov 14 08:54:55 PST 2013

On 11/14/2013 04:28 PM, Ralf Mardorf wrote:

> MIDI can be perfectly in unison with recordings. I never had issues
> regarding to jitter when using a C64 or Atari ST.

..or any other hardware that has dedicated hardware support.

> PC MIDI is a wicked thing 

Amen to that.

> and not related to the OS. Assumed there where no issues with my
> RME card, IOW if I could use low latencies, than MIDI would be ok on my
> machine, 

Only if said card uses the same interface and IRQ for both audio+midi,
transmits them synchronously and the driver for the hardware allows to
read/write them in sync.

yes, PC MIDI is indeed a wicked thing -- and PCs here include actually
all complex system with buses and 'plug & play'.

It's not impossible but requires diligent design and selection of *all*
components involved in the chain.
This was much easier in the C64 or Atari days. To some extend Apple is
doing similar work: they do like to be in control of the hardware for
most of the OSX systems and don't allow the user to screw things up.

Plugging some random interface on a bus in some random main-board using
some random CPU with a random OS will never guarantee any timing
requirements. It's a actually quite surprising how well Linux fares with
most generic hardware combinations on the milliseconds scale.

> USB-MIDI is completely unusable.

nope. While the USB bus itself is far from ideal, it's mainly the vast
majority of prosumer USB audio+midi devices out there that are unusable.

> To avoid or at least reduce MIDI jitter don't use Jack1, but Jack2 with
> the -Xalsarawmidi switch.

jack1 has seen recent updates WRT to that, according to measurements
done by Paul and Chris with jack1-git (still unreleased) it now performs
better (lower latency, less jitter) than a2jmidid and/or jack2:

(jack1 -X alsa_midi running at 64 frames/period, HDSP)

compare to measurements I did with jack2, a2jmidid, 1818VSL USB2

Though it's a apples vs oranges: different HW, different devices,..
AFAIK nobody has yet done jack1,jack2,a2midid comparisons using the same
hardware. So it's impossible to draw comparative conclusion. yet above
measurements at least show that all implementations of jack midi are
more or less on par.

Note that jack-midi (compared to raw ALSA) implies a lower bound on the
total rountrip latency. It is at least one jack period.

> Enable HR Timer for the sequencer.

To be specific: the snd_hrtimer kernel module


More information about the Ardour-Users mailing list