[Back]

The Maximum MIDI Programmer's ToolKit

The book includes over a dozen example programs that use the ToolKit as a real-world example of how MIDI applications can be implemented in Windows 95 and Windows NT. The ToolKit includes three DLLs that implement all of the low-level timing, MIDI input and output, and Standard MIDI File support needed for even the most demanding MIDI programs. In addition, seven C++ classes make adding support for MIDI even easier.

Three of the example programs, MidiSpy, SxLib, and MaxSeq, are useful programs as well as excellent starting places for more advanced applications. These three programs can be downloaded here (1.07Mb) so you can see how the ToolKit works.

Here is an overview of each of the programs, along with information about how some of the MIDI features are implemented using the ToolKit. These programs are explored in much greater detail in the book.


MidiSpy IconMidiSpy

MidiSpy is a MIDI viewer that will display received MIDI events, either in hexadecimal or as an interpreted trace. It can also echo events out to a select output device. As a working application, it is useful for testing MIDI instruments, viewing the output of other MIDI programs (especially when using a multiport MIDI interface), and as a general-purpose tool for examining MIDI data.

As an example program, MidiSpy implements basic MIDI functions, such as MIDI input, output, and device selection menus. These MIDI device menu lists are implemented using only a few function calls, and allow users to select desired MIDI ports. Opening and closing of MIDI devices is then handled automatically by the menuing code.

For example, to perform MIDI input and output, four TooKit classes are used: CMaxMidiIn and CMaxMidiOut for MIDI input and output, respectively, and CMidiInDeviceMenu and CMidiOutDeviceMenu to implement the input and output menus, like this: