From 3893f62657d0d636c6cf9f3c77797e7a0cf968d5 Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Thu, 26 Nov 2015 06:55:25 -0800 Subject: [PATCH] Mackie Control: Disable Selected group in User/Selected view mode to allow individual adjustment. --- .../mackie/mackie_control_protocol.cc | 46 ++++++++++++++----- mcp/midikbd.device | 16 +++++++ 2 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 mcp/midikbd.device diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 4db555b837..9e05dbc5a3 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -51,6 +51,7 @@ #include "ardour/panner.h" #include "ardour/panner_shell.h" #include "ardour/route.h" +#include "ardour/route_group.h" #include "ardour/session.h" #include "ardour/tempo.h" #include "ardour/track.h" @@ -290,38 +291,59 @@ MackieControlProtocol::get_sorted_routes() switch (_view_mode) { case Mixer: - sorted.push_back (*it); + if (route->route_group()) { + route->route_group()->set_active (true, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); break; case AudioTracks: - if (is_audio_track(*it)) { - sorted.push_back (*it); + if (is_audio_track(route)) { + if (route->route_group()) { + route->route_group()->set_active (true, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); } break; case Busses: - if (!is_track(*it)) { - sorted.push_back (*it); + if (!is_track(route)) { + if (route->route_group()) { + route->route_group()->set_active (true, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); } break; - case MidiTracks: // for now aux and buss are same - if (is_midi_track(*it)) { - sorted.push_back (*it); + case MidiTracks: + if (is_midi_track(route)) { + if (route->route_group()) { + route->route_group()->set_active (true, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); } break; case Plugins: break; case Auxes: // for now aux and buss are same - if (!is_track(*it)) { - sorted.push_back (*it); + if (!is_track(route)) { + if (route->route_group()) { + route->route_group()->set_active (true, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); } break; case Selected: // For example: a group - if (selected(*it)) { - sorted.push_back (*it); + if (selected(route)) { + /* Selected may be a group in which case we want to + * control each track separately. + */ + if (route->route_group()) { + route->route_group()->set_active (false, this); + } + sorted.push_back (route); remote_ids.insert (route->remote_control_id()); } break; diff --git a/mcp/midikbd.device b/mcp/midikbd.device new file mode 100644 index 0000000000..9212623269 --- /dev/null +++ b/mcp/midikbd.device @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + -- 2.30.2