From c4cececfb723ba799ce051c21cc8dec4316d4267 Mon Sep 17 00:00:00 2001 From: Franke Burgarino Date: Wed, 24 Sep 2025 11:29:27 -0500 Subject: [PATCH] MCU: fix monitor/immersive mute button Monitor/Immersive mute on mackie controllers previously was not toggling the actual monitor cut control that is tied to the GUI button. --- libs/surfaces/mackie/strip.cc | 29 ++++++++++++++++++++++++++++- libs/surfaces/mackie/strip.h | 1 + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 84bb7d629e..12bc445993 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -233,7 +233,9 @@ Strip::set_stripable (std::shared_ptr r, bool /*with_messages*/) _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_solo_changed, this), ui_context()); _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_mute_changed, this), ui_context()); - + if (_stripable->is_monitor() || _stripable->is_surround_master()) { + _stripable->monitor_control()->cut_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_monitor_cut_changed, this), ui_context()); + } _stripable->MappedControlsChanged.connect (stripable_connections, MISSING_INVALIDATOR, std::bind (&Strip::notify_subview_type_changed, this), ui_context()); std::shared_ptr pan_control = _stripable->pan_azimuth_control(); @@ -338,6 +340,26 @@ Strip::notify_mute_changed () } } +void +Strip::notify_monitor_cut_changed () +{ + DEBUG_TRACE (DEBUG::MackieControl, "Monitor cut changed\n"); + if ((_stripable->is_monitor() || _stripable->is_surround_master()) && _mute) { + _surface->write (_mute->set_state (_stripable->monitor_control()->cut_control()->get_value() ? 1.0 : 0.0)); + if (_stripable->mute_control()->get_value() != _stripable->monitor_control()->cut_control()->get_value()) { + Controllable::GroupControlDisposition gcd; + + if (_surface->mcp().main_modifier_state() & MackieControlProtocol::MODIFIER_SHIFT) { + gcd = Controllable::InverseGroup; + } else { + gcd = Controllable::UseGroup; + } + + _stripable->mute_control()->set_value (_stripable->monitor_control()->cut_control()->get_value() ? 1.0 : 0.0, gcd); + } + } +} + void Strip::notify_record_enable_changed () { @@ -704,6 +726,11 @@ Strip::handle_button (Button& button, ButtonState bs) (*c)->set_value (new_value, gcd); } + if (_stripable->is_monitor() || _stripable->is_surround_master()) { + std::shared_ptr mp = _stripable->monitor_control(); + mp->set_cut_all (!mp->cut_all()); + } + } else { DEBUG_TRACE (DEBUG::MackieControl, "remove button on release\n"); _surface->mcp().remove_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index); diff --git a/libs/surfaces/mackie/strip.h b/libs/surfaces/mackie/strip.h index 98faee1c76..9fc305fcfd 100644 --- a/libs/surfaces/mackie/strip.h +++ b/libs/surfaces/mackie/strip.h @@ -156,6 +156,7 @@ private: void notify_solo_changed (); void notify_mute_changed (); + void notify_monitor_cut_changed (); void notify_record_enable_changed (); void notify_subview_type_changed (); void notify_gain_changed (bool force_update = true);