@@ -1534,7 +1534,7 @@ ActionResult InstrumentClipView::padAction(int32_t x, int32_t y, int32_t velocit
1534
1534
if (x == kDisplayWidth + 1 ) {
1535
1535
1536
1536
// "Learning" to this audition pad:
1537
- if (isUIModeActiveExclusively (UI_MODE_MIDI_LEARN)) {
1537
+ if (isUIModeActiveExclusively (UI_MODE_MIDI_LEARN)) [[unlikely]] {
1538
1538
if (getCurrentUI () == this ) {
1539
1539
if (sdRoutineLock) {
1540
1540
return ActionResult::REMIND_ME_OUTSIDE_CARD_ROUTINE;
@@ -1554,7 +1554,7 @@ ActionResult InstrumentClipView::padAction(int32_t x, int32_t y, int32_t velocit
1554
1554
}
1555
1555
1556
1556
// Changing the scale:
1557
- else if (isUIModeActiveExclusively (UI_MODE_SCALE_MODE_BUTTON_PRESSED)) {
1557
+ else if (isUIModeActiveExclusively (UI_MODE_SCALE_MODE_BUTTON_PRESSED)) [[unlikely]] {
1558
1558
if (sdRoutineLock) {
1559
1559
return ActionResult::REMIND_ME_OUTSIDE_CARD_ROUTINE;
1560
1560
}
@@ -1571,6 +1571,25 @@ ActionResult InstrumentClipView::padAction(int32_t x, int32_t y, int32_t velocit
1571
1571
}
1572
1572
}
1573
1573
}
1574
+ else if (currentUIMode == UI_MODE_HOLDING_SAVE_BUTTON && velocity) [[unlikely]] {
1575
+ Instrument* instrument = getCurrentInstrument ();
1576
+
1577
+ bool isKit = (instrument->type == OutputType::KIT);
1578
+ if (isKit) {
1579
+ // this is fine - since it's a kit we don't need the song, it's only used to check scale for
1580
+ // instrument clips
1581
+ NoteRow* noteRow =
1582
+ getCurrentInstrumentClip ()->getNoteRowOnScreen (y, nullptr , nullptr ); // On *current* clip!
1583
+
1584
+ if (noteRow && noteRow->drum && noteRow->drum ->type == DrumType::SOUND) {
1585
+ auto * drum = static_cast <SoundDrum*>(noteRow->drum );
1586
+ currentUIMode = UI_MODE_NONE;
1587
+ indicator_leds::setLedState (IndicatorLED::SAVE, false );
1588
+ saveKitRowUI.setup (static_cast <SoundDrum*>(drum), ¬eRow->paramManager );
1589
+ openUI (&saveKitRowUI);
1590
+ }
1591
+ }
1592
+ }
1574
1593
1575
1594
// Actual basic audition pad press:
1576
1595
else if (!velocity || isUIModeWithinRange (auditionPadActionUIModes)) {
0 commit comments