LCXL: Mixbus secondary function for Ctrl buttons
authorJan Lentfer <jan.lentfer@web.de>
Mon, 20 Aug 2018 19:43:21 +0000 (21:43 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 22 Aug 2018 17:56:10 +0000 (19:56 +0200)
    In Mixbus holding Device and pressing
    one (or many) of the Track Control buttons
    will toggle the Master Assignment for the
    corresponding track

libs/surfaces/launch_control_xl/controllers.cc

index 764f801edf6d1763e773185215480601a083ff91..9552fd71504f910b3b7781971928aa8e3fd39512 100644 (file)
@@ -485,6 +485,20 @@ LaunchControlXL::button_track_control(uint8_t n) {
        if (!stripable[n]) {
                return;
        }
+
+       if (buttons_down.find(Device) != buttons_down.end()) {
+               DEBUG_TRACE (DEBUG::LaunchControlXL, "DEVICE BUTTON HOLD\n");
+#ifdef MIXBUS
+               if (stripable[n] != master) {
+                       DEBUG_TRACE (DEBUG::LaunchControlXL, "MIXBUS Master Assign\n");
+                       stripable[n]->master_send_enable_controllable()->set_value (!stripable[n]->master_send_enable_controllable()->get_value(), PBD::Controllable::UseGroup);
+               }
+#else
+               /* something useful for Ardour */
+#endif
+               return;
+       }
+
        boost::shared_ptr<AutomationControl> ac = get_ac_by_state(n);
 
        if (ac) {