From 51c03f1f50a4caf3f0c55f92d7d7507d3a17070c Mon Sep 17 00:00:00 2001 From: Sean Ditny <138174805+seangoodvibes@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:28:38 -0400 Subject: [PATCH] Disable sidebar actions while VU meter is shown (#1551) Disabled interacting with sidebar while VU meter is displayed Volume mod button now blinks when VU meter is on and being displayed update documentation --- docs/community_features.md | 1 + src/deluge/gui/views/arranger_view.cpp | 5 +++++ src/deluge/gui/views/automation_view.cpp | 5 +++++ src/deluge/gui/views/performance_session_view.cpp | 4 ++++ src/deluge/gui/views/session_view.cpp | 5 +++++ src/deluge/gui/views/view.cpp | 8 +++++++- 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/community_features.md b/docs/community_features.md index dc86d4c383..fa08458ef7 100644 --- a/docs/community_features.md +++ b/docs/community_features.md @@ -357,6 +357,7 @@ Here is a list of features that have been added to the firmware as a list, group - turn `Affect Entire` on - select the `Volume mod button` - press the `Volume mod button` again to toggle the VU Meter on / off. + - note: the `Volume mod button` will blink when the VU meter is on and displayed - The VU meter will stop rendering if you switch mod button selections, turn affect entire off, select a clip, or exit Song/Arranger views. - The VU meter will render the decibels below clipping on the grid with the colours green, orange and red. diff --git a/src/deluge/gui/views/arranger_view.cpp b/src/deluge/gui/views/arranger_view.cpp index 0080978a9a..944f04c696 100644 --- a/src/deluge/gui/views/arranger_view.cpp +++ b/src/deluge/gui/views/arranger_view.cpp @@ -930,6 +930,11 @@ ActionResult ArrangerView::padAction(int32_t x, int32_t y, int32_t velocity) { return ActionResult::REMIND_ME_OUTSIDE_CARD_ROUTINE; } + // don't interact with sidebar if VU Meter is displayed + if (x >= kDisplayWidth && view.displayVUMeter) { + return ActionResult::DEALT_WITH; + } + // Audition pad if (x == kDisplayWidth + 1) { return handleAuditionPadAction(y, velocity, this); diff --git a/src/deluge/gui/views/automation_view.cpp b/src/deluge/gui/views/automation_view.cpp index 0861cabe96..ac67c911e9 100644 --- a/src/deluge/gui/views/automation_view.cpp +++ b/src/deluge/gui/views/automation_view.cpp @@ -1875,6 +1875,11 @@ ActionResult AutomationView::padAction(int32_t x, int32_t y, int32_t velocity) { } } + // don't interact with sidebar if VU Meter is displayed + if (onArrangerView && x >= kDisplayWidth && view.displayVUMeter) { + return ActionResult::DEALT_WITH; + } + Output* output = clip->output; OutputType outputType = output->type; diff --git a/src/deluge/gui/views/performance_session_view.cpp b/src/deluge/gui/views/performance_session_view.cpp index 9c602b48e6..3ffd1f4b57 100644 --- a/src/deluge/gui/views/performance_session_view.cpp +++ b/src/deluge/gui/views/performance_session_view.cpp @@ -911,6 +911,10 @@ ActionResult PerformanceSessionView::padAction(int32_t xDisplay, int32_t yDispla uiNeedsRendering(this); // re-render pads } else if (xDisplay >= kDisplayWidth) { + // don't interact with sidebar if VU Meter is displayed + if (view.displayVUMeter) { + return ActionResult::DEALT_WITH; + } // if in arranger view if (currentSong->lastClipInstanceEnteredStartPos != -1) { // pressing the first column in sidebar to trigger sections / clips diff --git a/src/deluge/gui/views/session_view.cpp b/src/deluge/gui/views/session_view.cpp index c57029ff49..f72f2221bb 100644 --- a/src/deluge/gui/views/session_view.cpp +++ b/src/deluge/gui/views/session_view.cpp @@ -611,6 +611,11 @@ void SessionView::beginEditingSectionRepeatsNum() { } ActionResult SessionView::padAction(int32_t xDisplay, int32_t yDisplay, int32_t on) { + // don't interact with sidebar if VU Meter is displayed + if (xDisplay >= kDisplayWidth && view.displayVUMeter) { + return ActionResult::DEALT_WITH; + } + if (currentSong->sessionLayout == SessionLayoutType::SessionLayoutTypeGrid) { return gridHandlePads(xDisplay, yDisplay, on); } diff --git a/src/deluge/gui/views/view.cpp b/src/deluge/gui/views/view.cpp index ee44bb51a0..9a4d529df3 100644 --- a/src/deluge/gui/views/view.cpp +++ b/src/deluge/gui/views/view.cpp @@ -1517,10 +1517,16 @@ void View::setModLedStates() { for (int32_t i = 0; i < kNumModButtons; i++) { bool on = (i == modKnobMode); + // if you're in a song view and volume mod button is selected and VU meter is enabled + // blink volume mod led + if (itsTheSong && on && modKnobMode == 0 && view.displayVUMeter) { + indicator_leds::blinkLed(indicator_leds::modLed[i]); + } // if you're in the Automation View Automation Editor, turn off Mod LED's - if ((getRootUI() == &automationView) && !automationView.isOnAutomationOverview()) { + else if ((getRootUI() == &automationView) && !automationView.isOnAutomationOverview()) { indicator_leds::setLedState(indicator_leds::modLed[i], false); } + // otherwise update mod led's to reflect current mod led selection else { indicator_leds::setLedState(indicator_leds::modLed[i], on); }