The OS/2 Real-Time MIDI Subsystem

Now hosted by Finnegan Software, Inc. - since March 15, 2007

Finnegan Software - return to home page

All references to "me, myself, and I" are those of the original author, Timur Tabi, except where noted (and at the moment, there are no notes... :)  )

Last Updated: November 19, 1999


The OS/2 Real-Time MIDI Subsystem, or RTMIDI, provides support for sending and receiving MIDI messages and processing them in real-time. For more information on OS/2 Warp, check out my new user page on the OS/2 Supersite.

Why does OS/2 need RTMIDI?

OS/2 is a protected, non real-time operating system. This means that applications don't have direct hardware access, nor are they real-time. Applications run in what is called "user space" or "application space". Device drivers, which run in "kernel space", do have access to the hardware and are real-time (to an extent).

The advantage of this is that applications can't hurt the rest of the system. If an application crashes, nothing else will be affected. This is what the trademark "Crash Protection" means. The drawback is that in order to do any real-time processing, a device driver is required.

Windows 3.1 is not a protected OS. Applications can do real-time processing, but they can also take down the entire computer if they crash. Windows 95, when running only true 32-bit Windows 95 applications (and there are a lot more OS/2 applications then there are true Windows 95 applications) is also protected. However, 16-bit Windows 3.1 apps can still take down Windows 95.

Therefore, OS/2 applications cannot process MIDI data effectively. This is the main reason why there haven't been any real OS/2 MIDI applications to date. And this is where RTMIDI comes in.

So you say, "Well, I'll just use a 32-bit Windows MIDI application." Good luck. Such appliations have incredibly bad latency problems. Even without RTMIDI, OS/2 is nowhere near as bad as Windows. Don't believe me? Check out this article from Microsoft on "Overcoming Timer-Latency Problems in MIDI Sequencers" (you may need to register with MSDN before you can view it).  So what's their solution? Put all your timing-sensitive code into a 16-bit DLL. In other words, Microsoft has not solved the problem, and there is no indication that they will. So if you want a true 32-bit real-time MIDI solution, OS/2 Warp 4 is a better choice than Windows.

How does RTMIDI work?

The core of RTMIDI is a ring-0 physical device driver (PDD) called MIDI.SYS. There is also a dynamical link library (DLL) called RTMIDI.DLL which provides an API for applications. For most functions, RTMIDI.DLL just acts like a front-end to MIDI.SYS, but in some cases it actually does some real work.

RTMIDI's primary function is to perform the real-time MIDI processing needs that an OS/2 application cannot perform, such as:

What other information on RTMIDI is available?

The DevCon 8 documentation, in INF format is available here.

The DDK Online MMPM/2 Device Driver Reference contains the latest official RTMIDI device driver reference. Note that it does not cover any undocumented features, such as Type B and Type C drivers.

The The OS/2 API Project is slowly being updated to include all of the RTMIDI API's, including the undocumented calls in OS/2 Warp 4. If you don't find what you need, email me.

Also on the DevCon you can find JRTMIDI, a Java interface to RTMIDI.

If you're a Pascal programmer, you might be interested in this header file: rtmidi.pas.

The RTMIDI architecture was presented at the following conferences:

Click here to download the latest version of the Freelance Graphics overheads that I use for presentations on RTMIDI. This file was created with Freelance Graphics 2.1 for OS/2, but it should work on all versions of FLG.

What are the RTMIDI release dates?

The first release, dubbed Phase I, was made available on DevCon 8 as part of the Entertainment Toolkit.

Phase I provides real-time playback and high-resolution timing.

A much improved version, called Phase 1.5, was released in OS/2 Warp 4. However, all of the enhancements are officially undocumented. Look for documentation on this page and on the The OS/2 API Project. Currently, the documentation isn't up to date, so email me if you want to know more.

There is an update to RTMIDI available from IBM that you should download.  It is available on the DD Pack.


Here are some web sites and articles that reference RTMIDI. If you know of a MIDI programming site that doesn't have an entry on RTMIDI, send a note to the author and to me (so I can bug him/her too!).
Here is a list of applications that use RTMIDI.
Here is a list of Type A device drivers for RTMIDI. Type A drivers provide direct hareware support for RTMIDI. Most of these are available on the DD Pak Online.

Related URL's


MIDI web pages


OS/2 MIDI software


Other MIDI subsystems, toolkits, and libraries