Latency Testing

I took a few hours yesterday to test specific latencies in the various rig setups I use. Looking to compare things like Analog vs. SPDIF, MIDI over DIN vs. USB, USB direct vs. through a Hub, etc. Also wanted to get real-world latency measures of A/D conversions in my interface (RME UCX II), my looper (and it’s own A/D conversions), and how my sound modules (XpressO and VL70-m) perform.

Cantabile made all this testing a breeze! Being able to creatively re-wire and then just switch port assignments let me pull off 16 test in about 4 hours. I did the latency testing by recording various audio and MIDI ports in Cantabile and comparing the waveforms and MIDI notes using Reaper.

One thought if you’re doing this: have a good initial wiring diagram (or a photo), and have your primary port assignments documented or backed up (using “multiple configurations”).

Some basic take-aways that might be of interest (details are given at the end):

  • I measured the cost of D/A and A/D conversions at 1.81 msec, which matches the specification provided by RME for the UCX II.

  • I measured latency on my 1996 Yamaha VL70-m with the Patchman Turbo chip at an astoundingly low 1.77 msec … I’m guessing because it is a physical modelling engine and not a sampler.

  • In contrast, my sample-based DynaSample XpressO with the latest firmware measured at 14.90 msec when taking MIDI input over USB and 22.97 msec for MIDI input over DIN (don’t know why the difference).

  • Output of the XpressO over SPDIF cost 0.56 msec vs. the 1.81 msec cost of an A/D conversion when output is done over unbalanced stereo.

  • My Boss RC-505 looper measured at 5.73 msec - I think because it is doing A/D and D/A. Tack on 1.81 msec (twice) if coming out of and back into Cantabile through the audio interface.

  • Two units I use for MIDI conversion are an M-Audio MIDISport 2x2 Anniversary Edition (USB MIDI <=> DIN MIDI) and a Sevilla Soft MIDI USB-USB device (which negotiates between two USB-A interfaces). When going through a USB Hub at both ends, all of these measured at right around 2 msec, with one exception: running the Sevilla Soft MIDI USB-USB between two separate USB connectors on my laptop (i.e. without going through a hub) measured at 3 msec. I suspect there is something about using two different USB interfaces on my laptop, but I’m dim on the details.

  • Using an analog mixer - a little Mackie Mix5, which is my late-stage output mixer - produced a barely detectable latency of 0.05 msec.

All this was done at a 44.1 kHz sample rate, with a 48 sample buffer size (plus a 32-sample internal buffer in the RME UCX II). When I increased the buffer to 1024 samples, and overall latency of my rig went from 36 to 149 msec. This is almost exactly accounted for by the 5 DA conversion in that signal path (plus an additional 1% cost I cannot account for).

I also did some measurements of the time from “initiation” (e.g. a key press) to the appearance of MIDI in Cantabile. While these are less precise due to the problems of measuring “initiation”, I found them generally interesting.

These were done using an external mic into Cantabile to capture exactly when I start and complete the (for example) key press.

  • Initiating a key press on my Arturia MINILAB mkII to MIDI was 0.79 msec when the Arturia with direct USB into my laptop, and 0.90 msec when going through a hub. This was tricky, since the Arturia generates MIDI when the key is pressed about 70% of the way down.

  • Hitting a drum pad on the Akai MPD-218 generates MIDI very early in the pad-stroke - about 10% of the way down (I modified this device using tape for faster action, as described by Robert Mathijs here: https://www.youtube.com/watch?v=Y9LkGODzQck). This device took 6.94 msec to generate MIDI.

  • I attempted to measure the time from the initiation of a sharp breath input to my Aodyo Sylphyo electronic wind instrument to the production of MIDI. Of course the air has to go through the mouthpiece, into the inner chamber, hit the breath sensor, go out the Sylphyo on a radio link to the external Link box, and get turned into MIDI over USB, through a hub, and into Cantabile. I measured this at 30.32 msec.

I could not find any references that measured latency in physical instruments, but I suspect it is largely based on technique - an experienced sax player does not initiate sound by ramping up their breath - they have initial breath pressure in their mouth chamber and damp the reed with their tongue, then initiate the note by releasing their tongue (see https://www.saxontheweb.net/threads/getting-the-reed-to-vibrate.7885/)

Some Details: Testing was done 11/24/2021.
The host is an Intel Core i7-6600U Toshiba 2016 laptop, Win10x64, RME UCX II interface.
All testing done at 44.1 kHz sample rate, with a 48 sample buffer size. Note that there is an additional 32 sample buffer internally in the UCX II.
The Hub is an Atolla 7-port powered hub.
The XpressO firmware is v2.0.00rc14.5 (8/16/2021).

See also the Hands on Latency post by @FantomXR at Hands on Latency.

Hope this is of interest to some!

2 Likes

Fascinating read Clint! Thanks for the contribution!

Cheers,

Dave

One big reason I’m doing all this is a potential move from a “Waterfall” type of rig to a “Cyclic” rig design (my terms).

My current rig I call a Waterfall design:

The computer with Cantabile acts alongside other hardware units to produce one of the sound sources. MIDI control is done by a mix of routing in Cantabile and direct hardware input using Thru MIDI ports on sound modules.

The software sound source from the computer and the hardware sound sources get mixed in a substantial line mixer (Samson SM10) and then post-processed (FX) by “downstream” hardware. This mixed source is fed to a master looper.

The looper is followed by a small output mixer which handles final volume control, monitoring (phones), mixing in of a some backing tracks. The output mixer also provides a feed for recording the final mix, which can be done back in Cantabile.

Pros: lower latency (less A/D & D/A conversions)

Cons: More gear, lack of control of the MIDI going to the sound modules, lack of software post-processing of sound modules.

I’m experimenting with a Cyclic design:

This design places Cantabile more in the center of the signal flow, giving it control of all MIDI and audio signals as well as more control over FX processing. These rig designs call for an audio interface
with more ports, but can require less outboard hardware.

Audio from hardware sound modules feed back into Cantabile for FX processing and mixing. The looper(s) are fed audio from Cantabile, which then feed their output back into Cantabile for (optionally) additional processing.

Recording is done internally by Cantabile (or on the audio interface itself, as can be done by the RME UCX II) and the final mix comes from the audio interface.

The final mix can be more complex, with front and rear speaker pairs.

Pros: Less gear, more of control of the MIDI going to the sound modules, option for software post-processing of sound modules.

Cons: higher latency (many more A/D and D/A conversions), more complex audio interface.

Of course, there are Hybrid designs … but that’s for another day …

Hope this is useful to someone … it was useful for me to write it all down and get my thoughts straight.

1 Like