|
void | setup () |
|
void | cleanup () |
|
void | enableParser (bool enable) |
|
MidiParser * | getParser () |
|
void | setParserCallback (void(*callback)(MidiChannelMessage, void *), void *arg=NULL) |
|
int | readFrom (const char *port) |
|
int | writeTo (const char *port) |
|
int | getInput () |
|
int | writeOutput (midi_byte_t byte) |
|
int | writeOutput (midi_byte_t *bytes, unsigned int length) |
|
int | writeMessage (midi_byte_t statusCode, midi_byte_t channel, midi_byte_t dataByte) |
|
int | writeMessage (midi_byte_t statusCode, midi_byte_t channel, midi_byte_t dataByte1, midi_byte_t dataByte2) |
|
int | writeMessage (const MidiChannelMessage &msg) |
|
int | writeNoteOff (midi_byte_t channel, midi_byte_t pitch, midi_byte_t velocity) |
|
int | writeNoteOn (midi_byte_t channel, midi_byte_t pitch, midi_byte_t velocity) |
|
int | writePolyphonicKeyPressure (midi_byte_t channel, midi_byte_t pitch, midi_byte_t pressure) |
|
int | writeControlChange (midi_byte_t channel, midi_byte_t controller, midi_byte_t value) |
|
int | writeProgramChange (midi_byte_t channel, midi_byte_t program) |
|
int | writeChannelPressure (midi_byte_t channel, midi_byte_t pressure) |
|
int | writePitchBend (midi_byte_t channel, uint16_t bend) |
|
MidiParser * | getMidiParser () |
|
bool | isInputEnabled () |
|
bool | isOutputEnabled () |
|
|
static midi_byte_t | makeStatusByte (midi_byte_t statusCode, midi_byte_t dataByte) |
|
static void | createAllPorts (std::vector< Midi * > &ports, bool useParser=false) |
|
static void | destroyPorts (std::vector< Midi * > &ports) |
|
void Midi::enableParser |
( |
bool |
enable | ) |
|
void Midi::setParserCallback |
( |
void(*)(MidiChannelMessage, void *) |
callback, |
|
|
void * |
arg = NULL |
|
) |
| |
|
inline |
int Midi::readFrom |
( |
const char * |
port | ) |
|
int Midi::writeTo |
( |
const char * |
port | ) |
|
Get received midi bytes, one at a time.
- Returns
- -1 if no new byte is available, -2 on error, the oldest not yet retrieved midi byte otherwise
int Midi::writeOutput |
( |
midi_byte_t |
byte | ) |
|
int Midi::writeOutput |
( |
midi_byte_t * |
bytes, |
|
|
unsigned int |
length |
|
) |
| |
Writes Midi bytes to the output port
- Parameters
-
bytes | an array of bytes to be written |
length | number of bytes to write |
- Returns
- 1 on success, 0 if output is not enabled, -1 on error
Gives access to the midi parser, if it has been activated.
- Returns
- a pointer to the midi parser if active, zero otherwise
void Midi::createAllPorts |
( |
std::vector< Midi * > & |
ports, |
|
|
bool |
useParser = false |
|
) |
| |
|
static |
Opens all the existing MIDI ports, in the same order returned by the filesystem or Alsa. Ports open with this method should be closed with destroyPorts()
static void Midi::destroyPorts |
( |
std::vector< Midi * > & |
ports | ) |
|
|
static |
Closes a vector of ports.
The documentation for this class was generated from the following files:
- libraries/Midi/Midi.h
- libraries/Midi/Midi.cpp