|
My Project
|
This class implements support for the X-Touch midi controller. More...
#include <CXTouchController.h>

Public Member Functions | |
| cXTouchController (unsigned int a_deviceNumber=0) | |
| Constructor of cXTouchController. | |
| virtual | ~cXTouchController () |
| Destructor of cXTouchController. | |
| virtual bool | open () |
| This method opens a connection to this device. | |
| virtual bool | close () |
| This method closes the connection to this device. | |
| cXTouchModel | getModel () |
| This method returns the model of X-Touch interface. | |
| void | setLayerA () |
| This method enables layer A. | |
| void | setLayerB () |
| This method enables layer B. | |
| void | setLayer (int a_layer) |
| This method selects the desired layer (A or B) | |
| void | initialize () |
| This method iniaitalizes the table to its default state. | |
| int | getNumSliders () |
| This method returns the number of active sliders. | |
| double | getSliderValue (int a_index) |
| This method returns the value of a slider. | |
| void | setSliderValue (int a_index, double a_value) |
| This method sets the value of a slider. | |
| void | setAllSlidersValue (double a_value) |
| This method sets the value of a all sliders. | |
| int | getNumDials () |
| This method returns the number of dials. | |
| double | getDialValue (int a_index) |
| This method returns the value of a dial. | |
| double | getDialRangeMin (int a_index) |
| This method returns the minium range value of a dial. | |
| double | getDialRangeMax (int a_index) |
| This method returns the maximum range value of a dial. | |
| void | setDialRange (int a_index, double a_min, double a_max) |
| This method assigns a range of values to the dial. | |
| void | setDialValue (int a_index, double a_value) |
| This method sets a value to a dial. | |
| void | setDialMode (int a_index, int a_mode) |
| This method sets the mode of a dial. | |
| void | setDialModeSingle (int a_index) |
| This method sets the display mode of the dial to single. | |
| void | setDialModePan (int a_index) |
| This method sets the display mode of the dial to pan. | |
| void | setDialModeFan (int a_index) |
| This method sets the display mode of the dial to fan. | |
| void | setDialModeSpread (int a_index) |
| This method sets the display mode of the dial to spread. | |
| void | setDialModeTrim (int a_index) |
| This method sets the display mode of the dial to trim. | |
| void | setDialLightOn (int a_index) |
| This method turns the lights of the dial ON. | |
| void | setDialLightOff (int a_index) |
| This method turns the lights of the dial OFF. | |
| void | setDialLightBlinking (int a_index) |
| This method turns the lights of the dial to blinking. | |
| void | setAllDialsValue (double a_value) |
| This method sets a value to all dials. | |
| void | setAllDialsRange (double a_min, double a_max) |
| This method assigns a range of values to the dial. | |
| void | setAllDialsMode (int a_mode) |
| This method sets the mode of all dials. | |
| void | setAllDialsModeSingle () |
| This method sets the display mode of all dials to single. | |
| void | setAllDialsModePan () |
| This method sets the display mode of all dials to pan. | |
| void | setAllDialsModeFan () |
| This method sets the display mode of all dials to fan. | |
| void | setAllDialsModeSpread () |
| This method sets the display mode of all dials to spread. | |
| void | setAllDialsModeTrim () |
| This method sets the display mode of all dials to trim. | |
| void | setAllDialsLightOn () |
| This method turns the lights of all dials ON. | |
| void | setAllDialsLightOff () |
| This method turns the lights of all dials OFF. | |
| void | setAllDialsLightBlinking () |
| This method turns the lights of all dials to blinking. | |
| int | getNumButtons () |
| This method returns the number of buttons. | |
| int | getButtonMode (int a_index) |
| This method return the current mode of a button. | |
| bool | getButtonState (int a_index) |
| This method returns the state of a button. | |
| int | getButtonLightBehavior (int a_index) |
| This method returns the light behavior of a button. | |
| void | setButtonState (int a_index, bool a_state) |
| This method sets the state of a button. | |
| void | setButtonToggleMode (int a_index) |
| This method sets a button to toggle mode. | |
| void | setButtonMomentaryMode (int a_index) |
| This method sets a button to momentary mode. | |
| void | setButtonMode (int a_index, int a_mode) |
| This method set a button to a given mode. | |
| void | setButtonToggleOn (int a_index) |
| This method toggles the buttons ON. | |
| void | setButtonToggleOff (int a_index) |
| This method toggles the button OFF. | |
| void | setButtonLightBehavior (int a_index, int a_mode) |
| This method sets the light mode of a button. | |
| void | setButtonLightOn (int a_index) |
| This method sets the light of a button ON. | |
| void | setButtonLightOff (int a_index) |
| This method sets the light of a button OFF. | |
| void | setButtonLightBlinking (int a_index) |
| This method sets the light of a button to blinking. | |
| void | setAllButtonsState (bool a_state) |
| This method sets the state of all buttons. | |
| void | setAllButtonsToggleMode () |
| This method sets all buttons to toggle mode. | |
| void | setAllButtonsMomentaryMode () |
| This method sets all buttons to momentary mode. | |
| void | setAllButtonsMode (int a_mode) |
| This method sets all buttons to a given mode. | |
| void | setAllButtonsToggleOn () |
| This method toggles all buttons ON. | |
| void | setAllButtonsToggleOff () |
| This method toggles all buttons OFF. | |
| void | setAllButtonsLightBehavior (int a_mode) |
| This method sets the light behavior of all buttons. | |
| void | setAllButtonsLightOn () |
| This method sets the light of all buttons ON. | |
| void | setAllButtonsLightOff () |
| This method sets the light of all buttons OFF. | |
| void | setAllButtonsLightBlinking () |
| This method sets the light of all buttona to blinking. | |
| void | callbackMidiIn (double a_deltatime, std::vector< unsigned char > *a_message) |
| This method is a callback for all midi data coming from the interface. | |
| void | sendMidi3 (unsigned char a_data0, unsigned char a_data1, unsigned char a_data2) |
| This method sends a message through the midi port composed of three bytes. | |
| void | sendMidi2 (unsigned char a_data0, unsigned char a_data1) |
| This method sends a message through the midi port composed of two bytes. | |
| double | convertFrom (unsigned char a_value, double a_rangeMin, double a_rangeMax) |
| This method converts a midi value (0-127) into a ranged value. | |
| unsigned char | convertTo (double a_value, double a_rangeMin, double a_rangeMax) |
| This method converts a ranged value into a midi value (0-127). | |
Public Member Functions inherited from chai3d::cGenericDevice | |
| cGenericDevice (unsigned int a_deviceNumber=0) | |
| Constructor of cGenericDevice. | |
| virtual | ~cGenericDevice () |
| Destructor of cGenericDevice. | |
| bool | isDeviceAvailable () |
| This method returns true if the device is available for communication, false otherwise. | |
| bool | isDeviceReady () |
| This method returns true if the connection to the device has been established by calling method open(), false otherwise. | |
Static Public Member Functions | |
| static unsigned int | getNumDevices () |
| This method returns the number of haptic devices available for this class of devices. | |
Static Public Member Functions inherited from chai3d::cGenericDevice | |
| static unsigned int | getNumDevices () |
| This method returns the number of haptic devices available for this class of devices. | |
Protected Attributes | |
| cXTouchModel | m_model |
| Device model. | |
| void * | midiin |
| Midi interface input data. | |
| void * | midiout |
| Midi interface output data. | |
| unsigned int | m_portNumberIn |
| Port number MIDI in. | |
| unsigned int | m_portNumberOut |
| Port number MIDI out. | |
| int | m_layer |
| Current layer. | |
| double | m_sliderValue [C_XTOUCH_MAX_SLIDERS] |
| Slider values. | |
| double | m_sliderRange [C_XTOUCH_MAX_DIALS][2] |
| Slider Ranges. | |
| double | m_dialValue [C_XTOUCH_MAX_DIALS] |
| Dial values. | |
| double | m_dialRange [C_XTOUCH_MAX_DIALS][2] |
| Dial Ranges. | |
| bool | m_buttonState [C_XTOUCH_MAX_BUTTONS] |
| Button states. | |
| int | m_buttonMode [C_XTOUCH_MAX_BUTTONS] |
| Button modes. | |
| int | m_buttonBehavior [C_XTOUCH_MAX_BUTTONS] |
| Button light behavior. | |
Protected Attributes inherited from chai3d::cGenericDevice | |
| bool | m_deviceAvailable |
| Flag that indicates if the device is available to the computer. | |
| bool | m_deviceReady |
| Flag that indicates if connection to device was opened successfully by calling method open(). | |
| int | m_deviceNumber |
| Device number ID for this category of devices. Value must be equal or bigger than 0. A value of -1 means that the ID has not yet been defined. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from chai3d::cGenericDevice | |
| static bool | openLibraries () |
| This method opens libraries for this class of devices. | |
| static bool | closeLibraries () |
| This method closes libraries for this class of devices. | |
This class implements support for the X-Touch midi controller.
| chai3d::cXTouchController::cXTouchController | ( | unsigned int | a_deviceNumber = 0 | ) |
Constructor of cXTouchController.
|
virtual |
Destructor of cXTouchController.
|
static |
This method opens a connection to this device.
|
virtual |
This method opens a connection to this device.
Reimplemented from chai3d::cGenericDevice.
|
virtual |
This method closes a connection to this device.
Reimplemented from chai3d::cGenericDevice.
|
inline |
|
inline |
|
inline |
| void chai3d::cXTouchController::setLayer | ( | int | a_layer | ) |
This method selects the desired layer (A or B)
| a_layer | Layer number: 0 or 1. |
| void chai3d::cXTouchController::initialize | ( | ) |
This method iniaitalizes the table to its default state.
| int chai3d::cXTouchController::getNumSliders | ( | ) |
This method returns the number of sliders.
| double chai3d::cXTouchController::getSliderValue | ( | int | a_index | ) |
This method returns the value of a slider.
| a_index | Index number of slider. |
| void chai3d::cXTouchController::setSliderValue | ( | int | a_index, |
| double | a_value | ||
| ) |
This method sets the value of a slider.
| a_index | Index number of slider. |
| a_value | Desired value |
| void chai3d::cXTouchController::setAllSlidersValue | ( | double | a_value | ) |
This method sets all sliders to a given value.
| a_value | Desired value |
| int chai3d::cXTouchController::getNumDials | ( | ) |
This method returns the number of dials.
| double chai3d::cXTouchController::getDialValue | ( | int | a_index | ) |
This method returns the value of a dial.
| a_index | Index value. |
| double chai3d::cXTouchController::getDialRangeMin | ( | int | a_index | ) |
This method returns the minium range value of a dial.
| double chai3d::cXTouchController::getDialRangeMax | ( | int | a_index | ) |
This method returns the maximum range value of a dial.
| void chai3d::cXTouchController::setDialRange | ( | int | a_index, |
| double | a_min, | ||
| double | a_max | ||
| ) |
This method assigns a range of values to the dial.
| a_index | Index number of dial. |
| a_min | Minimum range value. |
| a_max | Maximum range value. |
| void chai3d::cXTouchController::setDialValue | ( | int | a_index, |
| double | a_value | ||
| ) |
This method sets a value to a dial.
| a_index | Index number of dial. |
| a_value | Desired value. |
| void chai3d::cXTouchController::setDialMode | ( | int | a_index, |
| int | a_mode | ||
| ) |
This method sets the desired display mode of a dial. (0, 1, 2, or 3)
| a_index | Index number of dial. |
| a_mode | Desired mode. |
| void chai3d::cXTouchController::setDialModeSingle | ( | int | a_index | ) |
This method sets the display mode of the dial to single.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialModePan | ( | int | a_index | ) |
This method sets the display mode of the dial to pan.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialModeFan | ( | int | a_index | ) |
This method sets the display mode of the dial to fan.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialModeSpread | ( | int | a_index | ) |
This method sets the display mode of the dial to spread.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialModeTrim | ( | int | a_index | ) |
This method sets the display mode of the dial to trim.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialLightOn | ( | int | a_index | ) |
This method turns the lights of the dial ON.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialLightOff | ( | int | a_index | ) |
This method turns the lights of the dial OFF.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setDialLightBlinking | ( | int | a_index | ) |
This method turns the lights of the dial to blinking.
| a_index | Index number of dial. |
| void chai3d::cXTouchController::setAllDialsValue | ( | double | a_value | ) |
This method sets a value to all dials.
| a_value | Desired value |
| void chai3d::cXTouchController::setAllDialsRange | ( | double | a_min, |
| double | a_max | ||
| ) |
This method assigns a range of values to the dial.
| a_min | Minimum value of range. |
| a_max | Maximum value of range. |
| void chai3d::cXTouchController::setAllDialsMode | ( | int | a_mode | ) |
This method sets the mode of all dials.
| a_mode | Mode. |
| void chai3d::cXTouchController::setAllDialsModeSingle | ( | ) |
This method sets the display mode of all dials to single.
| void chai3d::cXTouchController::setAllDialsModePan | ( | ) |
This method sets the display mode of all dials to pan.
| void chai3d::cXTouchController::setAllDialsModeFan | ( | ) |
This method sets the display mode of all dials to fan.
| void chai3d::cXTouchController::setAllDialsModeSpread | ( | ) |
This method sets the display mode of all dials to spread.
| void chai3d::cXTouchController::setAllDialsModeTrim | ( | ) |
This method sets the display mode of all dials to trim.
| void chai3d::cXTouchController::setAllDialsLightOn | ( | ) |
This method turns the lights of all dials ON.
| void chai3d::cXTouchController::setAllDialsLightOff | ( | ) |
This method turns the lights of all dials OFF.
| void chai3d::cXTouchController::setAllDialsLightBlinking | ( | ) |
This method turns the lights of all dials to blinking.
| int chai3d::cXTouchController::getNumButtons | ( | ) |
This method returns the number of buttons.
| int chai3d::cXTouchController::getButtonMode | ( | int | a_index | ) |
This method return the current mode of a button.
| a_index | Index value. |
| bool chai3d::cXTouchController::getButtonState | ( | int | a_index | ) |
This method returns the state of a button.
| a_index | Index value. |
| int chai3d::cXTouchController::getButtonLightBehavior | ( | int | a_index | ) |
This method returns the light behavior of a button.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonState | ( | int | a_index, |
| bool | a_state | ||
| ) |
This method sets the state of a button.
| a_index | Index value. |
| a_state | Button state value. |
| void chai3d::cXTouchController::setButtonToggleMode | ( | int | a_index | ) |
This method sets a button to toggle mode.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonMomentaryMode | ( | int | a_index | ) |
This method sets a button to momentary mode.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonMode | ( | int | a_index, |
| int | a_mode | ||
| ) |
This method sets a button to a given mode.
| a_index | Index value. |
| a_mode | Mode |
| void chai3d::cXTouchController::setButtonToggleOn | ( | int | a_index | ) |
This method toggles the buttons ON.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonToggleOff | ( | int | a_index | ) |
This method toggles the button OFF.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonLightBehavior | ( | int | a_index, |
| int | a_mode | ||
| ) |
This method sets the light mode of a button.
| a_index | Index value. |
| a_mode | Mode |
| void chai3d::cXTouchController::setButtonLightOn | ( | int | a_index | ) |
This method sets the light of a button ON.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonLightOff | ( | int | a_index | ) |
This method sets the light of a button OFF.
| a_index | Index value. |
| void chai3d::cXTouchController::setButtonLightBlinking | ( | int | a_index | ) |
This method sets the light of a button to blinking.
| a_index | Index value. |
| void chai3d::cXTouchController::setAllButtonsState | ( | bool | a_state | ) |
This method sets the state of all buttons
| a_state | Button state value. |
| void chai3d::cXTouchController::setAllButtonsToggleMode | ( | ) |
This method sets all buttons to toggle mode.
| void chai3d::cXTouchController::setAllButtonsMomentaryMode | ( | ) |
This method sets all buttons to momentary mode.
| void chai3d::cXTouchController::setAllButtonsMode | ( | int | a_mode | ) |
This method sets all buttons to a given mode.
| a_mode | Button mode. |
| void chai3d::cXTouchController::setAllButtonsToggleOn | ( | ) |
This method toggles all buttons ON.
| void chai3d::cXTouchController::setAllButtonsToggleOff | ( | ) |
This method toggles all buttons OFF.
| void chai3d::cXTouchController::setAllButtonsLightBehavior | ( | int | a_mode | ) |
This method sets the light behavior of all buttons.
| a_mode | Light behavior mode. |
| void chai3d::cXTouchController::setAllButtonsLightOn | ( | ) |
This method sets the light of all buttons ON.
| void chai3d::cXTouchController::setAllButtonsLightOff | ( | ) |
This method sets the light of all buttons OFF.
| void chai3d::cXTouchController::setAllButtonsLightBlinking | ( | ) |
This method sets the light of all buttona to blinking.
| void chai3d::cXTouchController::callbackMidiIn | ( | double | a_deltatime, |
| std::vector< unsigned char > * | a_message | ||
| ) |
This method implements a call back for incoming data from XTouchInterface.
| a_deltatime | Timestamp. |
| a_message | Incoming midi message. |
| void chai3d::cXTouchController::sendMidi3 | ( | unsigned char | a_data0, |
| unsigned char | a_data1, | ||
| unsigned char | a_data2 | ||
| ) |
This method sends a three-byte command through the midi port
| a_data0 | Data value 0 |
| a_data1 | Data value 1 |
| a_data2 | Data value 2 |
| void chai3d::cXTouchController::sendMidi2 | ( | unsigned char | a_data0, |
| unsigned char | a_data1 | ||
| ) |
This method sends a two-byte command through the midi port
| a_data0 | Data value 0 |
| a_data1 | Data value 1 |
| double chai3d::cXTouchController::convertFrom | ( | unsigned char | a_value, |
| double | a_rangeMin, | ||
| double | a_rangeMax | ||
| ) |
This method converts a midi value (0-127) into a ranged value.
| a_value | Input value from midi interface. |
| a_rangeMin | Minimum range value after conversion. |
| a_rangeMax | Maximum range value after conversion. |
| unsigned char chai3d::cXTouchController::convertTo | ( | double | a_value, |
| double | a_rangeMin, | ||
| double | a_rangeMax | ||
| ) |
This method converts a ranged value into a midi value (0-127).
| a_value | Input value. |
| a_rangeMin | Minimum range value before conversion. |
| a_rangeMax | Maximum range value before conversion. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |