Added checking for midi channel when midi learning is activated.

dev
Holger Wirtz 2 years ago
parent a6b4e56048
commit acc4740ff8
  1. 13
      MicroDexed.ino

@ -908,17 +908,24 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) {
// check for MIDI learn mode
if (midi_learn_var != NULL) {
*midi_learn_var = inNumber;
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_drum_midi_note))
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_drum_midi_note) && inChannel == configuration.drums.drum_midi_channel)
LCDML.OTHER_jumpToFunc(UI_func_drum_midi_note);
else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_lowest_note)) {
else {
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) {
if (inChannel == configuration.dexed[selected_instance_id].midi_channel) {
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_lowest_note)) {
if (inNumber > configuration.dexed[selected_instance_id].highest_note)
configuration.dexed[selected_instance_id].highest_note = inNumber;
LCDML.OTHER_jumpToFunc(UI_func_lowest_note);
} else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_highest_note))
} else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_highest_note)) {
if (inNumber < configuration.dexed[selected_instance_id].lowest_note)
configuration.dexed[selected_instance_id].lowest_note = inNumber;
LCDML.OTHER_jumpToFunc(UI_func_highest_note);
}
}
}
}
}
// Check for MicroDexed
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) {

Loading…
Cancel
Save