From a4bc2b18448594c4a46e47208c4f7d7ec53c3c2b Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 15 Feb 2024 12:39:33 +0100 Subject: [PATCH] Small fixes. --- MicroDexed.ino | 10 +++++++++- UI.hpp | 2 +- dexed_sd.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 3238ee4..48894d8 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -385,6 +385,14 @@ void setup() { #ifdef DEBUG setup_debug_message(); #endif +#if defined(MIDI_DEVICE_USB_HOST_SERIAL) + display.clear(); + display.setCursor(0, 0); + display.print(F("WAIT FOR USBHOST")); + display.setCursor(0, 1); + display.print(F("DEVICE")); + Serial.println(F("Waiting for MIDI devices on USB-Host...")); +#endif pinMode(LED_BUILTIN, OUTPUT); @@ -1251,7 +1259,7 @@ void handleAfterTouch(byte inChannel, byte inPressure) { void handlePitchBend(byte inChannel, int inPitch) { for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { if (checkMidiChannel(inChannel, instance_id)) { - MicroDexed[instance_id]->setPitchbend(inPitch - 0x2000); + MicroDexed[instance_id]->setPitchbend(uint16_t(inPitch)); } } } diff --git a/UI.hpp b/UI.hpp index ce368b1..43b1567 100644 --- a/UI.hpp +++ b/UI.hpp @@ -530,7 +530,7 @@ FLASHMEM void setup_debug_message(void) { display.print(F("* DEBUG MODE *")); display.setCursor(1, 1); display.print(F("ENABLE CONSOLE")); - delay(300); + delay(500); display.setCursor(1, 1); display.print(_LCDML_VERSION); display.print(F(" ")); diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 40613da..6c423bb 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -109,7 +109,7 @@ bool load_sd_voice(uint8_t b, uint8_t v, uint8_t instance_id) { configuration.dexed[instance_id].bank = b; configuration.dexed[instance_id].voice = v; - uint8_t data_copy[155]; + uint8_t data_copy[156]; MicroDexed[instance_id]->getVoiceData(data_copy); send_sysex_voice(configuration.dexed[instance_id].midi_channel, data_copy); init_MIDI_send_CC();