13
0

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
This commit is contained in:
Jan Lentfer 2018-08-13 22:10:47 +02:00
parent d3e7fa0ebf
commit 6434bf9dd3

View File

@ -461,13 +461,25 @@ LaunchControlXL::handle_knob_message (Knob* knob)
boost::shared_ptr<AutomationControl> ac;
if (knob->id() < 8) { // sendA
if (knob->id() < 8) { // sendA knob
if (buttons_down.find(Device) != buttons_down.end()) { // Device button hold
ac = stripable[chan]->trim_control();
} else if (knob->id() >= 8 && knob->id() < 16) { // sendB
} 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 if (knob->id() >= 16 && knob->id() < 24) { // pan
} else {
ac = stripable[chan]->pan_azimuth_control();
}
}
if (ac && check_pick_up(knob, ac)) {
ac->set_value ( ac->interface_to_internal( knob->value() / 127.0), PBD::Controllable::UseGroup );