From 5d9ca93373d00b50126ba77713a5e255f8d4187f Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 6 Dec 2019 15:09:51 +0100 Subject: [PATCH] Small fixes. --- config.h | 19 ++++++++++--------- dexed_sysex.cpp | 4 ++-- dexed_sysex.h | 2 ++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/config.h b/config.h index 7a6f72d..c6b2a43 100644 --- a/config.h +++ b/config.h @@ -32,15 +32,15 @@ // ATTENTION! For better latency you have to redefine AUDIO_BLOCK_SAMPLES from // 128 to 64 in /cores/teensy3/AudioStream.h -// If you want to test the system with Linux and withous any keyboard and/or audio equipment, you can do the following: +// If you want to test the system with Linux and without any keyboard and/or audio equipment, you can do the following: // 1. In Arduino-IDE enable "Tools->USB-Type->Serial + MIDI + Audio" // 2. Build the firmware with "MIDI_DEVICE_USB" enabled in config.h. // 3. Afterconnecting to a Linux system there should be a MIDI an audio device available that is called "MicroMDexed", so you can start the following: // $ aplaymidi -p 20:0 # e.g. test.mid -// $ arecord -f cd -Dhw:1,0 /tmp/bla.wav +// $ arecord -f cd -Dhw:1,0 /tmp/.wav // -#define VERSION "0.9.8" +#define VERSION "0.9.9" //************************************************************************************************* //* DEVICE SETTINGS @@ -61,10 +61,10 @@ #define AUDIO_DEVICE_USB //#define TEENSY_DAC //#define TEENSY_DAC_SYMMETRIC -//#define TEENSY_AUDIO_BOARD +#define TEENSY_AUDIO_BOARD //#define I2S_AUDIO_ONLY //#define TGA_AUDIO_BOARD -#define PT8211_AUDIO +//#define PT8211_AUDIO //************************************************************************************************* //* MIDI SOFTWARE SETTINGS @@ -84,6 +84,7 @@ #define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE #define MOD_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT #define MOD_FILTER_CUTOFF_HZ 3000 +// REVERB ENABLE/DISABLE #define USE_REVERB 1 //************************************************************************************************* @@ -148,7 +149,7 @@ //************************************************************************************************* //* DEBUG OUTPUT SETTINGS //************************************************************************************************* -#define DEBUG 1 +//#define DEBUG 1 #define SERIAL_SPEED 230400 #define SHOW_XRUN 1 #define SHOW_CPU_LOAD_MSEC 5000 @@ -229,12 +230,12 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define MIDI_DEVICE_USB_HOST 1 #if defined(USE_REVERB) #if defined(DEBUG) -#define MAX_NOTES 10 -#else #define MAX_NOTES 11 +#else +#define MAX_NOTES 12 #endif #else -#define MAX_NOTES 14 +#define MAX_NOTES 15 #endif #endif diff --git a/dexed_sysex.cpp b/dexed_sysex.cpp index 78f6cb4..bf2df52 100644 --- a/dexed_sysex.cpp +++ b/dexed_sysex.cpp @@ -356,7 +356,7 @@ bool get_sysex_voice(File sysex, uint8_t voice_number, uint8_t* data) void create_sysex_setup_filename(uint8_t b, uint8_t v, char* sysex_setup_file_name) { // init and set name for actual bank - memset(sysex_setup_file_name, 0, sizeof(sysex_setup_file_name)); + memset(sysex_setup_file_name, 0, SYSEXFILENAME_LEN); sysex_setup_file_name[0] = '/'; itoa(b, &sysex_setup_file_name[1], 10); strcat(sysex_setup_file_name, "/"); @@ -465,7 +465,7 @@ bool load_sysex_setup(uint8_t b, uint8_t v, uint8_t instance_id) if (sd_card_available) { File sysex; - char sysex_setup_file_name[10]; + char sysex_setup_file_name[SYSEXFILENAME_LEN]; create_sysex_setup_filename(b, v, sysex_setup_file_name); diff --git a/dexed_sysex.h b/dexed_sysex.h index ac93701..6d991ef 100644 --- a/dexed_sysex.h +++ b/dexed_sysex.h @@ -29,6 +29,8 @@ #ifndef DEXED_SYSEX_H_INCLUDED #define DEXED_SYSEX_H_INCLUDED +#define SYSEXFILENAME_LEN 10 + extern bool sd_card_available; extern Dexed* dexed; extern AudioSourceMicroDexed * MicroDexed[NUM_DEXED];