From 3f77c1245cb08551bf80fb0f2628bcb67cd82663 Mon Sep 17 00:00:00 2001 From: Térence Clastres Date: Sun, 19 Aug 2018 18:27:54 +0200 Subject: LCXL: track select: change from 1 strip at a time to whole bank --- libs/surfaces/launch_control_xl/controllers.cc | 4 ++-- libs/surfaces/launch_control_xl/launch_control_xl.cc | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc index 9552fd7150..92967ae36d 100644 --- a/libs/surfaces/launch_control_xl/controllers.cc +++ b/libs/surfaces/launch_control_xl/controllers.cc @@ -526,13 +526,13 @@ LaunchControlXL::button_track_mode(TrackMode state) void LaunchControlXL::button_select_left() { - switch_bank (max (0, bank_start - 1)); + switch_bank (max (0, bank_start - (7 + (LaunchControlXL::use_fader8master)))); } void LaunchControlXL::button_select_right() { - switch_bank (max (0, bank_start + 1)); + switch_bank (max (0, bank_start + 7 + (LaunchControlXL::use_fader8master))); } void diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index f92d6125aa..dc2cd2bfa1 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -852,7 +852,7 @@ LaunchControlXL::switch_bank (uint32_t base) boost::shared_ptr s[8]; uint32_t different = 0; - int stripable_counter; + uint8_t stripable_counter; if (LaunchControlXL::use_fader8master) { stripable_counter = 7; @@ -867,16 +867,17 @@ LaunchControlXL::switch_bank (uint32_t base) } } - if (sl && sr) { - write(sl->state_msg((base))); - write(sr->state_msg((s[1] != 0))); - } - if (!s[0]) { /* not even the first stripable exists, do nothing */ return; } + if (sl && sr) { + boost::shared_ptr next_base = session->get_remote_nth_stripable (base+8, PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::VCA)); + write(sl->state_msg((base))); + write(sr->state_msg((next_base != 0))); + } + stripable_connections.drop_connections (); for (int n = 0; n < stripable_counter; ++n) { -- cgit v1.2.3