@ -103,10 +103,10 @@
//*************************************************************************************************
// Number of Dexed instances
# if defined(ARDUINO_TEENSY36)
# warning >>> Sorry, only one instance possible for Teensy-3.6
# define NUM_DEXED 1 // 1 or 2 - nothing else!
# warning>>> Sorry, only one instance possible for Teensy-3.6
# define NUM_DEXED 1 // 1 or 2 - nothing else!
# else
# define NUM_DEXED 2 // 1 or 2 - nothing else!
# define NUM_DEXED 2 // 1 or 2 - nothing else!
# endif
// FX-CHAIN ENABLE/DISABLE
@ -145,9 +145,9 @@
# endif
// CHORUS parameters
# 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_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
# 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_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
// SGTL5000
@ -164,23 +164,23 @@
// DELAYTIME
# if NUM_DEXED > 1
# if defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 250
# else
# define DELAY_MAX_TIME 100
# endif
# if defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 250
# else
# if defined(ARDUINO_TEENSY36)
# define DELAY_MAX_TIME 400
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 1000
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500
# else
# define DELAY_MAX_TIME 200
# endif
# define DELAY_MAX_TIME 100
# endif
# else
# if defined(ARDUINO_TEENSY36)
# define DELAY_MAX_TIME 400
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 1000
# elif defined(ARDUINO_TEENSY41)
# define DELAY_MAX_TIME 500
# else
# define DELAY_MAX_TIME 200
# endif
# endif
//*************************************************************************************************
@ -190,9 +190,9 @@
# ifdef USE_FX
# 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
# 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
# else
# if defined(USE_EPIANO)
@ -242,11 +242,11 @@
//#define LCD_I2C_ADDRESS 0x3f
//Display size, must be set for U8X8 as well
# ifdef TESTDISPLAY20x4
# define LCD_cols 20
# define LCD_rows 4
# define LCD_cols 20
# define LCD_rows 4
# else
# define LCD_cols 16
# define LCD_rows 2
# define LCD_cols 16
# define LCD_rows 2
# endif
# define I2C_DISPLAY
@ -255,8 +255,8 @@
# endif
# ifdef OLED_SPI
# define LCD_cols 16
# define LCD_rows 4
# define LCD_cols 16
# define LCD_rows 4
//enable U8X8 support
# define U8X8_DISPLAY
//enable SPI CS switching
@ -278,38 +278,38 @@
//*************************************************************************************************
// Teensy Audio Shield
# define SDCARD_AUDIO_CS_PIN 10
# define SDCARD_AUDIO_MOSI_PIN 7
# define SDCARD_AUDIO_SCK_PIN 14
# define SDCARD_AUDIO_CS_PIN 10
# define SDCARD_AUDIO_MOSI_PIN 7
# 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
// Teensy 3.6 & 4.1 internal SD card
# define SDCARD_TEENSY_CS_PIN BUILTIN_SDCARD
# define SDCARD_TEENSY_MOSI_PIN 11
# define SDCARD_TEENSY_SCK_PIN 13
# define SDCARD_TEENSY_CS_PIN BUILTIN_SDCARD
# define SDCARD_TEENSY_MOSI_PIN 11
# define SDCARD_TEENSY_SCK_PIN 13
# else
# define SDCARD_TEENSY_CS_PIN 10
# define SDCARD_TEENSY_MOSI_PIN 11
# define SDCARD_TEENSY_SCK_PIN 13
# define SDCARD_TEENSY_CS_PIN 10
# define SDCARD_TEENSY_MOSI_PIN 11
# define SDCARD_TEENSY_SCK_PIN 13
# endif
// Encoder with button
//#define ENCODER_USE_INTERRUPTS
# define NUM_ENCODER 2
# define ENC_L_PIN_A 3
# define ENC_L_PIN_B 2
# define BUT_L_PIN 4
# define ENC_L_PIN_A 3
# define ENC_L_PIN_B 2
# define BUT_L_PIN 4
# if defined(ARDUINO_TEENSY36)
# define ENC_R_PIN_A 28
# define ENC_R_PIN_B 29
# define BUT_R_PIN 30
# define ENC_R_PIN_A 28
# define ENC_R_PIN_B 29
# define BUT_R_PIN 30
# elif defined(ARDUINO_TEENSY40)
# define ENC_R_PIN_A 6
# define ENC_R_PIN_B 5
# define BUT_R_PIN 8
# else // ARDUINO_ARDUINO_TEENSY41
# define ENC_R_PIN_A 24
# define ENC_R_PIN_B 5
# define BUT_R_PIN 9
# define ENC_R_PIN_A 6
# define ENC_R_PIN_B 5
# define BUT_R_PIN 8
# else // ARDUINO_ARDUINO_TEENSY41
# define ENC_R_PIN_A 24
# define ENC_R_PIN_B 5
# define BUT_R_PIN 9
# endif
# define BUT_DEBOUNCE_MS 20
# define LONG_BUTTON_PRESS 500
@ -321,9 +321,9 @@
# define EEPROM_START_ADDRESS 0xFF
# define MAX_BANKS 100
# define MAX_VOICES 32 // voices per bank
# define BANK_NAME_LEN 11 // 10 (plus '\0')
# define VOICE_NAME_LEN 12 // 11 (plus '\0')
# define MAX_VOICES 32 // voices per bank
# define BANK_NAME_LEN 11 // 10 (plus '\0')
# define VOICE_NAME_LEN 12 // 11 (plus '\0')
# define FILENAME_LEN BANK_NAME_LEN + VOICE_NAME_LEN
# define CONFIG_FILENAME_LEN 50
# define DRUM_NAME_LEN 21
@ -345,7 +345,7 @@
//*************************************************************************************************
//* 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 SAVE_SYS_MS 5000
# define VOL_MAX_FLOAT 0.95
@ -366,36 +366,36 @@
// Teensy-3.6 settings
# if defined(ARDUINO_TEENSY36)
# undef USE_SEQUENCER
# if defined(USE_FX)
# warning >>> With enabled FX a maximum of 12 voices is possible (due to RAM and CPU limitations)
# define MAX_NOTES 12
# if F_CPU > 180000000
# error >>> Enabled FX with clockrate more than 180MHz is not useful due to RAM limitations.
# endif
# else
# if F_CPU == 256000000
# warning >>> Maximum of 22 voices.
# define MAX_NOTES 22
# elif F_CPU == 240000000
# warning >>> Maximum of 20 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 20
# elif F_CPU == 216000000
# warning >>> Maximum of 18 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 18
# elif F_CPU == 192000000
# warning >>> Maximum of 16 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 16
# elif F_CPU == 180000000
# warning >>> Maximum of 14 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 14
# else
# error >>> CPU Clock below 180MHz is not supported
# endif
# endif
# if defined(USE_FX)
# warning>>> With enabled FX a maximum of 12 voices is possible (due to RAM and CPU limitations)
# define MAX_NOTES 12
# if F_CPU > 180000000
# error>>> Enabled FX with clockrate more than 180MHz is not useful due to RAM limitations.
# endif
# else
# if F_CPU == 256000000
# warning>>> Maximum of 22 voices.
# define MAX_NOTES 22
# elif F_CPU == 240000000
# warning>>> Maximum of 20 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 20
# elif F_CPU == 216000000
# warning>>> Maximum of 18 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 18
# elif F_CPU == 192000000
# warning>>> Maximum of 16 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 16
# elif F_CPU == 180000000
# warning>>> Maximum of 14 voices. You should consider to use 256MHz overclocking to get a maximum of 22 voices.
# define MAX_NOTES 14
# else
# error>>> CPU Clock below 180MHz is not supported
# endif
# endif
# endif
# if defined(ARDUINO_TEENSY35)
# error >>> Not supported anymore!!!
# error>>> Not supported anymore!!!
# endif
// MIDI
@ -467,7 +467,7 @@
# define CHORUS_LEVEL_DEFAULT 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_FEEDBACK_MIN 0
@ -560,7 +560,7 @@
# define MW_ASSIGN_MIN 0
# 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_MAX MIDI_CONTROLLER_MODE_MAX
@ -572,7 +572,7 @@
# define FC_ASSIGN_MIN 0
# 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_MAX MIDI_CONTROLLER_MODE_MAX
@ -584,7 +584,7 @@
# define BC_ASSIGN_MIN 0
# 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_MAX MIDI_CONTROLLER_MODE_MAX
@ -596,7 +596,7 @@
# define AT_ASSIGN_MIN 0
# 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_MAX MIDI_CONTROLLER_MODE_MAX
@ -608,7 +608,7 @@
# define PORTAMENTO_MODE_MIN 0
# 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_MAX 1
@ -660,6 +660,10 @@
# 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_MAX 250
# define EQ_1_DEFAULT 50
@ -944,8 +948,7 @@ enum reverb_mixer_ports {
# ifndef _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 ;
}
# endif
@ -966,4 +969,4 @@ inline float mapfloat(float val, float in_min, float in_max, float out_min, floa
ARDUINO_TEENSY40 - Teensy 4.0
ARDUINO_TEENSY41 - Teensy 4.1
ARDUINO_TEENSYMM - Teensy 4 MM
*/
*/