MidiInput class public functions

MidiInput
~MidiInput
makeOrphanBuffer
removeOrphanBuffer
isOrphan

Functions inherited from MidiInPort:
close
closeAll
extract
getCount
getName
getNumPorts
getPort
getPortStatus
getTrace
insert
open
pause
setBufferSize
setPort
setTrace
toggleTrace
unpause

MidiInput(int aPort, int openAuto = 1);
Sets the port on which MIDI I/O will occur for this object. If openAutoQ == 1, then the specified port will automatically be opened. If openQ == 0, then the user must call the open function to open the port before actually using MIDI I/O (unless some other MidiInput object has already opened the port).

~MidiInput();
If there are no more instances of MidiInput left, then close all open MIDI ports.

int makeOrphanBuffer(int aSize = 1024);
This function will disconnect the object from the associated hardware MIDI input port and create a new private circular buffer for MIDI message when can then be inserted to simulate input from a real hardware MIDI input port. Also the orphan buffer can be used to copy MIDI input data from another MidiInput/MidiInPort object when is actually connected to a hardware MIDI input port. The size of the input buffer can be specified with the aSize argument when the buffer is created, or it can be set later with the setBuffersize function

int removeOrphanBuffer(void);
Removed the orphan buffer and sets the input buffer back to the hardware MIDI input buffer that the object is associated which can be determined with the getPort function.

int isOrphan(void) const;
Returns true if there is an orphan buffer being used. False if a hardware MIDI input port buffer is being used.










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