Carnegie Mellon Computer Music Group

CMU MIDI Toolkit

Much of our research is based on interactive, real-time music processing systems. Much of our past research and music performance was supported by a simple but very powerful set of small applications and libraries called the CMU Midi Toolkit, or CMT. The introduction and overview from the CMT manual appears below. CMT was extremely useful in its day, but its simple text-based interfaces and early-OS dependencies have made CMT mostly obsolete. The MIDI file processing code from CMT is incorporated into Nyquist, and many of the real-time idea have been incorportated into Aura.

The code and documentation is here:

Introduction and Overview

The CMU MIDI Toolkit (CMT) is a software package designed for experimental computer music education, composition, performance, and research. CMT includes a compiler for a simple, text-based music language, and software for recording, playing, and computing MIDI data in real time. CMT has three major attractions: the flexibility of an open-ended design, the availability of source code, and low system cost.

What does CMT do? The major components and their functions are:

Adagio is a language and an associated compiler. In Adagio, a note is represented by a line of text that specifies attributes such as pitch, duration, and loudness. Adagio is quite flexible and is compatible with several different ways of thinking about scores. For example, ``Q'' stands for a quarter note, but duration can also be indicated by ``U87'', which means 0.87 seconds(or 0.087 seconds if a time unit of 1 millisecond was selected.). Adagio also supports arbitrary tuning systems and standard MIDI files.

  • EXGet and EXPut are programs for recording and replaying MIDI system exclusive messages. These programs are typically used to save and restore synthesis parameters for a digital synthesizer.
  • Moxc is a real-time programming environment that is ideal for writing interactive music programs. Moxc is an extension of the C programming language and is based on Douglas Collinge's Moxie language.
  • Conduct is a program for conducting MIDI sequences by tapping beats on a keyboard or other MIDI controller.
  • Cornucopia is a program for mapping incoming MIDI messages to notes, chords, or sequences of MIDI messages.
  • MM is a midi monitor program that can filter out or display notes, control changes, real-time messages, and system exclusive messages.
  • MidiPrt converts a standard MIDI file into a human-readable ascii file. This is useful for debugging and for finding out what is really in a MIDI file.
  • Step provides handy conversions among MIDI pitch numbers, frequency, sample rates, sample periods, and other useful units of measure.
  • Also provided are routines (in C) that allow direct production of MIDI output. Other routines are available to read MIDI data and to get the current time with 0.01 second or better resolution.

Required Hardware and Software CMT runs on:

  1. Any Commodore-Amiga computer with an added MIDI interface. You need the CAMD Midi Driver and library software from Commodore to use CMT. To use Moxc, you should have an Aztec or Lattice C compiler and preferably a hard disk. Note: The author still uses CMT on some old Amiga computers to run some legacy compositions, but CMT is no longer maintained or tested on Amigas.
  2. Any Macintosh (with Think C) and any MIDI interface. You need Apple's MIDI Manager from Apple's APDA to use CMT.
  3. IBM PC/XT/AT clones (with either Borland C, Turbo C, Microsoft C, or Quick C). PC versions will require a Roland or compatible MIDI interface.
  4. See Section 1.3 for information about other interface possibilities for the PC platform.
  5. At Carnegie Mellon University, there are two Unix implementations, one for AIX running on RS6000 machines, and one for Mach 3.0 running on i386 architecture machines. Unix requires special device drivers for MIDI; contact the author for details.

Note: a C compiler is required to use the Moxc programming environment. No compiler is needed (for any machine type) to use Adagio, Step, Cornucopia, or Conduct. The entire CMU MIDI Toolkit occupies 5 to 10MB of disk space, although this could be trimmed considerably by not compiling all the examples.