summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lentfer <jan.lentfer@web.de>2018-08-13 22:10:47 +0200
committerJan Lentfer <jan.lentfer@web.de>2018-08-13 22:10:47 +0200
commit6434bf9dd34c3b32f6ba41f668562af0ae740c8a (patch)
tree2bb7f95fa2c30d5fef27c3c75ea1638dfea9398b
parentd3e7fa0ebfa4728383dc311bd0c66321c95816bf (diff)
LCXL: Reorganize knobs functions
Make the knobs work as printed on the controller Holding the Device button will enable extra functionality: Send A -> Trim Control Pan -> Stereo Width
-rw-r--r--libs/surfaces/launch_control_xl/launch_control_xl.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc
index 6f571794a8..92999b6bdb 100644
--- a/libs/surfaces/launch_control_xl/launch_control_xl.cc
+++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc
@@ -461,12 +461,24 @@ LaunchControlXL::handle_knob_message (Knob* knob)
boost::shared_ptr<AutomationControl> ac;
- if (knob->id() < 8) { // sendA
- ac = stripable[chan]->trim_control();
- } else if (knob->id() >= 8 && knob->id() < 16) { // sendB
- ac = stripable[chan]->pan_width_control();
- } else if (knob->id() >= 16 && knob->id() < 24) { // pan
- ac = stripable[chan]->pan_azimuth_control();
+ if (knob->id() < 8) { // sendA knob
+ if (buttons_down.find(Device) != buttons_down.end()) { // Device button hold
+ ac = stripable[chan]->trim_control();
+ } else {
+ ac = stripable[chan]->send_level_controllable (0);
+ }
+ } else if (knob->id() >= 8 && knob->id() < 16) { // sendB knob
+ if (buttons_down.find(Device) != buttons_down.end()) { // Device button hold
+ /* something */
+ } else {
+ ac = stripable[chan]->send_level_controllable (1);
+ }
+ } else if (knob->id() >= 16 && knob->id() < 24) { // pan knob
+ if (buttons_down.find(Device) != buttons_down.end()) { // Device button hold
+ ac = stripable[chan]->pan_width_control();
+ } else {
+ ac = stripable[chan]->pan_azimuth_control();
+ }
}
if (ac && check_pick_up(knob, ac)) {