Jump to content

MIDI in OSX is tighter than an Atari ST! (MIDI timestamping)


Jauqq

Recommended Posts

For quite some time across various forums far and wide there have been discussions about if a DAW and a USB interface can provide solid, tight MIDI timing. Having started off with an Atari ST, which was always considered the “Gold standard”, and then moving to Logic this was something that always interested me. However many of these forum discussions would be filled with misinformation given the lack of any hard evidence either way.

 

A few months ago a developer released a MIDI latency jitter utility, which allowed for automated analysis of MIDI bytes which had been recorded as audio. Of course this is only possible by way a MIDI lead which has been converted with an audio jack the other end. This software is here: http://expressiveelectronicsformusicians.com/midi_jitter.html

 

With the needed equipment I then set about to test my various sequencers and USB interfaces to see what exactly is going on, and if OSX MIDI timestamping was actually doing as intended, or just some marketing term..

 

I first tested the “Gold standard” Atari ST with Cubase V3, and to use these results as a benchmark. Taking a number of tests the MIDI jitter utility reported average note on jitter= 0.026ms RMS (max 0.18ms). It was clear why the Atari was always considered tight for MIDI as these results were fantastic.

 

I then moved on to my Edirol UM880 and Ableton Live 9. This resulted in average note on jitter = 0.02ms (max 0.15ms) with this excellent timing being correlated across all of the eight MIDI out ports. This was better timing than the Atari ST, and proved that USB having sloppy MIDI timing was an internet forum myth!!

 

OSX CoreMIDI timestamping actually worked.

 

However with the same UM880 USB interface and Logic X I got different results. Average note on jitter = 0.09ms (max 0.74ms). Using the MIDI jitter utility software its possible to display a waveform of how MIDI data jitters and possibly shifts over time. Most of the jitter peaks (0.74ms) in Logic X MIDI output occurs with data rushing ahead of time. (Logic X only sends MIDI timestamps using the external instrument plug-in - MIDI output from regular MIDI tracks goes through the environment, where it seems all events are treated as realtime and thus have no MIDI timestamping on the events when output to the interface)

 

The timing figures for both Logic X and Live 9 can only be down to OSX CoreMIDI timestamping feature, along with firmware within the UM880 which handles timestamps, and also with what each DAW is doing to perform sending timestamps. (an interface without MIDI timestamping firmware will behave as a plain vanilla USB interface without the tight timing, regardless of the DAW sending timestamps)

 

Using “MIDI Monitor” http://www.snoize.com/MIDIMonitor/ utility its possible to inspect and check the accuracy of the timestamp being sent. For Live 9 sending 8ths the difference in time between each MIDI events timestamp had a value of “125”. The same 8th note sequence in Logic X being displayed by “MIDI monitor” showed that interval between timestamps had a varying value… some would be 125, 126, 124, 123.

 

Is this difference in timestamps the cause of the difference, and better timing in Live 9 over Logic X?

 

What is the cause of the timing difference between the two?

 

Are timestamps in Live 9 more “accurate: than the ones in Logic X?

 

Given that OSX, CoreMIDI, and the UM880 drivers are the same, are the difference in the timing of MIDI timestamps down to the host DAW?

 

I doubt the Logic X developers are sitting around wiring MIDI leads to audio jacks and then recording their MIDI output. Hopefully these provided figures for Logic X's MIDI timestamping output can serve as a guide to them to hopefully improve Logic X MIDI timing!

  • Like 1
Link to comment
Share on other sites

Using the MIDI monitor utility its possible to inspect the exact timing of MIDI timestamps. In the preferences I've set the time format to show "Host time (nanoseconds)"

 

In both Abelton Live 9 and Logic X, Im testing a regular 8th note sequence, and then looking at the timestamps for both. In Live 9 the value in nanoseconds from a note on to a note off is a pretty regular 125,012,900 (there may be the odd 100 - 200 variance) and from a note off to the next note on, again a pretty regular value but this time its 124,990,100 (again with the odd 100 to 200 variance)

 

Heres a screen of the first bar of 8ths showing the Live 9 timestamps in the left hand column.

 

707551890_Live9MIDItimestamps.png.e9526f789783bed78030d8e01d442dc3.png

 

 

Now the same 8th note sequence in Logic X gives a much wider variance for the distance between a note on to the next note off 125,000,074, 125,060,202, 124,924,576 etc and from a note off to the next note on again wider variance 124,999,621, 124,937,051 etc.....

 

Here's a screen of the first bar of 8ths for Logic X.

 

1319918419_LogicXMIDItimestamps.png.1c442efb4f38b923ba0b3c7033cffe21.png

 

It seems that the MIDI timestamps in Live 9 are more "accurate" than the MIDI timestamps in Logic X.

 

