From 6532d29d85bb676459ecaff81e7d06129e0e424c Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sat, 27 Nov 2021 19:05:04 +0100 Subject: [PATCH] Fix and DEBUG output. --- MicroDexed.ino | 8 +++++++- dexed_sd.cpp | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 2cc1545..750fa1c 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -932,6 +932,9 @@ void loop() ******************************************************************************/ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) { + // + // Drum Sampler + // #if NUM_DRUMS > 0 if (activesample < 6 && seq.seq_running == false && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor) ) // live play pitched sample { @@ -1054,12 +1057,15 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) #endif } +// +// E-Piano +// #if defined(USE_EPIANO) if (configuration.epiano.midi_channel == MIDI_CHANNEL_OMNI || configuration.epiano.midi_channel == inChannel) { if (inNumber >= configuration.epiano.lowest_note && inNumber <= configuration.epiano.highest_note) { - ep.noteOn(inNumber + configuration.epiano.transpose - 12, inVelocity); + ep.noteOn(inNumber + configuration.epiano.transpose, inVelocity); #ifdef DEBUG char note_name[4]; getNoteName(note_name, inNumber); diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 729703c..9be8d89 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -1537,8 +1537,22 @@ void get_sd_performance_name_json(uint8_t number) for (uint8_t i = 0; i < FILENAME_LEN; i++) { seq.seq_name_temp[i] = data_json["seq_name"][i]; } +#ifdef DEBUG + Serial.print(F("Get performance name for ")); + Serial.print(number); + Serial.print(F(": ")); + Serial.print(seq.seq_name_temp); + Serial.println(); +#endif } - +#ifdef DEBUG + else + { + Serial.print(F("Cannot get performance name for ")); + Serial.print(number); + Serial.println(); + } +#endif } } } @@ -1595,7 +1609,7 @@ bool load_sd_seq_sub_vel_json(uint8_t number) #ifdef DEBUG else { - Serial.print(F("E : Cannot open ")); + Serial.print(F("E: Cannot open ")); Serial.print(filename); Serial.println(F(" on SD.")); }