41#ifndef __CXTOUCHCONTROLLER_H_
42#define __CXTOUCHCONTROLLER_H_
127 virtual bool close();
183 void setDialRange(
int a_index,
double a_min,
double a_max);
335 void callbackMidiIn(
double a_deltatime, std::vector< unsigned char > *a_message);
345 void sendMidi3(
unsigned char a_data0,
unsigned char a_data1,
unsigned char a_data2);
348 void sendMidi2(
unsigned char a_data0,
unsigned char a_data1);
351 double convertFrom(
unsigned char a_value,
double a_rangeMin,
double a_rangeMax);
354 unsigned char convertTo(
double a_value,
double a_rangeMin,
double a_rangeMax);
Implements a device base class.
This class implements an abstract class for hardware devices.
Definition CGenericDevice.h:84
This class implements support for the X-Touch midi controller.
Definition CXTouchController.h:93
void setAllDialsModeFan()
This method sets the display mode of all dials to fan.
Definition CXTouchController.cpp:949
void setDialModePan(int a_index)
This method sets the display mode of the dial to pan.
Definition CXTouchController.cpp:740
void setButtonMode(int a_index, int a_mode)
This method set a button to a given mode.
Definition CXTouchController.cpp:1203
virtual bool open()
This method opens a connection to this device.
Definition CXTouchController.cpp:252
void setAllButtonsToggleOn()
This method toggles all buttons ON.
Definition CXTouchController.cpp:1477
cXTouchModel getModel()
This method returns the model of X-Touch interface.
Definition CXTouchController.h:130
int m_buttonBehavior[C_XTOUCH_MAX_BUTTONS]
Button light behavior.
Definition CXTouchController.h:400
void setDialLightOff(int a_index)
This method turns the lights of the dial OFF.
Definition CXTouchController.cpp:819
void initialize()
This method iniaitalizes the table to its default state.
Definition CXTouchController.cpp:304
double m_sliderValue[C_XTOUCH_MAX_SLIDERS]
Slider values.
Definition CXTouchController.h:382
void setDialMode(int a_index, int a_mode)
This method sets the mode of a dial.
Definition CXTouchController.cpp:680
void setButtonLightOn(int a_index)
This method sets the light of a button ON.
Definition CXTouchController.cpp:1290
virtual ~cXTouchController()
Destructor of cXTouchController.
Definition CXTouchController.cpp:195
void sendMidi2(unsigned char a_data0, unsigned char a_data1)
This method sends a message through the midi port composed of two bytes.
Definition CXTouchController.cpp:1812
void setDialModeFan(int a_index)
This method sets the display mode of the dial to fan.
Definition CXTouchController.cpp:753
void setDialModeSpread(int a_index)
This method sets the display mode of the dial to spread.
Definition CXTouchController.cpp:766
int getNumDials()
This method returns the number of dials.
Definition CXTouchController.cpp:521
double convertFrom(unsigned char a_value, double a_rangeMin, double a_rangeMax)
This method converts a midi value (0-127) into a ranged value.
Definition CXTouchController.cpp:1864
void setAllDialsModeSingle()
This method sets the display mode of all dials to single.
Definition CXTouchController.cpp:921
void setAllButtonsLightOff()
This method sets the light of all buttons OFF.
Definition CXTouchController.cpp:1535
void setAllDialsValue(double a_value)
This method sets a value to all dials.
Definition CXTouchController.cpp:873
void setButtonLightOff(int a_index)
This method sets the light of a button OFF.
Definition CXTouchController.cpp:1333
unsigned char convertTo(double a_value, double a_rangeMin, double a_rangeMax)
This method converts a ranged value into a midi value (0-127).
Definition CXTouchController.cpp:1899
double m_dialRange[C_XTOUCH_MAX_DIALS][2]
Dial Ranges.
Definition CXTouchController.h:391
unsigned int m_portNumberIn
Port number MIDI in.
Definition CXTouchController.h:373
static unsigned int getNumDevices()
This method returns the number of haptic devices available for this class of devices.
Definition CXTouchController.cpp:210
void setLayerB()
This method enables layer B.
Definition CXTouchController.h:136
void setAllButtonsMode(int a_mode)
This method sets all buttons to a given mode.
Definition CXTouchController.cpp:1463
void setButtonLightBehavior(int a_index, int a_mode)
This method sets the light mode of a button.
Definition CXTouchController.cpp:1267
void setDialLightBlinking(int a_index)
This method turns the lights of the dial to blinking.
Definition CXTouchController.cpp:846
void setButtonState(int a_index, bool a_state)
This method sets the state of a button.
Definition CXTouchController.cpp:1173
void setAllButtonsLightBehavior(int a_mode)
This method sets the light behavior of all buttons.
Definition CXTouchController.cpp:1507
void * midiout
Midi interface output data.
Definition CXTouchController.h:370
void setSliderValue(int a_index, double a_value)
This method sets the value of a slider.
Definition CXTouchController.cpp:465
int m_buttonMode[C_XTOUCH_MAX_BUTTONS]
Button modes.
Definition CXTouchController.h:397
void setAllDialsModePan()
This method sets the display mode of all dials to pan.
Definition CXTouchController.cpp:935
void setLayerA()
This method enables layer A.
Definition CXTouchController.h:133
unsigned int m_portNumberOut
Port number MIDI out.
Definition CXTouchController.h:376
void setButtonMomentaryMode(int a_index)
This method sets a button to momentary mode.
Definition CXTouchController.cpp:1155
void setAllButtonsState(bool a_state)
This method sets the state of all buttons.
Definition CXTouchController.cpp:1419
void setAllDialsModeTrim()
This method sets the display mode of all dials to trim.
Definition CXTouchController.cpp:977
void setDialModeSingle(int a_index)
This method sets the display mode of the dial to single.
Definition CXTouchController.cpp:727
double getDialRangeMin(int a_index)
This method returns the minium range value of a dial.
Definition CXTouchController.cpp:571
void setDialRange(int a_index, double a_min, double a_max)
This method assigns a range of values to the dial.
Definition CXTouchController.cpp:608
void setDialLightOn(int a_index)
This method turns the lights of the dial ON.
Definition CXTouchController.cpp:792
void setDialModeTrim(int a_index)
This method sets the display mode of the dial to trim.
Definition CXTouchController.cpp:779
int getButtonMode(int a_index)
This method return the current mode of a button.
Definition CXTouchController.cpp:1072
double m_sliderRange[C_XTOUCH_MAX_DIALS][2]
Slider Ranges.
Definition CXTouchController.h:385
void setAllButtonsToggleOff()
This method toggles all buttons OFF.
Definition CXTouchController.cpp:1491
double getDialRangeMax(int a_index)
This method returns the maximum range value of a dial.
Definition CXTouchController.cpp:589
void setAllDialsLightOff()
This method turns the lights of all dials OFF.
Definition CXTouchController.cpp:1005
void setDialValue(int a_index, double a_value)
This method sets a value to a dial.
Definition CXTouchController.cpp:631
int getNumButtons()
This method returns the number of buttons.
Definition CXTouchController.cpp:1036
double m_dialValue[C_XTOUCH_MAX_DIALS]
Dial values.
Definition CXTouchController.h:388
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.
Definition CXTouchController.cpp:1836
void setAllDialsLightOn()
This method turns the lights of all dials ON.
Definition CXTouchController.cpp:991
bool getButtonState(int a_index)
This method returns the state of a button.
Definition CXTouchController.cpp:1092
void * midiin
Midi interface input data.
Definition CXTouchController.h:367
void setButtonToggleOn(int a_index)
This method toggles the buttons ON.
Definition CXTouchController.cpp:1220
void setAllButtonsLightBlinking()
This method sets the light of all buttona to blinking.
Definition CXTouchController.cpp:1549
void setAllButtonsMomentaryMode()
This method sets all buttons to momentary mode.
Definition CXTouchController.cpp:1447
virtual bool close()
This method closes the connection to this device.
Definition CXTouchController.cpp:281
void setLayer(int a_layer)
This method selects the desired layer (A or B)
Definition CXTouchController.cpp:385
int getButtonLightBehavior(int a_index)
This method returns the light behavior of a button.
Definition CXTouchController.cpp:1121
void setAllButtonsToggleMode()
This method sets all buttons to toggle mode.
Definition CXTouchController.cpp:1433
void setAllDialsRange(double a_min, double a_max)
This method assigns a range of values to the dial.
Definition CXTouchController.cpp:890
void setButtonToggleMode(int a_index)
This method sets a button to toggle mode.
Definition CXTouchController.cpp:1138
void setAllDialsLightBlinking()
This method turns the lights of all dials to blinking.
Definition CXTouchController.cpp:1019
void setButtonLightBlinking(int a_index)
This method sets the light of a button to blinking.
Definition CXTouchController.cpp:1376
bool m_buttonState[C_XTOUCH_MAX_BUTTONS]
Button states.
Definition CXTouchController.h:394
int m_layer
Current layer.
Definition CXTouchController.h:379
void callbackMidiIn(double a_deltatime, std::vector< unsigned char > *a_message)
This method is a callback for all midi data coming from the interface.
Definition CXTouchController.cpp:1566
cXTouchModel m_model
Device model.
Definition CXTouchController.h:364
double getDialValue(int a_index)
This method returns the value of a dial.
Definition CXTouchController.cpp:553
void setAllDialsMode(int a_mode)
This method sets the mode of all dials.
Definition CXTouchController.cpp:906
void setAllButtonsLightOn()
This method sets the light of all buttons ON.
Definition CXTouchController.cpp:1521
void setAllSlidersValue(double a_value)
This method sets the value of a all sliders.
Definition CXTouchController.cpp:504
void setAllDialsModeSpread()
This method sets the display mode of all dials to spread.
Definition CXTouchController.cpp:963
double getSliderValue(int a_index)
This method returns the value of a slider.
Definition CXTouchController.cpp:447
void setButtonToggleOff(int a_index)
This method toggles the button OFF.
Definition CXTouchController.cpp:1243
int getNumSliders()
This method returns the number of active sliders.
Definition CXTouchController.cpp:415
Definition CAudioBuffer.cpp:57
cXTouchModel
Definition CXTouchController.h:67
@ C_XTOUCH_COMPACT
Definition CXTouchController.h:69
@ C_XTOUCH_MINI
Definition CXTouchController.h:70
@ C_XTOUCH_NOT_DETECTED
Definition CXTouchController.h:68
const int C_XTOUCH_MAX_DIALS
Definition CXTouchController.h:75
const int C_XTOUCH_MAX_SLIDERS
Definition CXTouchController.h:74
const int C_XTOUCH_MAX_BUTTONS
Definition CXTouchController.h:73