From 3a0a571d5048c05123ffef8ad4efb64e7232be9a Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sun, 2 Dec 2018 10:24:18 +0100 Subject: [PATCH] Fixed not working sustain pedal. Fixed enabling of effects. --- MicroDexed.ino | 3 ++- UI.cpp | 2 +- config.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 2d18004..635deaa 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -334,7 +334,7 @@ void loop() const uint16_t audio_block_time_us = 1000000 / (SAMPLE_RATE / AUDIO_BLOCK_SAMPLES); // Main sound calculation - if (queue1.available() && fill_audio_buffer > audio_block_time_us-10) + if (queue1.available() && fill_audio_buffer > audio_block_time_us - 10) { fill_audio_buffer = 0; @@ -644,6 +644,7 @@ bool queue_midi_event(uint8_t type, uint8_t data1, uint8_t data2) mixer2.gain(1, mapfloat(effect_delay_volume, 0, 99, 0.0, 1.0)); // delay tap1 signal (with added feedback) break; default: + ret = dexed->processMidiMessage(type, data1, data2); break; } } diff --git a/UI.cpp b/UI.cpp index 71fa6f6..b25e4eb 100644 --- a/UI.cpp +++ b/UI.cpp @@ -74,6 +74,7 @@ void handle_ui(void) #ifdef DEBUG Serial.print(F("Long button pressing detected for button ")); Serial.println(i, DEC); +#endif switch (i) { @@ -103,7 +104,6 @@ void handle_ui(void) } break; } -#endif } else { diff --git a/config.h b/config.h index 02650d2..a0328f9 100644 --- a/config.h +++ b/config.h @@ -35,7 +35,7 @@ #define VERSION 1.0.0 #define MIDI_DEVICE Serial1 #define USE_ONBOARD_USB_HOST 1 -#define MIDI_MERGE_THRU 1 +//#define MIDI_MERGE_THRU 1 #define TEENSY_AUDIO_BOARD 1 #define VOLUME 0.6 #define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI @@ -70,7 +70,7 @@ // Debug output #define SERIAL_SPEED 38400 -#define DEBUG 1 +//#define DEBUG 1 #define SHOW_MIDI_EVENT 1 #define SHOW_XRUN 1 #define SHOW_CPU_LOAD_MSEC 5000