summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-09-22 14:41:49 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-27 14:59:31 -0500
commitf35c5fd5a6f7d0ad1c0be9727f5d4d0bf41db70d (patch)
treed45157b9937c03d3dc5b4d0622b8b59f79001120 /libs/surfaces
parent3aa0676f706ca7d42f341ff71f37704728b3edc7 (diff)
push2: master button now does something useful
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/push2/buttons.cc18
-rw-r--r--libs/surfaces/push2/push2.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc
index cc153c22d0..035d7b2e5f 100644
--- a/libs/surfaces/push2/buttons.cc
+++ b/libs/surfaces/push2/buttons.cc
@@ -141,7 +141,7 @@ Push2::build_maps ()
MAKE_COLOR_BUTTON_PRESS (Lower6, 25, &Push2::button_lower_6);
MAKE_COLOR_BUTTON_PRESS (Lower7, 26, &Push2::button_lower_7);
MAKE_COLOR_BUTTON_PRESS (Lower8, 27, &Push2::button_lower_8);
- MAKE_COLOR_BUTTON (Master, 28);
+ MAKE_COLOR_BUTTON_PRESS (Master, 28, &Push2::button_master);
MAKE_COLOR_BUTTON_PRESS (Mute, 60, &Push2::button_mute);
MAKE_COLOR_BUTTON_PRESS_RELEASE_LONG (Solo, 61, &Push2::relax, &Push2::button_solo, &Push2::button_solo_long_press);
MAKE_COLOR_BUTTON_PRESS (Stop, 29, &Push2::button_stop);
@@ -583,6 +583,22 @@ Push2::button_mix_press ()
}
}
+void
+Push2::button_master ()
+{
+ boost::shared_ptr<Stripable> master = session->master_out();
+
+ if (!master) {
+ return;
+ }
+
+ ControlProtocol::SetStripableSelection (master);
+
+ if (_current_layout != track_mix_layout) {
+ set_current_layout (track_mix_layout);
+ }
+}
+
std::string
Push2::button_name_by_id (ButtonID id)
{
diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h
index 88ecd52e93..e2da7e7ff2 100644
--- a/libs/surfaces/push2/push2.h
+++ b/libs/surfaces/push2/push2.h
@@ -469,6 +469,7 @@ class Push2 : public ARDOUR::ControlProtocol
void button_fwd4 ();
void button_add_track ();
void button_stop ();
+ void button_master ();
void button_shift_press ();
void button_shift_release ();
void button_shift_long_press ();