#include <Midi.H>
Public Member Functions | |
MidiInDevice (int number) | |
virtual | ~MidiInDevice () |
bool | hasMessageWaiting () |
bool | readMessage (unsigned char **msgPtr, int *size) |
bool | hasDataWaiting () |
Returns true if a call to readData will return some data. | |
int | readData (unsigned char *&statusBytes, unsigned char *&data1Bytes, unsigned char *&data2Bytes) |
Returns size of the data arrays. | |
void | poll () |
poll is only used in linux, a callback is used in Win32 midi | |
void | setMessage (unsigned char *msg, int size) |
for internal use only | |
void | addData (unsigned char status, unsigned char data1, unsigned char data2) |
void | shutdown () |
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) |
Public Attributes | |
bool | continueCallback |
VRG3D::MidiInDevice::MidiInDevice | ( | int | number | ) |
virtual VRG3D::MidiInDevice::~MidiInDevice | ( | ) | [virtual] |
static MidiInDevice* VRG3D::MidiInDevice::fromMidiDeviceName | ( | const char * | name | ) | [static] |
static MidiInDevice* VRG3D::MidiInDevice::fromMidiDeviceNumber | ( | int | number | ) | [static] |
static int VRG3D::MidiInDevice::getNumAvailableDevices | ( | ) | [static] |
static void VRG3D::MidiInDevice::getAvailableDeviceName | ( | int | number, | |
char * | name | |||
) | [static] |
bool VRG3D::MidiInDevice::hasMessageWaiting | ( | ) |
Returns true if midi messages have come in since the last call to readMessage.
bool VRG3D::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 VRG3D::MidiInDevice::hasDataWaiting | ( | ) |
Returns true if a call to readData will return some data.
int VRG3D::MidiInDevice::readData | ( | unsigned char *& | statusBytes, | |
unsigned char *& | data1Bytes, | |||
unsigned char *& | data2Bytes | |||
) |
Returns size of the data arrays.
void VRG3D::MidiInDevice::poll | ( | ) |
poll is only used in linux, a callback is used in Win32 midi
void VRG3D::MidiInDevice::setMessage | ( | unsigned char * | msg, | |
int | size | |||
) |
for internal use only
void VRG3D::MidiInDevice::addData | ( | unsigned char | status, | |
unsigned char | data1, | |||
unsigned char | data2 | |||
) |
void VRG3D::MidiInDevice::shutdown | ( | ) |