There can be any number of MidiOuputPort instances, each of which directs MIDI output to a common set of MIDI out port locations. The maximum number of hardware ports for the system can be found with the getNumPorts function. Multiple connections of MidiOutPort objects to physical output ports on the computer is demonstrated in Figure 1 below.
|
In general, a MIDI out 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.
|