Skip to content

Commit

Permalink
Disable sidebar actions while VU meter is shown (#1551)
Browse files Browse the repository at this point in the history
Disabled interacting with sidebar while VU meter is displayed

Volume mod button now blinks when VU meter is on and being displayed

update documentation
  • Loading branch information
seangoodvibes authored and m-m-adams committed Mar 23, 2024
1 parent f5a5e52 commit 38b3b2d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions src/deluge/gui/views/arranger_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/deluge/gui/views/automation_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions src/deluge/gui/views/performance_session_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/deluge/gui/views/session_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 7 additions & 1 deletion src/deluge/gui/views/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 38b3b2d

Please sign in to comment.