Page 1 of 1

USB Midi timing in the real world

Posted: Tue Jan 27, 2009 6:08 pm
by Altitude
I posted this in a thread on GS regarding how USB midi timing behaves in the real world (meaning including the DAW software) and thought it may be of interest to people here. Basically, the discussion was about how midi timing benchmarking tools (i.e. Miditest) compare to the interface's performance inside the app. To run the tests, I used a MBHP Core module with the Midibenchmark software on a microchip PIC18F542 8 bit micro controller which is pretty decent platform for this sort of testing with a very small latency (20 nS) when looped back to itself. The uC sends a constant stream of midi messages out of the midi out and times how much time it takes for them to come back. For the actual tests, I would route the midi in to the midi out in the software so the result will be the sum of the overhead of the program + the performance of the interface itself.



About the Core Module/Midibenchmark (from the readme):

A MIDI controller event will be sent and should be received "immediately"
is measured with timer3, prescaler 1:8 - this means, that the counter
result has to be multiplied by 8 and 100 nS (@40 MHz) to get the
absolute delay

Note that the delay is always greater than 960 uS, since this is the
initial transfer time of a controller event

The current, minimal and maximum result will be print on LCD
To determine the jitter, calculate: (max-min) / 2


Hardware setup is same cables, same USB port. Software is Midiox, Cubase SX, and Sonar 8.0.2 trial I Dl'd as an alternate package. The Core RAW test is a simple loopback into the Core Module and shows the latency of uC (20 nS) + the length of the midi msg being sent (960 nS)

My machine: Q6600 on Gigabyte GA965-DS3 Rev 1, 3 gigs Corsair TWINX LL ram, Vista32

Pic of the setup:

Image


Results:

Image

The midex had the most options for testing so I ran all possible configurations (TS= Timestamp on, DS= Directsound) as well as one channel as the midi loop with the remaining 7 channels outputting a constant stream of 16th notes at the same time from 7 midi tracks.

If anyone can give me a reason why it is so bad on Sonar and how to fix it i'll re run the tests

Re: USB Midi timing in the real world

Posted: Wed Jan 28, 2009 1:43 am
by Mr Knesh
Would you be able to put put ableton to the test as well?
You can download a demo of that software as well that I believe you can run the same tests on.

I want to buy a new computer because of the fact that I am getting odd aliases and soft pops every once in a while with ableton. I recorded a track not too long ago, with a patch that was super punchy coming straight out of my V-synth, then when I recorded the audio, it all of a sudden was triggering late. I have done some tests myself and have begun to suspect a new comp would do the trick.

Re: USB Midi timing in the real world

Posted: Wed Jan 28, 2009 2:09 am
by Zamise
Lots of USB latency I had thought was in the software driver, bad programing, and not always in the hardware or app being used. Intresting to see the actual application makes a difrence too, wonder if you'd get dif results for dif apps if you used dif hardware and software drivers for it, or if certain apps would remain consistantly good or bad over a range of platforms. Whats the thing your using to test the speed? You made it out of an MBHP Core module thingy? Pretty cool little dealy bob.

Re: USB Midi timing in the real world

Posted: Wed Jan 28, 2009 2:53 am
by Altitude
in lieu of the results, I definitely plan on testing whatever software i can demo so Live, Tracktion, and Reaper are on deck next. The GM5 5x5 boards are in fab right now in Germany so I hope to be able to get more data with those especially since the 1x1 I am using now is giving me consistently good numbers so I am excited to see what they will do with 5 outs running at once. I'll also try the class compliant windows drivers to compare performance there.

The Sonar results are pretty curious though so I am wondering if I have some configuration issues.

The device I use for testing is simply a midibox Core module running MIOS and the Midibenchmark app: http://www.avishowtech.com/mbhp/mbhp_coreR4d.html

There are a bunch of different utilities that you can run on MIOS and this one is as simple as it gets since it does not require any digital input or output beyond the display

http://ucapps.de/mios_download.html

Re: USB Midi timing in the real world

Posted: Wed Jan 28, 2009 3:59 pm
by StepLogik
Pretty interesting stuff. I'm using FLStudio with a MOTU Midi Express XT. Its not bad, but FLStudio can't put out a consistent MIDI clock for s**t. Any time I sync external delays to the computer's midi clock, they go apeshit constantly recalculating the delay from the slightly shifting BPM.

I think a very interesting test would be to see how stable of a midi clock a computer can produce versus a hardware device.

Re: USB Midi timing in the real world

Posted: Thu Jan 29, 2009 3:37 am
by rokuez
is there anyway you could compare these figures to an atari running notator?

I've always heard/read that the atari had the best midi timing but would love to know / see a test that quantitatively proves this or dis-proves this