diff --git a/MicroDexed.ino b/MicroDexed.ino index 86c4d1e..a4ab68a 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -373,7 +373,9 @@ extern char seq_chord_names[7][4]; ***********************************************************************/ void setup() { +#ifdef DEBUG Serial.begin(SERIAL_SPEED); +#endif #ifdef DISPLAY_LCD_SPI pinMode(SDCARD_CS_PIN, OUTPUT); diff --git a/UI.hpp b/UI.hpp index 8824ec7..1a40a90 100644 --- a/UI.hpp +++ b/UI.hpp @@ -7698,7 +7698,7 @@ void UI_func_eq_1(uint8_t param) { encoderDir[ENC_R].reset(); lcd.setCursor(0, 0); - lcd.print(F("EQ 50Hz")); + lcd.print(F("EQ Low-Cut")); lcd.setCursor(0, 1); lcd.print(F("Not implemented.")); } @@ -7722,12 +7722,11 @@ void UI_func_eq_1(uint8_t param) configuration.fx.eq_1 = constrain(configuration.fx.eq_1 - ENCODER[ENC_R].speed(), EQ_1_MIN, EQ_1_MAX); } } - lcd_display_meter_float("EQ 50Hz", configuration.fx.eq_1, 0.1, 0.0, EQ_1_MIN, EQ_1_MAX, 1, 1, false, true, true); - sgtl5000.setEQGain(1, mapfloat(configuration.fx.eq_1, EQ_1_MIN, EQ_1_MAX, -9.9, 9.9)); + lcd_display_meter_int("EQ Low-Cut [Hz]", configuration.fx.eq_1, 1.0, 0.0, EQ_1_MIN, EQ_1_MAX, 3, false, false, true); + sgtl5000.setEQFc(1, mapfloat(configuration.fx.eq_1, EQ_1_MIN, EQ_1_MAX, 15, 250)); + sgtl5000.setEQGain(1, 6.0); sgtl5000.commitFilter(1); #ifdef DEBUG - Serial.print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - Serial.println(mapfloat(configuration.fx.eq_1, EQ_1_MIN, EQ_1_MAX, -9.9, 9.9), 3); sgtl5000.show_params(1); #endif } @@ -7988,7 +7987,7 @@ void UI_func_eq_7(uint8_t param) { encoderDir[ENC_R].reset(); lcd.setCursor(0, 0); - lcd.print(F("EQ 10000Hz")); + lcd.print(F("EQ High-Cut")); lcd.setCursor(0, 1); lcd.print(F("Not implemented.")); } @@ -8012,8 +8011,8 @@ void UI_func_eq_7(uint8_t param) configuration.fx.eq_7 = constrain(configuration.fx.eq_7 - ENCODER[ENC_R].speed(), EQ_7_MIN, EQ_7_MAX); } } - lcd_display_meter_float("EQ 10000Hz", configuration.fx.eq_7, 0.1, 0.0, EQ_7_MIN, EQ_7_MAX, 1, 1, false, true, true); - sgtl5000.setEQGain(7, mapfloat(configuration.fx.eq_7, EQ_7_MIN, EQ_7_MAX, 0.0, 1.0)); + lcd_display_meter_float("EQ High-Cut[kHz]", configuration.fx.eq_7, 1.0, 0.0, EQ_7_MIN, EQ_7_MAX, 3, 1, false, false, true); + sgtl5000.setEQFc(7, mapfloat(configuration.fx.eq_7, EQ_7_MIN, EQ_7_MAX, EQ_7_MIN * 1000.0, EQ_7_MAX * 1000.0)); sgtl5000.commitFilter(7); #ifdef DEBUG sgtl5000.show_params(7); diff --git a/UI_FX.h b/UI_FX.h index e2e5383..51751c8 100644 --- a/UI_FX.h +++ b/UI_FX.h @@ -53,14 +53,14 @@ LCDML_add(19, LCDML_0_1_2_3_4, 1, "Roomsize", UI_func_reverb_roomsize); LCDML_add(20, LCDML_0_1_2_3_4, 2, "Damping", UI_func_reverb_damping); LCDML_add(21, LCDML_0_1_2_3_4, 3, "Level", UI_func_reverb_level); LCDML_add(22, LCDML_0_1_2_3_4, 4, "Reverb Send", UI_func_reverb_send); -LCDML_add(23, LCDML_0_1_2_3, 5, "EQ", NULL); -LCDML_add(24, LCDML_0_1_2_3_5, 1, "50Hz", UI_func_eq_1); -LCDML_add(25, LCDML_0_1_2_3_5, 2, "120Hz", UI_func_eq_2); -LCDML_add(26, LCDML_0_1_2_3_5, 3, "220Hz", UI_func_eq_3); -LCDML_add(27, LCDML_0_1_2_3_5, 4, "1000Hz", UI_func_eq_4); -LCDML_add(28, LCDML_0_1_2_3_5, 5, "2000Hz", UI_func_eq_5); -LCDML_add(29, LCDML_0_1_2_3_5, 6, "7000Hz", UI_func_eq_6); -LCDML_add(30, LCDML_0_1_2_3_5, 7, "10000Hz", UI_func_eq_7); +LCDML_add(23, LCDML_0_1_2, 4, "EQ", NULL); +LCDML_add(24, LCDML_0_1_2_4, 1, "Low-Cut", UI_func_eq_1); +LCDML_add(25, LCDML_0_1_2_4, 2, "120Hz", UI_func_eq_2); +LCDML_add(26, LCDML_0_1_2_4, 3, "220Hz", UI_func_eq_3); +LCDML_add(27, LCDML_0_1_2_4, 4, "1000Hz", UI_func_eq_4); +LCDML_add(28, LCDML_0_1_2_4, 5, "2000Hz", UI_func_eq_5); +LCDML_add(29, LCDML_0_1_2_4, 6, "7000Hz", UI_func_eq_6); +LCDML_add(30, LCDML_0_1_2_4, 7, "High-Cut", UI_func_eq_7); LCDML_add(31, LCDML_0_1, 3, "Controller", NULL); LCDML_add(32, LCDML_0_1_3, 1, "Pitchbend", NULL); LCDML_add(33, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range); diff --git a/UI_FX_T4.h b/UI_FX_T4.h index 7c407b3..509a9ae 100644 --- a/UI_FX_T4.h +++ b/UI_FX_T4.h @@ -56,14 +56,14 @@ LCDML_add(22, LCDML_0_1_2_3_4, 4, "Hidamp", UI_func_reverb_hidamp); LCDML_add(23, LCDML_0_1_2_3_4, 5, "Diffusion", UI_func_reverb_diffusion); LCDML_add(24, LCDML_0_1_2_3_4, 6, "Level", UI_func_reverb_level); LCDML_add(25, LCDML_0_1_2_3_4, 7, "Reverb Send", UI_func_reverb_send); -LCDML_add(26, LCDML_0_1_2_3, 5, "EQ", NULL); -LCDML_add(27, LCDML_0_1_2_3_5, 1, "50Hz", UI_func_eq_1); -LCDML_add(28, LCDML_0_1_2_3_5, 2, "110Hz", UI_func_eq_2); -LCDML_add(29, LCDML_0_1_2_3_5, 3, "220Hz", UI_func_eq_3); -LCDML_add(30, LCDML_0_1_2_3_5, 4, "1000Hz", UI_func_eq_4); -LCDML_add(31, LCDML_0_1_2_3_5, 5, "2000Hz", UI_func_eq_5); -LCDML_add(32, LCDML_0_1_2_3_5, 6, "7000Hz", UI_func_eq_6); -LCDML_add(33, LCDML_0_1_2_3_5, 7, "10000Hz", UI_func_eq_7); +LCDML_add(26, LCDML_0_1_2, 4, "EQ", NULL); +LCDML_add(27, LCDML_0_1_2_4, 1, "Low-Cut", UI_func_eq_1); +LCDML_add(28, LCDML_0_1_2_4, 2, "110Hz", UI_func_eq_2); +LCDML_add(29, LCDML_0_1_2_4, 3, "220Hz", UI_func_eq_3); +LCDML_add(30, LCDML_0_1_2_4, 4, "1000Hz", UI_func_eq_4); +LCDML_add(31, LCDML_0_1_2_4, 5, "2000Hz", UI_func_eq_5); +LCDML_add(32, LCDML_0_1_2_4, 6, "7000Hz", UI_func_eq_6); +LCDML_add(33, LCDML_0_1_2_4, 7, "High-Cut", UI_func_eq_7); LCDML_add(34, LCDML_0_1, 3, "Controller", NULL); LCDML_add(35, LCDML_0_1_3, 1, "Pitchbend", NULL); LCDML_add(36, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range); diff --git a/config.h b/config.h index 408a4b8..1060f98 100644 --- a/config.h +++ b/config.h @@ -607,9 +607,9 @@ #define VOICECONFIG_NUM_MAX MAX_VOICECONFIG #define VOICECONFIG_NUM_DEFAULT -1 -#define EQ_1_MIN -99 -#define EQ_1_MAX 99 -#define EQ_1_DEFAULT 0 +#define EQ_1_MIN 15 +#define EQ_1_MAX 250 +#define EQ_1_DEFAULT 50 #define EQ_2_MIN -99 #define EQ_2_MAX 99 @@ -631,9 +631,9 @@ #define EQ_6_MAX 99 #define EQ_6_DEFAULT 0 -#define EQ_7_MIN -99 -#define EQ_7_MAX 99 -#define EQ_7_DEFAULT 0 +#define EQ_7_MIN 8 +#define EQ_7_MAX 18 +#define EQ_7_DEFAULT 15 // Buffer-size define for load/save configuration as JSON @@ -691,13 +691,13 @@ typedef struct fx_s { uint8_t reverb_hidamp; uint8_t reverb_diffusion; uint8_t reverb_level; - int8_t eq_1; + uint8_t eq_1; int8_t eq_2; int8_t eq_3; int8_t eq_4; int8_t eq_5; int8_t eq_6; - int8_t eq_7; + uint8_t eq_7; } fx_t; typedef struct performance_s { diff --git a/control_sgtl5000plus.h b/control_sgtl5000plus.h index 7e0106a..7f600a7 100644 --- a/control_sgtl5000plus.h +++ b/control_sgtl5000plus.h @@ -29,7 +29,7 @@ #include #define EQ_TYPE_0 FILTER_HIPASS -#define EQ_CENTER_FRQ_0 50.0 +#define EQ_CENTER_FRQ_0 15.0 #define EQ_Q_0 0.666667 #define EQ_TYPE_1 FILTER_LOSHELF @@ -53,7 +53,7 @@ #define EQ_Q_5 0.126984 #define EQ_TYPE_6 FILTER_LOPASS -#define EQ_CENTER_FRQ_6 10000.0 +#define EQ_CENTER_FRQ_6 18000.0 #define EQ_Q_6 0.666667 class AudioControlSGTL5000Plus : public AudioControlSGTL5000