This could be why Live 9 has average note on jitter = 0.02ms (max 0.15ms) while Logic X gives average note on jitter = 0.09ms (max 0.74ms).

Edited by Jauqq
Link to comment
Share on other sites

Using the MLA jitter software, from the MIDI data which has been recorded as audio, its possible to generate a "jitter wave" and this helps to show where exactly jitter is occurring throughout a sequence.

 

When the wave is above the centre line notes are "rushing" ahead of the average, and when below the centre line they dragging later than average.

 

Heres jitter waves for 6 tracks of Logic X MIDI timestamped output. Most of the peaks in each track are above the centre line, showing that when Logic X does jitter its MIDI output, that most of this jitter it is in fact rushing ahead of the average.

 

Bars are shown along the top

1974437319_LogicXexternalinstrumentjitterwaves.thumb.jpg.f81f143bea6a36c9379adb8a154643b9.jpg

Link to comment
Share on other sites

  • 3 months later...

Have just tested out the new version of Logic X 10.2.1.

The previous version of Logic X had average note on jitter 0.09ms (max 0.74ms) for its time stamped MIDI from the external instrument plug-in. This was good but not as good as the timing from Live 9 which was average note on jitter was 0.025ms (max 0.15ms).

 

Good news as the new version of Logic X 10.2.1 now has more or less the same tight timing as Live 9 when used with a USB MIDI interface supporting OSX time stamping such as the Edirol ones.

 

Logic X 10.2.1 , Edirol UM880, MacBook Pro 10.9.5

 

Note C4, 8ths @ 120bpm, 4 mins, 6 tests.

 

1) note on jitter 0.03ms RMS (max 0.3ms)

2) note on jitter 0.03ms RMS (max 0.24ms)

3) note on jitter 0.029ms RMS (max 0.34ms)

4) note on jitter 0.035ms RMS (max 0.32ms)

5) note on jitter 0.035ms RMS (max 0.37ms)

6) note on jitter 0.021ms RMS (max 0.18ms)

 

Average note on jitter 0.03ms (max 0.29)

 

Just to add that MLA utility showed that in one of the tests, 891 note on's were perfectly on time, with 30 note ons being slightly early, and 38 note ons being late causing the max jitter value.

 

This is across all of the 8 MIDI out ports.

 

USB MIDI can provide excellent tight timing, and also no need to search for an Atari ST..... :D

Edited by Jauqq
Link to comment
Share on other sites

Ah yes, that's dead. I remember switching to Logic specifically because of AMT back in the days.

 

I have also tested an Emagic AMT8 in both Logic 5 and 6 on a G4 Powerbook OS9.1.

 

I found note on jitter as being 0.15ms with a max of 0.43ms.....

 

BUT.......

 

I ran a test with eight MIDI tracks in Logic 6, each MIDI track sending 8ths @ 120bpm to each of the 8 AMT8 MIDI out ports. i.e. MIDI track 1 sending to MIDI port 1, MIDI track 2 sending to MIDI port 2, etc

 

I simultaneously tested MIDI ports 1 + 2, and put the recorded MIDI to audio files in to two audio tracks in Logic.

 

The MIDI note on waveform is both tracks did not line up, showing that there was increased latency from MIDI port 1 to MIDI port 2 (1ms) , so much so that the difference/latency between MIDI port 1 and 8 was around 4ms.

 

The 8 AMT8 MIDI out ports were not being address in a parallel fashion as Emagic claimed, but in a serial way causing latency from MIDI port to port.

 

This was some time ago and I no longer have the Emagic MIDI interface so unable to say how it performs with Logic X and OSX.

Link to comment
Share on other sites

  • 2 years later...

(Logic X only sends MIDI timestamps using the external instrument plug-in - MIDI output from regular MIDI tracks goes through the environment, where it seems all events are treated as realtime and thus have no MIDI timestamping on the events when output to the interface)

 

How did you determine this?

 

Also do you know whether Logic reads midi timestamps on incoming midi events from devices that support it? Based on your above explanation that the environment is filtering out midi timestamps...I'm kind of going to guess that Logic is losing incoming midi timestamps when you record midi tracks...its only handled realtime the best it can. Yes?

Link to comment
Share on other sites

(Logic X only sends MIDI timestamps using the external instrument plug-in - MIDI output from regular MIDI tracks goes through the environment, where it seems all events are treated as realtime and thus have no MIDI timestamping on the events when output to the interface)

 

How did you determine this?

 

 

I used Snoize MIDI Monitor to check this. When sending MIDI from a regular MIDI track no time stamps were displayed, but they were when I checked MIDI from the "external instrument" plug-in.

 

https://www.snoize.com/MIDIMonitor/

 

My second post in this thread shows MIDI monitors GUI showing the time stamps.

