Midi input device.
More...
#include <MPxMidiInputDevice.h>
|
virtual MStatus | openDevice () |
| Open the midi device. More...
|
|
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. More...
|
|
virtual MStatus | sendMessage (const char *const messageType, const char *const messageParams) |
| If this midi event belongs to this device then fiil up the MDeviceState. More...
|
|
virtual char * | getMessage (const char *const messageType, char *messageResponse) |
| User should override this method. More...
|
|
virtual void | doButtonEvents (bool=true) |
| This method is used to specify whether this device is accepting button events from its child. More...
|
|
virtual void | doMovementEvents (bool=true) |
| This method is used to specify whether this device is accepting movement input from its child. More...
|
|
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
Open the midi device.
- Returns
- Status code.
Return the current state of the input device.
- Returns
- Device state object.
MStatus sendMessage |
( |
const char *const |
messageType, |
|
|
const char *const |
messageParams |
|
) |
| |
|
virtual |
If this midi event belongs to this device then fiil up the MDeviceState.
Otherwise return NULL. The user should override this method.
User should override this method.
- Parameters
-
[in] | messageType | Message to send. |
[in] | messageParams | Message parameters. |
- Returns
- Status code.
char * getMessage |
( |
const char *const |
messageType, |
|
|
char * |
messageResponse |
|
) |
| |
|
virtual |
User should override this method.
- Parameters
-
[in] | messageType | |
[out] | messageResponse | |
void doButtonEvents |
( |
bool |
val = true | ) |
|
|
virtual |
This method is used to specify whether this device is accepting button events from its child.
- Parameters
-
void doMovementEvents |
( |
bool |
val = true | ) |
|
|
virtual |
This method is used to specify whether this device is accepting movement input from its child.
- Parameters
-
const char * className |
( |
| ) |
|
|
static |
Returns the name of this class.
- Returns
- Name of this class.
MStatus setNamedButton |
( |
const MString & |
buttonName, |
|
|
unsigned short |
button |
|
) |
| |
|
protected |
Set the name of the specified button.
- Parameters
-
[in] | buttonName | Name of button. |
[in] | button | Index of button. |
Add the given channel to this device.
- Parameters
-
[in] | channel | Channel to add. |
MStatus setDegreesOfFreedom |
( |
int |
freedom | ) |
|
|
protected |
Set the degrees of freedom for this device.
- Parameters
-
[in] | freedom | New degrees of freedom value. |
MStatus setNumberOfButtons |
( |
int |
buttons | ) |
|
|
protected |
Set the number of buttons for this device.
- Parameters
-
[in] | buttons | New number of buttons. |
The documentation for this class was generated from the following files:
- MPxMidiInputDevice.h
- MPxMidiInputDevice.cpp