#include <KontrolDj.h>
Inheritance diagram for KDjExtended:

Public Types | |
| enum | BUTTON { button_two_A, button_three_A, button_four_A, button_play_A, button_bank_A, button_shift_A, button_one_A, button_stop_A, reserved_track2_A, reserved_track1_A, reserved_jog2_A, reserved_jog1_A, button_lever_A, button_pfl_A, button_select_A, button_pot_bank_A, button_two_B, button_three_B, button_four_B, button_play_B, button_bank_B, button_shift_B, button_one_B, button_stop_B, reserved_track2_B, reserved_track1_B, reserved_jog2_B, reserved_jog1_B, button_lever_B, button_pfl_B, button_select_B, button_pot_bank_B } |
| Defined KDjExtended buttons. More... | |
| enum | ENCODER { encoder_track_A, encoder_jog_A, encoder_track_B, encoder_jog_B } |
| Defined KDjExtended encoders. More... | |
| enum | POTENTIOMETER { pot_crossfader, pot_two_A, pot_three_A, pot_four_A, pot_pitch_A, pot_one_A, pot_volume_B, pot_volume_A, pot_three_B, pot_two_B, pot_four_B, pot_one_B, pot_pitch_B } |
| Defined KDjExtended potentiometers. More... | |
| enum | LED { led_pot_bank_B, led_pfl_B, led_play_B, led_four_B, led_three_B, led_stop_B, led_one_B, led_two_B, led_pot_bank_A, led_pfl_A, led_play_A, led_four_A, led_three_A, led_stop_A, led_one_A, led_two_A } |
| Defined KDjExtended leds. More... | |
Public Member Functions | |
| KDjExtended () | |
| Default constructor. | |
| ~KDjExtended () | |
| The destructor closes any open device connections. | |
| void | getControllerMode (void) |
| Request for the current mode of operation of the controller. | |
| void | setControllerMode (unsigned char mode=0) |
| Set the current mode of operation of the controller. | |
| void | getMidiMergerState () |
| Request for the current midi merger state of the controller. | |
| void | setMidiMergerState (unsigned char globalMergerState=1, unsigned char usbOutMergerState=1, unsigned char midiOutMergerState=1) |
| Set the current midi merger state of the controller. | |
| void | getLedState (unsigned char led) |
| Request for the led state (on / off). | |
| void | setLedState (unsigned char led, unsigned char state) |
| Set the state of a led (on / off). | |
| void | getLedsStates (void) |
| Request for the states of all the leds (on / off). | |
| void | setLedsStates (unsigned int states) |
| Set the states of all the leds (on / off). | |
| void | getButtonsStates (void) |
| Request for the states of all the buttons (up / down). | |
| void | getPotentiometerValue (unsigned char potentiometer) |
| Request for the potentiometer value (8 bits). | |
| virtual void | doBufferProcessing (void) |
| Read a message from the receive buffer queue which is processed. | |
Protected Member Functions | |
| virtual void | onGetControllerMode (unsigned char mode) |
| Called when the mode of operation of the controller has been received. Virtual. | |
| virtual void | onGetMidiMergerState (unsigned char globalMergerState, unsigned char usbOutMergerState, unsigned char midiOutMergerState) |
| virtual void | onGetLedState (unsigned char led, unsigned char state) |
| Called when the state of a led has been received. Virtual. | |
| virtual void | onGetLedsStates (unsigned int states) |
| Called when the states of all the leds has been received. Virtual. | |
| virtual void | onGetButtonsStates (unsigned int states) |
| Called when the states of all the buttons has been received. Virtual. | |
| virtual void | onGetPotentiometerValue (unsigned char potentiometer, unsigned char value) |
| Called when the value of a potentiometer has been received. Virtual. | |
| virtual void | onButtonPress (unsigned char button, unsigned char flags, std::vector< unsigned char > *midiMessage) |
| Called when a button has been pressed. Virtual. | |
| virtual void | onButtonRelease (unsigned char button, unsigned char flags, std::vector< unsigned char > *midiMessage) |
| Called when a button has been released. Virtual. | |
| virtual void | onPotentiometerChange (unsigned char potentiometer, unsigned char flags, unsigned char value, std::vector< unsigned char > *midiMessage) |
| Called when a potentiometer has been moved/turned. Virtual. | |
| virtual void | onEncoderIncrement (unsigned char encoder, unsigned char flags, unsigned char speed, std::vector< unsigned char > *midiMessage) |
| Called when a encoder has been turned right (increment). Virtual. | |
| virtual void | onEncoderDecrement (unsigned char encoder, unsigned char flags, unsigned char speed, std::vector< unsigned char > *midiMessage) |
| Called when a encoder has been turned left (decrement). Virtual. | |
| virtual void | onEncoderStart (unsigned char encoder, unsigned char flags, std::vector< unsigned char > *midiMessage) |
| Called at the start of the encoder movement. Virtual. | |
| virtual void | onEncoderStop (unsigned char encoder, unsigned char flags, std::vector< unsigned char > *midiMessage) |
| Called at the stop of the encoder movement. Virtual. | |
| virtual void | onReceiveMidiMessage (unsigned char status, unsigned char data1, unsigned char data2) |
| Called when a midi message has been received from the midi in port of KDj (MIDI MERGER). Virtual. | |
This class provides a platform-independent API for realtime high level i/o communication with KDJ devices. It allows one to set the mode of operation of the controller, turn on/off the leds, request controls states (leds, buttons) and values (potentiometers).
The class also provides several "handler" methods (onButtonPress, onPotentiometerChange... ), these do nothing in the base class, but a derived class can override them to implement any special processing that should occur as a result of their event actions.
Create multiple instances of this class to connect to more than one Kontrol Dj device at the same time.
Definition at line 303 of file KontrolDj.h.
|
|
Defined KDjExtended buttons.
Definition at line 308 of file KontrolDj.h. |
|
|
Defined KDjExtended encoders.
Definition at line 345 of file KontrolDj.h. |
|
|
Defined KDjExtended potentiometers.
Definition at line 354 of file KontrolDj.h. |
|
|
Defined KDjExtended leds.
Definition at line 372 of file KontrolDj.h. |
|
|
Default constructor. An exception will be thrown if a system initialization error occurs. Definition at line 396 of file KontrolDj.h. |
|
|
The destructor closes any open device connections.
Definition at line 399 of file KontrolDj.h. |
|
|
Request for the current mode of operation of the controller. Kontrol Dj controller can operate in two modes, master and slave. The main difference between the both modes is that in master mode the leds are managed automatically by the controller and in slave mode you must to turn on/off the leds. An exception is thrown if an error occurs while attempting to get the controller mode.
|
|
|
Set the current mode of operation of the controller. An exception is thrown if an error occurs while attempting to set the controller mode.
|
|
|
Request for the current midi merger state of the controller. Kontrol Dj controller midi merger functionallity can be enabled or disabled. Incoming midi messages (throught midi in port) can be merger to midi out port and/or usb out port. An exception is thrown if an error occurs while attempting to get the midi merger state.
|
|
||||||||||||||||
|
Set the current midi merger state of the controller. An exception is thrown if an error occurs while attempting to set the midi merger state.
|
|
|
Request for the led state (on / off). An exception is thrown if an error occurs while attempting to get the led state.
|
|
||||||||||||
|
Set the state of a led (on / off). An exception is thrown if an error occurs while attempting to set the led state.
|
|
|
Request for the states of all the leds (on / off). An exception is thrown if an error occurs while attempting to get all the leds states.
|
|
|
Set the states of all the leds (on / off). An exception is thrown if an error occurs while attempting to set all the leds states.
|
|
|
Request for the states of all the buttons (up / down). An exception is thrown if an error occurs while attempting to get all the buttons states.
|
|
|
Request for the potentiometer value (8 bits). An exception is thrown if an error occurs while attempting to get the potentiometer value.
|
|
|
Read a message from the receive buffer queue which is processed. Each time this method is called a message from the receive buffer queue is read. The message is processed, if the message has an avaliable event "handler" method then it will be called. |
|
|
Called when the mode of operation of the controller has been received. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetControllerMode event handler to implement any special processing that should occur as a result of getting the controller mode of operation.
Definition at line 533 of file KontrolDj.h. |
|
||||||||||||||||
|
This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetMidiMergerState event handler to implement any special processing that should occur as a result of getting the midi merger state of the controller.
Definition at line 549 of file KontrolDj.h. |
|
||||||||||||
|
Called when the state of a led has been received. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetLedState event handler to implement any special processing that should occur as a result of getting the state of a led.
Definition at line 564 of file KontrolDj.h. |
|
|
Called when the states of all the leds has been received. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetLedsStates event handler to implement any special processing that should occur as a result of getting the states of all the leds.
Definition at line 582 of file KontrolDj.h. |
|
|
Called when the states of all the buttons has been received. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetButtonsStates event handler to implement any special processing that should occur as a result of getting the states of all the buttons.
Definition at line 600 of file KontrolDj.h. |
|
||||||||||||
|
Called when the value of a potentiometer has been received. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onGetPotentiometerValue event handler to implement any special processing that should occur as a result of getting the value of a potentiometer.
Definition at line 613 of file KontrolDj.h. |
|
||||||||||||||||
|
Called when a button has been pressed. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onButtonPress event handler to implement any special processing that should occur as a result of pressing a button.
Definition at line 629 of file KontrolDj.h. |
|
||||||||||||||||
|
Called when a button has been released. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onButtonRelease event handler to implement any special processing that should occur as a result of releasing a button.
Definition at line 645 of file KontrolDj.h. |
|
||||||||||||||||||||
|
Called when a potentiometer has been moved/turned. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onPotentiometerChange event handler to implement any special processing that should occur as a result of moving/turning a potentiometer.
Definition at line 662 of file KontrolDj.h. |
|
||||||||||||||||||||
|
Called when a encoder has been turned right (increment). Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onEncoderIncrement event handler to implement any special processing that should occur as a result of turning right a encoder.
Definition at line 679 of file KontrolDj.h. |
|
||||||||||||||||||||
|
Called when a encoder has been turned left (decrement). Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onEncoderDecrement event handler to implement any special processing that should occur as a result of turning left a encoder.
Definition at line 696 of file KontrolDj.h. |
|
||||||||||||||||
|
Called at the start of the encoder movement. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onEncoderStart event handler to implement any special processing that should occur as a result of starting a encoder movement (turn right or turn left).
Definition at line 712 of file KontrolDj.h. |
|
||||||||||||||||
|
Called at the stop of the encoder movement. Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onEncoderStop event handler to implement any special processing that should occur as a result of stopping a encoder movement (turn right or turn left).
Definition at line 728 of file KontrolDj.h. |
|
||||||||||||||||
|
Called when a midi message has been received from the midi in port of KDj (MIDI MERGER). Virtual. This method does nothing in the base class, it is avaliable for the derived class to override. Use the onReceiveMidiMessage event handler to implement any special processing that should occur as a result of getting a midi message from the midi in port of the KDj controller.
Definition at line 741 of file KontrolDj.h. |
![]() |
Copyright © 2005 by LSD Software. All Rights Reserved. Maintained by LSD, info at kontrol-dj.com |