summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJan Lentfer <jan.lentfer@web.de>2018-08-12 20:27:18 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2018-08-13 14:53:43 -0400
commitd3e7fa0ebfa4728383dc311bd0c66321c95816bf (patch)
treeb0213c842d4dbf2bad25d99cf6e79c4e45eeb296 /libs
parentaad354e15fcc4de48c26522051535b39d023cf3a (diff)
LCXL: implement mute, solo and record arm toggles
Holding the Device button and pressing one of mute, solo and record arm will toggle selected tracks (use Track Focus buttons) accordingly.
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/launch_control_xl/controllers.cc30
-rw-r--r--libs/surfaces/launch_control_xl/launch_control_xl.h6
2 files changed, 33 insertions, 3 deletions
diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc
index de9e0aa416..65608e9d19 100644
--- a/libs/surfaces/launch_control_xl/controllers.cc
+++ b/libs/surfaces/launch_control_xl/controllers.cc
@@ -451,6 +451,36 @@ LaunchControlXL::button_device_long_press()
}
+void
+LaunchControlXL::button_mute()
+{
+ if (buttons_down.find(Device) != buttons_down.end()) {
+ access_action ("Editor/track-mute-toggle");
+ } else {
+ button_track_mode(TrackMute);
+ }
+}
+
+void
+LaunchControlXL::button_solo()
+{
+ if (buttons_down.find(Device) != buttons_down.end()) {
+ access_action ("Editor/track-solo-toggle");
+ } else {
+ button_track_mode(TrackSolo);
+ }
+}
+
+void
+LaunchControlXL::button_record()
+{
+ if (buttons_down.find(Device) != buttons_down.end()) {
+ access_action ("Editor/track-record-enable-toggle");
+ } else {
+ button_track_mode(TrackRecord);
+ }
+}
+
bool
LaunchControlXL::button_long_press_timeout (ButtonID id, Button* button)
{
diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.h b/libs/surfaces/launch_control_xl/launch_control_xl.h
index d4747767c8..9d7112a8eb 100644
--- a/libs/surfaces/launch_control_xl/launch_control_xl.h
+++ b/libs/surfaces/launch_control_xl/launch_control_xl.h
@@ -457,9 +457,9 @@ private:
void button_device();
void button_device_long_press();
void button_track_mode(TrackMode state);
- void button_mute() { button_track_mode(TrackMute); }
- void button_solo() { button_track_mode(TrackSolo); }
- void button_record() { button_track_mode(TrackRecord); }
+ void button_mute();
+ void button_solo();
+ void button_record();
void button_select_up();
void button_select_down();
void button_select_left();