MidiOutPort class public functions

MidiOutPort
~MidiOutPort
close
closeAll
getChannelOffset
getName
getNumPorts
getPort
getPortStatus
getTrace
open
rawsend
setAndOpenPort
setChannelOffset
setPort
setTrace
sysex
toggleTrace

MidiOutPort(void);
Sets the output port to 0 but does not open the port.

MidiOutPort(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 MidiOutPort object has already opened the port).

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

void close(void);
Closes the MIDI port to which the MidiOutPort 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 so send any MIDI output once the port is closed.

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

int getChannelOffset(void) const;
No description available.

const char* getName(void);
Returns the name of the MIDI port device. Pointer is not guarenteed to be valid after the function is called again (by another object on another port).

static const char* getName(int i);
Returns the name of the MIDI port device. Pointer is not guarenteed to be valid after the function is called again (by another object on another port). This function can be used without a MidiOutPort object.

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

int getPort(void);
Returns the MIDI output port to which the object directs output.

int getPortStatus(void);
Returns 1 if the port is currently open, otherwise returns 0.

int getTrace(void);
Returns true if the midi input is being printed to the terminal.

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

int rawsend(int command, int p1, int p2);
Sends the three midi bytes. command is the MIDI command being sent. p1 is the first parameter for that command. p2 is the second paramter for that command

int rawsend(int command, int p1);
Sends the two midi bytes. command is the MIDI command being sent. p1 is the first parameter for that command.

int rawsend(int command);
Sends the one midi byte. command is the MIDI command being sent.

int rawsend(uchar* array, int size);
Sends the array of midi data (usually a sysex command) with the specified size in bytes. All bytes are sent exactly as found in the array. No additional bytes are added to the message.

void setAndOpenPort(int aPort);
No description available.

void setChannelOffset(int aChannel);
No description available.

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

int setTrace(int aState);
Sets whether or not the MIDI data being sent out of the object will be printed on the computer screen as well. 0 = don't print; 1 = print.

int sysex(uchar* array, int size);
No description available.

void toggleTrace(void);
No description available.