https://www.logicprohelp.com/viewtopic.php?f=1&t=120285&p=703982#p616765

 

When testing a normal MIDI track, the column just showed "0". ie no time stamps.

Edited by Jauqq
Link to comment
Share on other sites

Right thanks, I found your gearslutz thread. Do you know if both the legacy and current versions of the External Inst plugin send proper MTS?

 

I guess Logic doesn't recognize incoming MTS, which is a real bummer. I have submitted a feature request to Apple but I don't expect them to fix anything related to the environment.

Link to comment
Share on other sites

Right thanks, I found your gearslutz thread. Do you know if both the legacy and current versions of the External Inst plugin send proper MTS?

 

I guess Logic doesn't recognize incoming MTS, which is a real bummer. I have submitted a feature request to Apple but I don't expect them to fix anything related to the environment.

 

I have only tested the "external instrument" plug-in with all incremental versions of Logic X. (I'm unable say if the Logic 9, or previous versions of the external instrument plug-in sends time stamps.)

Link to comment
Share on other sites

Got you. You can access the legacy version of the external instrument plugin by holding down the option key while selecting the plugin menu, you will see a subfolder called "Legacy" and inside there is a legacy version of the external instrument plugin, even with up to date LPX. Just curious.
Link to comment
Share on other sites

Please forgive my ignorance on this, but I'm wondering if this MIDI Timestamping jitter issue could affect two machines slaved to each other using MIDI timecode.

 

I send audio from Logic to Pro Tools synched with MTC via my Network/Audio MIDI Setup, and I've noticed that the audio is never consistently printing in the same place. Even when printing the same audio from the same session, the audio region never prints consistently at the same timecode. Could this be why?

Link to comment
Share on other sites

MTS applies to events, not MTC. MTC by its very nature is loosy goosy. it sends a "pulse" so many times per beat, I think 24..and then the slave is supposed to adjust its speed in response. It is NOT sample accurate lock by any stretch of the imagination.

Thanks for your reply, Dewd.

So it's normal for audio to be recording inconsistently if synching with MTC?

Link to comment
Share on other sites

  • 5 years later...

so here's another question for @Jauqq.  Which current midi interfaces are known to be hardware compliant with MTS (or core midi) timestamping in the hardware (not in the software driver). ???

Presumably MOTU interfaces all do it?  I mean they are the ones that developed MTS to begin with, but I can't find any mention about it anymore from them so I don't really know if they still work that way or not.

Pretty much no midi interfaces that I can find really advertise as doing anything like this, and the vast majority say they are "class compliant" which I can only guess is not synchronizing the midi device hardware to timestamps at all.  More likely they are stamping events in core midi somewhere after receiving over USB.  Just a guess.  Ands visa versa for sending also.  But I don't really know, and I would really like to know.  Probably using MOTU would be the best bet at this point...

Also am curious how LogicPro would test now with latest version compared to the past, in particular I'm wondering whether Timestamps from a MOTU device end up recorded to LogicPro track if and when the track inspector is used to specify a specific midi intput device, rather then the normal old way all input midi would come through the environment before hitting the sequencer.

 

 

 

  • Like 1
Link to comment
Share on other sites

12 hours ago, Dewdman42 said:

Presumably MOTU interfaces all do it?  I mean they are the ones that developed MTS to begin with, but I can't find any mention about it anymore from them so I don't really know if they still work that way or not.

Correction, MOTU's website does mention MTS on the features page of their top end interface, the, XT, stating sub millisecond precision.  I "guess" that means it's doing it in the hardware.  The other express 128 doesn't mention MTS, but does mention sub millisecond timing..(shrug).

Well anyway, my gut feeling is that MOTU are the only interfaces today that are actually using the midi timestamps at the hardware level in the midi interface.  But really it's hard to get straight info about this.  it's also not clear to me 100% that even MOTU is still doing it.  because their interfaces have not compared well against the Roland in particular in recent years comparison testing.  

Part of me wonders if when MTS moved into CoreMidi, MOTU lost complete control over the process and CoreMidi itself is timestamping incoming midi and scheduling outgoing midi...basically ignoring the hardware capabilities.  Presumably midi stamps work with all USB class compliant drivers...at the coremidi layer......in software...not in the hardware itself.  So then it might be possible that even though MOTU interfaces are marketed as having MTS...still...they may be forced to go through Coremidi in some way...  and MOTU have have decided that its still basically sub millisecond even that way...which is probably good enough.    I don't know..just thinking out loud right now.  It's very hard to get a straight answer from MOTU about this, I have tried several times to ask them through support and gotten nothing more than whatever is printed on the website.

And certainly there are no other midi interfaces claiming to do anything like hardware level timestamping.  Sadly.

I would love to transition to network or even wifi based midi around my studio, but not without some form of MTS in the midi interface.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...