How I fixed my midi jitter problems

- ask away
Post Reply
thom
mnml maxi
mnml maxi
Posts: 1112
Joined: Sat Mar 25, 2006 10:14 am
Location: Montreal

How I fixed my midi jitter problems

Post by thom »

I use an oldish dual core PC and windows 7. I was never able to get reliably tight midi clocks sent through whatever usb midi-equipped device (either some audio interface or dedicated midi interface). I would regularily also get random ...effin jerkage and unreliable performance recording. Extremely frustrating. No matter what os I'm on. It's been a long lasting pain in the ass i've had to endure till a few months ago when I read this (http://forums.planetz.com/viewtopic.php ... 2&start=20) :
Midi issues in modern PC's is mostly down to all the multitasking that modern operating systems takes on. Processor busies itself doing other things from time to time. Not like single-tasking operating systems like the ST and Win 3.1 - processor interrupts were, well, uninterrupted!

USB too has an inherent latency (handshake is part of the protocol), but unless it's a poor or defective USB host board, that handshake should occur in constant time, and not introduce significant jitter deviation.
EDIT: I guess that when multiple USB devices have equal priority on the USB Host interface, then this could indeed be a source of a blocking wait for the single-threaded handshake negotiated by the host and the device.

The USB<-> Midi hardware too has an effect. Some Midi chips are better than others, so USB Midi Interfaces perform better than others.

And last but not least, the synths that respond to midi, some have underpowered Midi interfaces that can cause lag and constriction. Soft-Thru ports too have a cumulative latency effect in a midi device chain...

So, lots of factors. I'm no expert in the area, but all of the above cause entropy that is impossible to control.
I do wonder how Audio-rate sample clocks driving our A/D and D/A converters don't appear to suffer the same fate? Like, the Silentway plugin suite, with Midi over Audio, has no such jitter problem. Even USB Audio devices can serve wordclock, and serve stable clock for SPDIF and ADAT slaves. So, you do have to wonder, what priority is given to Midi clock threads in the OS?
EDIT: if Midi timing from an ITB clock sending to ITB softsynths displayed jitter characteristics, then either the DAW's own implementation of a Midi Clock thread, the VST Interface from the DAW to the VSTi, or the VSTi itself, could be the jitter source - typically the Audio threads can take priority I guess, interrupting the steady beat of the thread, hopefully never the GUI threads or the external interface threads.

Here's a little device that I believe could take the place of a stable clock, which the DAW could sync to over a Scope Midi In. From the excellent Mutable Instruments, it's a clock and sooo much more!:
http://mutable-instruments.net/midipal

Impressive specs.
Unlike other Mutable products, Olivier offers pre-assembled units too.

Anyone any experience with this?

So I thought "Ok. Lesson: USB=Possibly the culprit. Do I have a pci audio card with midi?" So I dove into my computer junk box and pulled out an old soundblaster audigiy I salvaged from the found computer I use for online stuff. I quickly found drivers some people made for that card under win7 64 there http://kxproject.com/down.php?language=en

The test proves it. (the test being playing back midi notes through the out port and feeding right back in the input, recording that midi, zooming in and comparing the source sequence vs the recorded sequence)

sh!t is tight. Clocks are rock solid. Happy camper here. I DO use a single midi output from my sequencer to sequence all the hardware, btw. I just dispatch that signal through an old MOTU midi timepiece.

I figured I should share. Hope it helps if you're struggling with such a problem.
Post Reply