Public Member Functions | Static Public Member Functions | Protected Member Functions

MPxMidiInputDevice Class Reference

Search for all occurrences

Detailed Description

Midi input device.

This is the base class for user defined MIDI input devices.

Child classes of MPxMidiInputDevice should define:

Examples:

jlcVcrDevice.cpp.

#include <MPxMidiInputDevice.h>

List of all members.

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.

Member Function Documentation

MStatus openDevice ( ) [virtual]

Open the midi device.

Returns:
Status code.
MDeviceState * deviceState ( ) [virtual]

Return the current state of the input device.

Returns:
Device state object.
Examples:
jlcVcrDevice.cpp.
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:
[in] val
void doMovementEvents ( bool  val = true ) [virtual]

This method is used to specify whether this device is accepting movement input from its child.

Parameters:
[in] val
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.
MStatus addChannel ( MDeviceChannel channel ) [protected]

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.

MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice
MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice MPxMidiInputDevice