From adf748a2b4c22cf4fb9f454b2672675b73bb8de6 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Wed, 27 Jun 2018 14:26:39 +0200 Subject: [PATCH] Fixes. --- MicroDexed.ino | 17 +++++++---------- config.h | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 0632bfd..ead12e0 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -85,7 +85,7 @@ void setup() #endif // start MIDI - MIDI.begin(MIDI_CHANNEL_OMNI); + MIDI.begin(DEFAULT_MIDI_CHANNEL); // start audio card AudioMemory(AUDIO_MEM); @@ -184,12 +184,12 @@ void handle_midi_input(void) #ifdef DEBUG Serial.println(F("MIDI-USB")); #endif - if (MIDI.getType() >= 0xf0) // SysEX + if (midi_usb.getType() >= 0xf0) // SysEX { - handle_sysex_parameter(MIDI.getSysExArray(), MIDI.getSysExArrayLength()); + handle_sysex_parameter(midi_usb.getSysExArray(), midi_usb.getSysExArrayLength()); } - else if (queue_midi_event(midi_usb.getType(), midi_usb.getData1(), midi_usb.getData2())) - return; + else + queue_midi_event(midi_usb.getType(), midi_usb.getData1(), midi_usb.getData2()); } #endif @@ -203,10 +203,7 @@ void handle_midi_input(void) handle_sysex_parameter(MIDI.getSysExArray(), MIDI.getSysExArrayLength()); } else - { - if (queue_midi_event(MIDI.getType(), MIDI.getData1(), MIDI.getData2())) - return; - } + queue_midi_event(MIDI.getType(), MIDI.getData1(), MIDI.getData2()); } } @@ -331,7 +328,7 @@ bool queue_midi_event(uint8_t type, uint8_t data1, uint8_t data2) bool ret = false; #ifdef SHOW_MIDI_EVENT - print_midi_event(type, data1, data2); + print_midi_event(type, data1, data2); #endif #ifdef SHOW_MIDI_EVENT diff --git a/config.h b/config.h index 0f02f9d..e10f359 100644 --- a/config.h +++ b/config.h @@ -26,7 +26,7 @@ // Initial values #define MIDI_DEVICE Serial1 -#define VOLUME 0.1 +#define VOLUME 0.5 #define SAMPLE_RATE 44100 //#define DEXED_ENGINE DEXED_ENGINE_MODERN //#define USE_ONBOARD_USB_HOST 1