Changing "Drum Main Vol" to bard indicator.

dev
Holger Wirtz 2 years ago
parent 2ff0998085
commit 3409d9229c
  1. 1145
      MicroDexed.ino
  2. 3224
      UI.hpp
  3. 185
      config.h
  4. 2
      dexed_sd.cpp

File diff suppressed because it is too large Load Diff

3224
UI.hpp

File diff suppressed because it is too large Load Diff

@ -103,10 +103,10 @@
//************************************************************************************************* //*************************************************************************************************
// Number of Dexed instances // Number of Dexed instances
#if defined(ARDUINO_TEENSY36) #if defined(ARDUINO_TEENSY36)
#warning >>> Sorry, only one instance possible for Teensy-3.6 #warning>>> Sorry, only one instance possible for Teensy-3.6
#define NUM_DEXED 1 // 1 or 2 - nothing else! #define NUM_DEXED 1 // 1 or 2 - nothing else!
#else #else
#define NUM_DEXED 2 // 1 or 2 - nothing else! #define NUM_DEXED 2 // 1 or 2 - nothing else!
#endif #endif
// FX-CHAIN ENABLE/DISABLE // FX-CHAIN ENABLE/DISABLE
@ -145,9 +145,9 @@
#endif #endif
// CHORUS parameters // CHORUS parameters
#define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(15.0)) // 15.0 ms delay buffer. #define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(15.0)) // 15.0 ms delay buffer.
#define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE #define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE
#define MOD_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT #define MOD_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
#define MOD_FILTER_CUTOFF_HZ 2000 #define MOD_FILTER_CUTOFF_HZ 2000
// SGTL5000 // SGTL5000
@ -164,23 +164,23 @@
// DELAYTIME // DELAYTIME
#if NUM_DEXED > 1 #if NUM_DEXED > 1
# if defined(ARDUINO_TEENSY41) #if defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500 #define DELAY_MAX_TIME 500
# elif defined(ARDUINO_TEENSY41) #elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 250 #define DELAY_MAX_TIME 250
# else #else
# define DELAY_MAX_TIME 100 #define DELAY_MAX_TIME 100
# endif #endif
#else #else
# if defined(ARDUINO_TEENSY36) #if defined(ARDUINO_TEENSY36)
# define DELAY_MAX_TIME 400 #define DELAY_MAX_TIME 400
# elif defined(ARDUINO_TEENSY41) #elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 1000 #define DELAY_MAX_TIME 1000
# elif defined(ARDUINO_TEENSY41) #elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500 #define DELAY_MAX_TIME 500
# else #else
# define DELAY_MAX_TIME 200 #define DELAY_MAX_TIME 200
# endif #endif
#endif #endif
//************************************************************************************************* //*************************************************************************************************
@ -190,9 +190,9 @@
#ifdef USE_FX #ifdef USE_FX
#if defined(USE_EPIANO) #if defined(USE_EPIANO)
#define AUDIO_MEM SAMPLE_RATE * NUM_DEXED * DELAY_MAX_TIME / 128000 + 36 + 14 #define AUDIO_MEM SAMPLE_RATE* NUM_DEXED* DELAY_MAX_TIME / 128000 + 36 + 14
#else #else
#define AUDIO_MEM SAMPLE_RATE * NUM_DEXED * DELAY_MAX_TIME / 128000 + 36 #define AUDIO_MEM SAMPLE_RATE* NUM_DEXED* DELAY_MAX_TIME / 128000 + 36
#endif #endif
#else #else
#if defined(USE_EPIANO) #if defined(USE_EPIANO)
@ -242,11 +242,11 @@
//#define LCD_I2C_ADDRESS 0x3f //#define LCD_I2C_ADDRESS 0x3f
//Display size, must be set for U8X8 as well //Display size, must be set for U8X8 as well
#ifdef TESTDISPLAY20x4 #ifdef TESTDISPLAY20x4
#define LCD_cols 20 #define LCD_cols 20
#define LCD_rows 4 #define LCD_rows 4
#else #else
#define LCD_cols 16 #define LCD_cols 16
#define LCD_rows 2 #define LCD_rows 2
#endif #endif
#define I2C_DISPLAY #define I2C_DISPLAY
@ -255,8 +255,8 @@
#endif #endif
#ifdef OLED_SPI #ifdef OLED_SPI
#define LCD_cols 16 #define LCD_cols 16
#define LCD_rows 4 #define LCD_rows 4
//enable U8X8 support //enable U8X8 support
#define U8X8_DISPLAY #define U8X8_DISPLAY
//enable SPI CS switching //enable SPI CS switching
@ -278,38 +278,38 @@
//************************************************************************************************* //*************************************************************************************************
// Teensy Audio Shield // Teensy Audio Shield
#define SDCARD_AUDIO_CS_PIN 10 #define SDCARD_AUDIO_CS_PIN 10
#define SDCARD_AUDIO_MOSI_PIN 7 #define SDCARD_AUDIO_MOSI_PIN 7
#define SDCARD_AUDIO_SCK_PIN 14 #define SDCARD_AUDIO_SCK_PIN 14
#if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41) || defined(ARDUINO_TEENSY36) // new detection logic to also find on board SD Card from Teensy 4.1 #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41) || defined(ARDUINO_TEENSY36) // new detection logic to also find on board SD Card from Teensy 4.1
// Teensy 3.6 & 4.1 internal SD card // Teensy 3.6 & 4.1 internal SD card
#define SDCARD_TEENSY_CS_PIN BUILTIN_SDCARD #define SDCARD_TEENSY_CS_PIN BUILTIN_SDCARD
#define SDCARD_TEENSY_MOSI_PIN 11 #define SDCARD_TEENSY_MOSI_PIN 11
#define SDCARD_TEENSY_SCK_PIN 13 #define SDCARD_TEENSY_SCK_PIN 13
#else #else
#define SDCARD_TEENSY_CS_PIN 10 #define SDCARD_TEENSY_CS_PIN 10
#define SDCARD_TEENSY_MOSI_PIN 11 #define SDCARD_TEENSY_MOSI_PIN 11
#define SDCARD_TEENSY_SCK_PIN 13 #define SDCARD_TEENSY_SCK_PIN 13
#endif #endif
// Encoder with button // Encoder with button
//#define ENCODER_USE_INTERRUPTS //#define ENCODER_USE_INTERRUPTS
#define NUM_ENCODER 2 #define NUM_ENCODER 2
#define ENC_L_PIN_A 3 #define ENC_L_PIN_A 3
#define ENC_L_PIN_B 2 #define ENC_L_PIN_B 2
#define BUT_L_PIN 4 #define BUT_L_PIN 4
#if defined(ARDUINO_TEENSY36) #if defined(ARDUINO_TEENSY36)
#define ENC_R_PIN_A 28 #define ENC_R_PIN_A 28
#define ENC_R_PIN_B 29 #define ENC_R_PIN_B 29
#define BUT_R_PIN 30 #define BUT_R_PIN 30
#elif defined(ARDUINO_TEENSY40) #elif defined(ARDUINO_TEENSY40)
#define ENC_R_PIN_A 6 #define ENC_R_PIN_A 6
#define ENC_R_PIN_B 5 #define ENC_R_PIN_B 5
#define BUT_R_PIN 8 #define BUT_R_PIN 8
#else // ARDUINO_ARDUINO_TEENSY41 #else // ARDUINO_ARDUINO_TEENSY41
#define ENC_R_PIN_A 24 #define ENC_R_PIN_A 24
#define ENC_R_PIN_B 5 #define ENC_R_PIN_B 5
#define BUT_R_PIN 9 #define BUT_R_PIN 9
#endif #endif
#define BUT_DEBOUNCE_MS 20 #define BUT_DEBOUNCE_MS 20
#define LONG_BUTTON_PRESS 500 #define LONG_BUTTON_PRESS 500
@ -321,9 +321,9 @@
#define EEPROM_START_ADDRESS 0xFF #define EEPROM_START_ADDRESS 0xFF
#define MAX_BANKS 100 #define MAX_BANKS 100
#define MAX_VOICES 32 // voices per bank #define MAX_VOICES 32 // voices per bank
#define BANK_NAME_LEN 11 // 10 (plus '\0') #define BANK_NAME_LEN 11 // 10 (plus '\0')
#define VOICE_NAME_LEN 12 // 11 (plus '\0') #define VOICE_NAME_LEN 12 // 11 (plus '\0')
#define FILENAME_LEN BANK_NAME_LEN + VOICE_NAME_LEN #define FILENAME_LEN BANK_NAME_LEN + VOICE_NAME_LEN
#define CONFIG_FILENAME_LEN 50 #define CONFIG_FILENAME_LEN 50
#define DRUM_NAME_LEN 21 #define DRUM_NAME_LEN 21
@ -345,7 +345,7 @@
//************************************************************************************************* //*************************************************************************************************
//* DO NO CHANGE ANYTHING BEYOND IF YOU DON'T KNOW WHAT YOU ARE DOING !!! //* DO NO CHANGE ANYTHING BEYOND IF YOU DON'T KNOW WHAT YOU ARE DOING !!!
//************************************************************************************************* //*************************************************************************************************
#define MAX_DEXED 2 // No! - even don't think about increasing this number! IT _WILL_ PRODUCE MASSIVE PROBLEMS! #define MAX_DEXED 2 // No! - even don't think about increasing this number! IT _WILL_ PRODUCE MASSIVE PROBLEMS!
#define CONTROL_RATE_MS 50 #define CONTROL_RATE_MS 50
#define SAVE_SYS_MS 5000 #define SAVE_SYS_MS 5000
#define VOL_MAX_FLOAT 0.95 #define VOL_MAX_FLOAT 0.95
@ -366,36 +366,36 @@
// Teensy-3.6 settings // Teensy-3.6 settings
#if defined(ARDUINO_TEENSY36) #if defined(ARDUINO_TEENSY36)
#undef USE_SEQUENCER #undef USE_SEQUENCER
# if defined(USE_FX) #if defined(USE_FX)
# warning >>> With enabled FX a maximum of 12 voices is possible (due to RAM and CPU limitations) #warning>>> With enabled FX a maximum of 12 voices is possible (due to RAM and CPU limitations)
# define MAX_NOTES 12 #define MAX_NOTES 12
# if F_CPU > 180000000 #if F_CPU > 180000000
# error >>> Enabled FX with clockrate more than 180MHz is not useful due to RAM limitations. #error>>> Enabled FX with clockrate more than 180MHz is not useful due to RAM limitations.
# endif #endif
# else #else
# if F_CPU == 256000000 #if F_CPU == 256000000
# warning >>> Maximum of 22 voices. #warning>>> Maximum of 22 voices.
# define MAX_NOTES 22 #define MAX_NOTES 22
# elif F_CPU == 240000000 #elif F_CPU == 240000000
# warning >>> Maximum of 20 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices. #warning>>> Maximum of 20 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 20 #define MAX_NOTES 20
# elif F_CPU == 216000000 #elif F_CPU == 216000000
# warning >>> Maximum of 18 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices. #warning>>> Maximum of 18 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 18 #define MAX_NOTES 18
# elif F_CPU == 192000000 #elif F_CPU == 192000000
# warning >>> Maximum of 16 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices. #warning>>> Maximum of 16 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 16 #define MAX_NOTES 16
# elif F_CPU == 180000000 #elif F_CPU == 180000000
# warning >>> Maximum of 14 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices. #warning>>> Maximum of 14 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 14 #define MAX_NOTES 14
# else #else
# error >>> CPU Clock below 180MHz is not supported #error>>> CPU Clock below 180MHz is not supported
# endif #endif
# endif #endif
#endif #endif
#if defined(ARDUINO_TEENSY35) #if defined(ARDUINO_TEENSY35)
#error >>> Not supported anymore!!! #error>>> Not supported anymore!!!
#endif #endif
// MIDI // MIDI
@ -467,7 +467,7 @@
#define CHORUS_LEVEL_DEFAULT 0 #define CHORUS_LEVEL_DEFAULT 0
#define DELAY_TIME_MIN 0 #define DELAY_TIME_MIN 0
#define DELAY_TIME_MAX DELAY_MAX_TIME/10 #define DELAY_TIME_MAX DELAY_MAX_TIME / 10
#define DELAY_TIME_DEFAULT 0 #define DELAY_TIME_DEFAULT 0
#define DELAY_FEEDBACK_MIN 0 #define DELAY_FEEDBACK_MIN 0
@ -560,7 +560,7 @@
#define MW_ASSIGN_MIN 0 #define MW_ASSIGN_MIN 0
#define MW_ASSIGN_MAX 7 #define MW_ASSIGN_MAX 7
#define MW_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias #define MW_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define MW_MODE_MIN 0 #define MW_MODE_MIN 0
#define MW_MODE_MAX MIDI_CONTROLLER_MODE_MAX #define MW_MODE_MAX MIDI_CONTROLLER_MODE_MAX
@ -572,7 +572,7 @@
#define FC_ASSIGN_MIN 0 #define FC_ASSIGN_MIN 0
#define FC_ASSIGN_MAX 7 #define FC_ASSIGN_MAX 7
#define FC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias #define FC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define FC_MODE_MIN 0 #define FC_MODE_MIN 0
#define FC_MODE_MAX MIDI_CONTROLLER_MODE_MAX #define FC_MODE_MAX MIDI_CONTROLLER_MODE_MAX
@ -584,7 +584,7 @@
#define BC_ASSIGN_MIN 0 #define BC_ASSIGN_MIN 0
#define BC_ASSIGN_MAX 7 #define BC_ASSIGN_MAX 7
#define BC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias #define BC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define BC_MODE_MIN 0 #define BC_MODE_MIN 0
#define BC_MODE_MAX MIDI_CONTROLLER_MODE_MAX #define BC_MODE_MAX MIDI_CONTROLLER_MODE_MAX
@ -596,7 +596,7 @@
#define AT_ASSIGN_MIN 0 #define AT_ASSIGN_MIN 0
#define AT_ASSIGN_MAX 7 #define AT_ASSIGN_MAX 7
#define AT_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias #define AT_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define AT_MODE_MIN 0 #define AT_MODE_MIN 0
#define AT_MODE_MAX MIDI_CONTROLLER_MODE_MAX #define AT_MODE_MAX MIDI_CONTROLLER_MODE_MAX
@ -608,7 +608,7 @@
#define PORTAMENTO_MODE_MIN 0 #define PORTAMENTO_MODE_MIN 0
#define PORTAMENTO_MODE_MAX 1 #define PORTAMENTO_MODE_MAX 1
#define PORTAMENTO_MODE_DEFAULT 0 // 0: Retain, 1: Follow #define PORTAMENTO_MODE_DEFAULT 0 // 0: Retain, 1: Follow
#define PORTAMENTO_GLISSANDO_MIN 0 #define PORTAMENTO_GLISSANDO_MIN 0
#define PORTAMENTO_GLISSANDO_MAX 1 #define PORTAMENTO_GLISSANDO_MAX 1
@ -660,6 +660,10 @@
#define SEQUENCE_CONFIG_DEFAULT 0 #define SEQUENCE_CONFIG_DEFAULT 0
*/ */
#define DRUMS_MAIN_VOL_MIN 0
#define DRUMS_MAIN_VOL_MAX 100
#define DRUMS_MAIN_VOL_DEFAULT 80
#define EQ_1_MIN 15 #define EQ_1_MIN 15
#define EQ_1_MAX 250 #define EQ_1_MAX 250
#define EQ_1_DEFAULT 50 #define EQ_1_DEFAULT 50
@ -944,8 +948,7 @@ enum reverb_mixer_ports {
#ifndef _MAPFLOAT #ifndef _MAPFLOAT
#define _MAPFLOAT #define _MAPFLOAT
inline float mapfloat(float val, float in_min, float in_max, float out_min, float out_max) inline float mapfloat(float val, float in_min, float in_max, float out_min, float out_max) {
{
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
} }
#endif #endif

@ -1123,7 +1123,7 @@ bool load_sd_sys_json(void)
{ {
// ... and if: load // ... and if: load
#ifdef DEBUG #ifdef DEBUG
Serial.print(F("Found sys configuration")); Serial.println(F("Found sys configuration"));
#endif #endif
json = SD.open(filename); json = SD.open(filename);
if (json) if (json)

Loading…
Cancel
Save