Skip to content

Commit

Permalink
Change Transpose Interval shortcut to avoid interfering with Row Mode…
Browse files Browse the repository at this point in the history
… instant mute workflow (SynthstromAudible#2113)

* Change Transpose Interval shorcut to avoid interfering with Row Mode instant mute workflow

* Nit

* Avoid current transpose scale popup to show if shift pressed
  • Loading branch information
soymonitus committed Jun 10, 2024
1 parent 7474d94 commit 43aa651
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Here is a list of features that have been added to the firmware as a list, group

- ([#1159]) Using the same combo as in a Synth / Midi / CV clip, press and turn `▼︎▲︎` to transpose all scale mode clips
up or down by 1 semitone.
- You can customize the amount of semitones that clips are transposed by, by holding Shift and turning `▼︎▲︎`. The
- You can customize the amount of semitones that clips are transposed by, by holding Shift and pressing and turning `▼︎▲︎`. The
display will show the number of semitones.
- After transposing the display show the new Root Note (and Scale Name if you have an OLED display).
- Does not affect audio clips or kit clips.
Expand Down
15 changes: 7 additions & 8 deletions src/deluge/gui/views/arranger_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ ActionResult ArrangerView::buttonAction(deluge::hid::Button b, bool on, bool inC
}

else if (b == Y_ENC) {
if (on) {
if (on && !Buttons::isShiftButtonPressed()) {
currentSong->displayCurrentRootNoteAndScaleName();
}
}
Expand Down Expand Up @@ -2899,13 +2899,12 @@ ActionResult ArrangerView::verticalEncoderAction(int32_t offset, bool inCardRout

if (Buttons::isButtonPressed(deluge::hid::button::Y_ENC)) {
if (currentUIMode == UI_MODE_NONE) {
currentSong->transpose(offset);
}
return ActionResult::DEALT_WITH;
}
else if (Buttons::isShiftButtonPressed()) {
if (currentUIMode == UI_MODE_NONE) {
currentSong->adjustMasterTransposeInterval(offset);
if (Buttons::isShiftButtonPressed()) {
currentSong->adjustMasterTransposeInterval(offset);
}
else {
currentSong->transpose(offset);
}
}
return ActionResult::DEALT_WITH;
}
Expand Down
12 changes: 7 additions & 5 deletions src/deluge/gui/views/automation_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ bool AutomationView::handleBackAndHorizontalEncoderButtonComboAction(Clip* clip,

// handle by button action if b == Y_ENC
void AutomationView::handleVerticalEncoderButtonAction(bool on) {
if (on && currentUIMode == UI_MODE_NONE) {
if (on && currentUIMode == UI_MODE_NONE && !Buttons::isShiftButtonPressed()) {
if (onArrangerView || getCurrentInstrumentClip()->isScaleModeClip()) {
currentSong->displayCurrentRootNoteAndScaleName();
}
Expand Down Expand Up @@ -2787,10 +2787,12 @@ ActionResult AutomationView::verticalEncoderAction(int32_t offset, bool inCardRo

if (onArrangerView) {
if (Buttons::isButtonPressed(deluge::hid::button::Y_ENC)) {
currentSong->transpose(offset);
}
else if (currentUIMode == UI_MODE_NONE && Buttons::isShiftButtonPressed()) {
currentSong->adjustMasterTransposeInterval(offset);
if (Buttons::isShiftButtonPressed()) {
currentSong->adjustMasterTransposeInterval(offset);
}
else {
currentSong->transpose(offset);
}
}
return ActionResult::DEALT_WITH;
}
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/views/instrument_clip_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ ActionResult InstrumentClipView::buttonAction(deluge::hid::Button b, bool on, bo
}
}

if (on && (currentUIMode == UI_MODE_NONE)) {
if (on && (currentUIMode == UI_MODE_NONE) && !Buttons::isShiftButtonPressed()) {
if (getCurrentInstrumentClip()->isScaleModeClip()) {
currentSong->displayCurrentRootNoteAndScaleName();
}
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/views/performance_session_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ ActionResult PerformanceSessionView::buttonAction(deluge::hid::Button b, bool on
}

else if (b == Y_ENC) {
if (on) {
if (on && !Buttons::isShiftButtonPressed()) {
currentSong->displayCurrentRootNoteAndScaleName();
}
}
Expand Down
12 changes: 7 additions & 5 deletions src/deluge/gui/views/session_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ ActionResult SessionView::buttonAction(deluge::hid::Button b, bool on, bool inCa
}
}
else if (b == Y_ENC) {
if (on) {
if (on && !Buttons::isShiftButtonPressed()) {
currentSong->displayCurrentRootNoteAndScaleName();
}
}
Expand Down Expand Up @@ -1276,10 +1276,12 @@ ActionResult SessionView::horizontalEncoderAction(int32_t offset) {
ActionResult SessionView::verticalEncoderAction(int32_t offset, bool inCardRoutine) {

if (currentUIMode == UI_MODE_NONE && Buttons::isButtonPressed(deluge::hid::button::Y_ENC)) {
currentSong->transpose(offset);
}
else if (currentUIMode == UI_MODE_NONE && Buttons::isShiftButtonPressed()) {
currentSong->adjustMasterTransposeInterval(offset);
if (Buttons::isShiftButtonPressed()) {
currentSong->adjustMasterTransposeInterval(offset);
}
else {
currentSong->transpose(offset);
}
}
else if (currentUIMode == UI_MODE_NONE || currentUIMode == UI_MODE_CLIP_PRESSED_IN_SONG_VIEW
|| currentUIMode == UI_MODE_VIEWING_RECORD_ARMING) {
Expand Down

0 comments on commit 43aa651

Please sign in to comment.