diff --git a/MicroDexed.ino b/MicroDexed.ino index 72b7609..7cba89a 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1498,14 +1498,20 @@ void set_master_mixer_gain(uint8_t type, float level) float new_level[num_fx]; - new_level[CHORUS] = master_mixer_level[CHORUS] / float(num_fx); - new_level[DELAY] = master_mixer_level[DELAY] / float(num_fx); -#if defined(USE_REVERB) - new_level[REVERB] = master_mixer_level[REVERB] / float(num_fx); - new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY] - new_level[REVERB]; -#else - new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY]; -#endif + /* + new_level[CHORUS] = master_mixer_level[CHORUS] / float(num_fx); + new_level[DELAY] = master_mixer_level[DELAY] / float(num_fx); + #if defined(USE_REVERB) + new_level[REVERB] = master_mixer_level[REVERB] / float(num_fx); + new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY] - new_level[REVERB]; + #else + new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY]; + #endif + */ + new_level[CHORUS] = master_mixer_level[CHORUS]; + new_level[DELAY] = master_mixer_level[DELAY]; + new_level[REVERB] = master_mixer_level[REVERB]; + new_level[DEXED] = 1.0; master_mixer_r.gain(DEXED, new_level[DEXED]); master_mixer_l.gain(DEXED, new_level[DEXED]); diff --git a/UI.hpp b/UI.hpp index 51f4ad7..16b5de3 100644 --- a/UI.hpp +++ b/UI.hpp @@ -1388,8 +1388,8 @@ void UI_func_chorus_send(uint8_t param) } } - chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 200.0); - chorus_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].chorus_send / 200.0); + chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0); + chorus_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0); } lcd.setCursor(0, 1); @@ -1544,8 +1544,8 @@ void UI_func_delay_feedback(uint8_t param) } } - delay_fb_mixer_r.gain(1, configuration.delay_feedback / 200.0 ); // amount of feedback - delay_fb_mixer_l.gain(1, configuration.delay_feedback / 200.0 ); // amount of feedback + delay_fb_mixer_r.gain(1, configuration.delay_feedback / 100.0); // amount of feedback + delay_fb_mixer_l.gain(1, configuration.delay_feedback / 100.0); // amount of feedback //delay_fb_mixer.gain(0, 1.0 - configuration.delay_feedback / 200.0); // original signal } @@ -3207,7 +3207,7 @@ void UI_func_midi_soft_thru(uint8_t param) { // setup function lcd.setCursor(0, 0); - lcd.print(F("MIDI-Soft_Thru")); + lcd.print(F("MIDI Soft THRU")); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3436,6 +3436,31 @@ void UI_func_save(uint8_t param) } } +void UI_function_not_enabled(void) +{ + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + // setup function + lcd.setCursor(0, 0); + lcd.print(F("Function not")); + lcd.setCursor(0, 1); + lcd.print(F("enbaled!")); + } + + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkEnter()) + { + LCDML.FUNC_goBackToMenu(); + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + // you can here reset some global vars or do nothing + } +} + void UI_function_not_implemented(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -3460,6 +3485,7 @@ void UI_function_not_implemented(uint8_t param) // you can here reset some global vars or do nothing } } + void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) { int16_t tmp = 0; diff --git a/config.h b/config.h index bc0baa0..77b4757 100644 --- a/config.h +++ b/config.h @@ -96,7 +96,7 @@ #else #define AUDIO_MEM 384 #endif -#define REDUCE_LOUDNESS 0 +#define REDUCE_LOUDNESS 2 #else // IF TEENSY_AUDIO_BOARD #define SGTL5000_LINEOUT_LEVEL 29 #if AUDIO_BLOCK_SAMPLES == 64 @@ -104,7 +104,7 @@ #else #define AUDIO_MEM 384 #endif -#define REDUCE_LOUDNESS 0 +#define REDUCE_LOUDNESS 2 #endif #define DELAY_MAX_TIME 500 #define SAMPLE_RATE 44100 @@ -228,16 +228,12 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #if defined(__MK66FX1M0__) // Teensy-3.6 // Teensy-3.6 settings #define MIDI_DEVICE_USB_HOST 1 -#if defined(USE_REVERB) -#if defined(DEBUG) -//#define MAX_NOTES 12 +#if defined(USE_REVERB) && (F_CPU >= 240000000) #define MAX_NOTES 16 +#elif defined(USE_REVERB) +#define MAX_NOTES 8 #else -//#define MAX_NOTES 11 -#define MAX_NOTES 16 -#endif -#else -#define MAX_NOTES 15 +#define MAX_NOTES 11 #endif #endif diff --git a/dexed.cpp b/dexed.cpp index fa2d2de..6f9e752 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -174,10 +174,10 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer) fx.process(sumbuf, n_samples); //#ifdef USE_TEENSY_DSP - //arm_float_to_q15(sumbuf, buffer, AUDIO_BLOCK_SAMPLES); + arm_float_to_q15(sumbuf, buffer, AUDIO_BLOCK_SAMPLES); //#else - for (i = 0; i < n_samples; ++i) - buffer[i] = static_cast(sumbuf[i] * 0x7fff); + //for (i = 0; i < n_samples; ++i) + //buffer[i] = static_cast(sumbuf[i] * 0x7fff); //#endif }