In file OSC_MIDIInput.h:

class OSC_MIDIInput



Base class for generic MIDI input

Public Methods

OSC_MIDIInput()
virtual ~OSC_MIDIInput()
void GetListOfDevices(OSC_StringArray &list, bool includeDeviceNumber = false)
Returns a list of installed MIDI input devices
int GetNumDevices()
Returns the number of installed devices
OSC_ERR GetDevName(std::string &name)
Get the name of the current open device
OSC_ERR GetDevName(int deviceid, std:: string &name)
Get the name of the specified device (number)
OSC_ERR GetDevID(const std::string &name, int &deviceid)
Get the device id of the specified device (name)
OSC_ERR Open(int deviceid)
Open the device, must be done before running Start()
OSC_ERR Close()
Close the device
OSC_ERR Start()
Start recieving MIDI messages. MidiInput(...) will be called for every MIDI message received by the system.
OSC_ERR Stop()
Stop receiving MIDI messages. MidiInput(...) will no longer be called
virtual void MidiInput(OSC_MIDIMessage message)
Recieves the MIDI input data. Overload this function to do something useful with the MIDI Input
MMRESULT GetLastMMError()
Returns the latest error (if any) from the Windows MultiMedia system
std::string GetLastMMErrorDescription()
Returns the latest error in text format

Documentation

Base class for generic MIDI input. This class can be used to query the system about available MIDI input devices, and to open any MIDI input device and start receiving MIDI input messages. When using this class in a project, make your own MIDIInput class that inherits from this class, and overload the MidiInput(...) function. This function will be called whenever new MIDI data arrives. A program using this class might do something like this:
OSC_MIDIInput()

virtual ~OSC_MIDIInput()

void GetListOfDevices(OSC_StringArray &list, bool includeDeviceNumber = false)
Returns a list of installed MIDI input devices

int GetNumDevices()
Returns the number of installed devices

OSC_ERR GetDevName(std::string &name)
Get the name of the current open device

OSC_ERR GetDevName(int deviceid, std:: string &name)
Get the name of the specified device (number)

OSC_ERR GetDevID(const std::string &name, int &deviceid)
Get the device id of the specified device (name)

OSC_ERR Open(int deviceid)
Open the device, must be done before running Start()

OSC_ERR Close()
Close the device

OSC_ERR Start()
Start recieving MIDI messages. MidiInput(...) will be called for every MIDI message received by the system.

OSC_ERR Stop()
Stop receiving MIDI messages. MidiInput(...) will no longer be called

virtual void MidiInput(OSC_MIDIMessage message)
Recieves the MIDI input data. Overload this function to do something useful with the MIDI Input

MMRESULT GetLastMMError()
Returns the latest error (if any) from the Windows MultiMedia system

std::string GetLastMMErrorDescription()
Returns the latest error in text format


This class has no child classes.

alphabetic index hierarchy of classes



generated by doc++