diff options
author | Jan Lentfer <jan.lentfer@web.de> | 2018-08-18 21:52:43 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-08-18 23:06:32 +0200 |
commit | 74ad41f8d91ca80c07ab4467f9bd77792995fd2e (patch) | |
tree | 66b7d67a73c38ec08a976477c4dd4173fe7cb701 /libs/surfaces/launch_control_xl/launch_control_xl.cc | |
parent | 51b5c01b8bbe65075d955f78f1c0bef4a1b53293 (diff) |
LCXL: Add configuration option for handling master
In the Controller's settings you can now
choose between two operation modes:
1) 8 track mode
2) 7 track plus master mode
In case 2) fader 8 is fixed on the master
Diffstat (limited to 'libs/surfaces/launch_control_xl/launch_control_xl.cc')
-rw-r--r-- | libs/surfaces/launch_control_xl/launch_control_xl.cc | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index 65588a7f79..0ea2f33f3c 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -81,9 +81,6 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s) /* master cannot be removed, so no need to connect to going-away signal */ master = session->master_out (); - /* the master bus will always be on the last channel on the lcxl */ - stripable[7] = master; - run_event_loop (); @@ -104,6 +101,8 @@ LaunchControlXL::LaunchControlXL (ARDOUR::Session& s) session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl); switch_bank (bank_start); + + set_fader8master(use_fader8master); } LaunchControlXL::~LaunchControlXL () @@ -834,8 +833,15 @@ LaunchControlXL::switch_bank (uint32_t base) boost::shared_ptr<Stripable> s[8]; uint32_t different = 0; + int stripable_counter; + + if (LaunchControlXL::use_fader8master) { + stripable_counter = 7; + } else { + stripable_counter = 8; + } - for (int n = 0; n < 7; ++n) { + for (int n = 0; n < stripable_counter; ++n) { s[n] = session->get_remote_nth_stripable (base+n, PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::VCA)); if (s[n] != stripable[n]) { different++; @@ -854,7 +860,7 @@ LaunchControlXL::switch_bank (uint32_t base) stripable_connections.drop_connections (); - for (int n = 0; n < 7; ++n) { + for (int n = 0; n < stripable_counter; ++n) { stripable[n] = s[n]; } @@ -908,3 +914,12 @@ void LaunchControlXL::set_track_mode (TrackMode mode) { break; } } + +void +LaunchControlXL::set_fader8master (bool yn) +{ + if (yn) { + stripable[7] = master; + } + switch_bank(bank_start); +} |