VRG3D::MidiInDevice Class Reference

#include <Midi.H>

List of all members.

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 MidiInDevicefromMidiDeviceName (const char *name)
static MidiInDevicefromMidiDeviceNumber (int number)
static int getNumAvailableDevices ()
static void getAvailableDeviceName (int number, char *name)

Public Attributes

bool continueCallback


Constructor & Destructor Documentation

VRG3D::MidiInDevice::MidiInDevice ( int  number  ) 

virtual VRG3D::MidiInDevice::~MidiInDevice (  )  [virtual]


Member Function Documentation

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 (  ) 


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Wed Jan 26 06:35:59 2011 for VRG3D by  doxygen 1.5.6