#include <Midi.H>
Public Member Functions | |
MidiInDevice (int number) | |
virtual | ~MidiInDevice () |
bool | readMessage (unsigned char **msgPtr, int *size) |
bool | hasMessageWaiting () |
void | setMessage (unsigned char *msg, int size) |
for internal use only | |
void | poll () |
poll is only used in linux, a callback is used in Win32 midi | |
Static Public Member Functions | |
static MidiInDevice * | fromMidiDeviceName (const char *name) |
static MidiInDevice * | fromMidiDeviceNumber (int number) |
static int | getNumAvailableDevices () |
static void | getAvailableDeviceName (int number, char *name) |
IS3D::MidiInDevice::MidiInDevice | ( | int | number | ) |
virtual IS3D::MidiInDevice::~MidiInDevice | ( | ) | [virtual] |
static MidiInDevice* IS3D::MidiInDevice::fromMidiDeviceName | ( | const char * | name | ) | [static] |
static MidiInDevice* IS3D::MidiInDevice::fromMidiDeviceNumber | ( | int | number | ) | [static] |
static int IS3D::MidiInDevice::getNumAvailableDevices | ( | ) | [static] |
static void IS3D::MidiInDevice::getAvailableDeviceName | ( | int | number, | |
char * | name | |||
) | [static] |
bool IS3D::MidiInDevice::readMessage | ( | unsigned char ** | msgPtr, | |
int * | size | |||
) |
To avoid copy arrays around, this returns a pointer to the message buffer. But, the next time the device is polled, any new messages that came in will overwrite data in the message buffer. So, process the message immediately after this call, or copy it to another buffer on your own. Calling this function resets the hasMessageWaiting flag to false. returns true if haveMessageWaiting is true when the function is called.
bool IS3D::MidiInDevice::hasMessageWaiting | ( | ) |
Returns true if midi messages have come in since the last call to readMessage.
void IS3D::MidiInDevice::setMessage | ( | unsigned char * | msg, | |
int | size | |||
) |
for internal use only
void IS3D::MidiInDevice::poll | ( | ) |
poll is only used in linux, a callback is used in Win32 midi