*** Note: This documentation is out of date ***

MidiPort class overview

MidiPort handles the MIDI I/O port connections for the MidiOutput and MidiInput classes. MidiPort is the class in which to place hardware/operating dependent functions. Such functions are described further below.

There can be any number of MidiPort instances, each of which directs input/output to a common set of MIDI I/O locations of which there are currently allowed to be up to 8:

In general, a MIDI port will be opened automatically when an instance belonging to that port is created, and all MIDI ports will be closed just before the last instance of a MidiPort class goes out of scope. The functions open and close can alternatively be used to manually control connection to a MIDI port. See the constructor for disabling automatic opening of a MIDI port.

There are several functions which are dependent on the operating system (and will have to be modified for each new computer configuation added):

Program example usage

  1. Here is a short example program using 4Front Technoligies' OSS soundcard driver in the Linux operating system: directOut.cc
  2. Here is a program which does the same thing as the program above but using MidiPort class: midiportest.cc
  3. And here is a program which does the same thing as the program above but using the MidiOutput class: midioutputest.cc













Send comments/errors on this page to craig@ccrma.stanford.edu