[LAD] Realtime MIDI programming?

Pedro Lopez-Cabanillas pedro.lopez.cabanillas at gmail.com
Sun Oct 4 16:43:18 UTC 2009

On Saturday, October 3, 2009, Albert Graef wrote:
> Harry Van Haaren wrote:
> > And I'd advise you to start with "normal" scheduling (I've never coded
> > an RT app, but MIDI apps works
> > 100% realtime for me without any upgrading of priority).
> That may work if you have enough spare cpu power, but otherwise you may
> get a lot of jitter which really hurts with fast pieces (lots of MIDI
> messages at a fast tempo).
> It's really not that hard to get realtime scheduling priorities on
> recent Linux systems. I wouldn't want to run any computer music
> application without that. But maybe RtMidi already does that behind the
> scenes?

No. And I don't feel it is needed at all, at least for VMPK (it is my only 
program using RtMIDI at this moment).

If you are using Linux, the ALSA sequencer's MIDI routing and I/O is done in 
kernel, which is usually good enough for realtime MIDI applications.  

Answering to Carlo: RtMIDI is good if your goal is multiplatform (Linux, Win 
and Mac) and your needs are basic. If your target is Linux only, I prefer to 
work with the ALSA sequencer directly, using my wrapper for C++ and Qt4 


More information about the Linux-audio-dev mailing list