MidiInPort class public functions

MidiInPort
~MidiInPort
clearSysex
close
closeAll
extract
getBufferSize
getChannelOffset
getCount
getName
getNumPorts
getPort
getSysex
getSysexSize
getTrace
insert
installSysex
open
operator[]
pause
setAndOpenPort
setBufferSize
setChannelOffset
setPort
setTrace
toggleTrace
unpause

MidiInPort(void);
Sets the MIDI input port to 0, but does not open the port.

MidiInPort(int aPort, int autoOpen = 1);
Sets the port on which MIDI output 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 output (unless some other MidiInPort object has already opened the port).

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

void clearSysex(void);
No description available.

void clearSysex(int buffer);
No description available.

void close(void);
Closes the MIDI input port to which the MidiInPort object belongs. Closing an unopened port will not cause an error, but will be ignored. All other objects connected to the same port will not be able to receive anymore MIDI input once the port is closed.

void closeAll(void);
Closes all open MIDI input ports.

MidiMessage extract(void);
Extracts one MidiMessage from the input buffer for the port that the object is connected to. It is an error to extract a MidiMessage when getCount returns 0 (or less).

int getBufferSize(void);
No description available.

int getChannelOffset(void);
No description available.

int getCount(void);
Returns the number of MidiMessages waiting in the MIDI input buffer.

const char* getName(void);
Returns the name of the MIDI port device.

static const char* getName(int i);
No description available.

static int getNumPorts(void);
Returns the total number of MIDI input ports which are on the system.

int getPort(void);
Returns the MIDI input port to which the object receives input.

Returns 1 if the port is currently open, otherwise return 0.

uchar* getSysex(int buffer);
No description available.

int getSysexSize(int buffer);
No description available.

int getTrace(void);
Returns trueif trace is on; otherwise returns false. If trace is on, then prints to screen the MIDI message received.

void insert(const MidiMessage& aMessage);
Writes the message into the Midi input buffer.

int installSysex(uchar* anArray, int aSize);
No description available.

int open(void);
Opens the MIDI port to which the object belongs. If port is already opened, then ignore the open request.

MidiMessage& operator[](int index);
No description available.

void pause(void);
Stops the MIDI input port from inserting MIDI messages into the buffer, but keeps the port open. Use unpause to reverse the effect of pause().

void setBufferSize(int aSize);
Sets the allocation size of the midi input buffer to which the object belongs. After resizing the buffer, any previously stored MIDI messages will be lost.

void setChannelOffset(int anOffset);
This function will soon be deleted.

void setAndOpenPort(int aPort);
No description available.

void setPort(int aPort);
Changes the MIDI output port to which the MidiInPort object belongs. Will not close the old port nor open the new port.

int setTrace(int aState);
If false, then don't print input MIDI messages to the standard output.

void toggleTrace(void);
Switches the state of the trace variable. Returns the previous state of the trace variable.

void unpause(void);
Enables the Midi input port to start inserting MIDI messages into the buffer after the port is already open.