Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 2.6


DxMidiX 1.2

Issue: 2.6 (July/August 2004)
Author: Toby Rush
Article Description: No description available.
Article Length (in bytes): 4,010
Starting Page Number: 8
Article Number: 2602
Related Web Link(s):


Full text of article...

MIDI functionality has always been a little elusive to REALbasic programmers. The primary reason for this was the fact that MIDI wasn't built into the Macintosh operating system for a long time. In order to connect a computer to a MIDI keyboard or synthesizer, you had to install Opcode's Open Music System (OMS) or Mark of the Unicorn's FreeMIDI, both of which would enable communication through a MIDI interface connected to the computer. To add MIDI capabilities to REALbasic, you either had to be lucky enough to own Opcode's long-discontinued MIDIPlay XCMDs, or wade through the complicated development kits and design a plugin to do the trick.

Nowadays, things are quite a bit better. With OS X, Apple hired the developer who designed OMS (Opcode went out of business a year or so before) and decided to include MIDI support in the operating system. Better yet, RealVision Multimedia took their DxMIDI plugin for REALbasic -- the last surviving solution for using MIDI with REALbasic -- and updated it to work with OS X.

Because CoreMIDI -- Apple's built-in replacement for MIDI management systems like OMS and FreeMIDI -- is part of OS X, the previously complicated world of MIDI support is much easier, and the DxMidiX plugin takes advantage of this simplicity. Using the DxMIDI plugin for OS 9, the user had to have OMS installed and go through a complicated setup procedure to allow for even simple MIDI input or output. With OS X, CoreMIDI, and the DxMidiX plugin, no additional software is required and configuration is very simple.

DxMidiX has two modes of MIDI communication: easy mode and custom mode. Easy mode consolidates all communication into a few simple methods and is ideal for simple MIDI communication. Custom mode gives the developer fine control over every aspect of MIDI communication and allows for complicated and powerful MIDI configurations.

Because MIDI communication is very time sensitive, DxMidiX buffers all MIDI messages and adds timestamps to each incoming event. This prevents the REALbasic developer from having to worry about suppressing background processing in an effort to preserve precise timing. Timestamps can also be placed on outgoing messages, so they will be sent at a precise time regardless of what the REALbasic project is doing.

DxMidiX allows you to get information about the current MIDI setup, including which devices are attached and how they are identified by CoreMIDI. The plugin also intelligently handles configuration changes while your program is running.

Perhaps the only drawback to DxMidiX is the difficulty in understanding the documentation -- while it is very complete, the language is a little hard to understand (due, no doubt, to the fact that the program is French in origin). Fortunately, a demonstration project is included to help clear things up.

DxMidiX is a godsend for REALbasic MIDI programmers, and is well worth the price.

End of article.