Midi input device.
This is the base class for user defined MIDI input devices.
Child classes of MPxMidiInputDevice should define:
- a constructor which defines number of buttons and axes
- nameAttributes() which names the buttons and axes (optional)
- deviceState() which turns a midi event into an MDeviceState or returns NULL if it is not a midi event from this device
- Examples:
-
jlcVcrDevice.cpp.
Public Member Functions |
virtual MStatus | openDevice () |
| Open the midi device.
|
virtual void | closeDevice () |
| Close the midi device.
|
virtual void | nameAxes () |
| Assign names to the axes of the device.
|
virtual void | nameButtons () |
| Assign names to the buttons of the device.
|
virtual MDeviceState * | deviceState () |
| Return the current state of the input device.
|
virtual MStatus | sendMessage (const char *const messageType, const char *const messageParams) |
| If this midi event belongs to this device then fiil up the MDeviceState.
|
virtual char * | getMessage (const char *const messageType, char *messageResponse) |
| User should override this method.
|
virtual void | doButtonEvents (bool=true) |
| This method is used to specify whether this device is accepting button events from its child.
|
virtual void | doMovementEvents (bool=true) |
| This method is used to specify whether this device is accepting movement input from its child.
|
Static Public Member Functions |
static const char * | className () |
| Returns the name of this class.
|
Protected Member Functions |
MStatus | setNamedButton (const MString &, unsigned short) |
| Set the name of the specified button.
|
MStatus | addChannel (MDeviceChannel &) |
| Add the given channel to this device.
|
MStatus | setDegreesOfFreedom (int freedom) |
| Set the degrees of freedom for this device.
|
MStatus | setNumberOfButtons (int buttons) |
| Set the number of buttons for this device.
|