From 734b23dc35f125ce9b4b4665bd4560fb271e0ba9 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sat, 10 Jul 2021 10:03:32 +0200 Subject: [PATCH] Fixes for T_3.6. I am pretty sure that there is too few AUDIO_MEM for the delay when using dual instances. Perhaps T_3.6 should only use one instance. Will fix this later. --- MicroDexed.ino | 13 ++++++++----- config.h | 13 +++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 9ef61dc..42ce98d 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -13,7 +13,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License @@ -252,16 +252,19 @@ uint8_t selected_instance_id = 0; #ifdef TEENSY4 #if NUM_DEXED>1 int8_t midi_decay[NUM_DEXED] = { -1, -1}; -int perform_attack_mod[NUM_DEXED] = { 0, 0}; -int perform_release_mod[NUM_DEXED] = { 0, 0}; #else int8_t midi_decay[NUM_DEXED] = { -1}; -int perform_attack_mod[NUM_DEXED] = { 0 }; -int perform_release_mod[NUM_DEXED] = { 0 }; #endif elapsedMillis midi_decay_timer; #endif +#if NUM_DEXED>1 +int perform_attack_mod[NUM_DEXED] = { 0, 0}; +int perform_release_mod[NUM_DEXED] = { 0, 0}; +#else +int perform_attack_mod[NUM_DEXED] = { 0 }; +int perform_release_mod[NUM_DEXED] = { 0 }; +#endif #if defined(USE_FX) // Allocate the delay lines for chorus int16_t delayline[NUM_DEXED][MOD_DELAY_SAMPLE_BUFFER]; diff --git a/config.h b/config.h index e006e0f..04ba371 100644 --- a/config.h +++ b/config.h @@ -128,11 +128,11 @@ //* AUDIO SOFTWARE SETTINGS //************************************************************************************************* #define SAMPLE_RATE 44100 -//#if AUDIO_BLOCK_SAMPLES == 64 -//#define AUDIO_MEM 256 -//#else -#define AUDIO_MEM 750 -//#endif +#if AUDIO_BLOCK_SAMPLES == 64 +#define AUDIO_MEM 256 +#else +#define AUDIO_MEM 64 +#endif #ifdef TEENSY_AUDIO_BOARD /* @@ -170,13 +170,10 @@ #else #if defined(TEENSY3_6) #define DELAY_MAX_TIME 500 -#define AUDIO_MEM 360 #elif defined(TEENSY4) #define DELAY_MAX_TIME 1000 -#define AUDIO_MEM 750 #else #define DELAY_MAX_TIME 250 -#define AUDIO_MEM 200 #endif #endif