Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix - When changing midi channel on a Midi Preset, show it as popup #1552

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/deluge/gui/views/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,22 @@ void View::navigateThroughPresetsForInstrumentClip(int32_t offset, ModelStackWit
if (display->haveOLED()) {
deluge::hid::display::OLED::sendMainImage();
}

// Special case: when it is a saved MIDI preset (with a name), then we need to show the channel in a popup, as
// the name will print over the midi channel and we can't see it while changing it
if (outputType == OutputType::MIDI_OUT && newInstrument->name.getLength() > 0) {
char buffer[12];
if (newChannel < 16) {
slotToString(newChannel + 1, newChannelSuffix, buffer, 1);
}
else if (newChannel == MIDI_CHANNEL_MPE_LOWER_ZONE || newChannel == MIDI_CHANNEL_MPE_UPPER_ZONE) {
strcpy(buffer, (newChannel == MIDI_CHANNEL_MPE_LOWER_ZONE) ? "Lower" : "Upper");
}
else {
strcpy(buffer, "Transpose");
}
display->popupTextTemporary(buffer);
}
}

// Or if we're on a Kit or Synth...
Expand Down
Loading