Fixing setting negative numbers for eq_treble and eq_bass.

Fixing chorus feedback.
dev
Holger Wirtz 5 years ago
parent 1da17fa68c
commit c77cbcf8fb
  1. 8
      UI.hpp
  2. 4
      config.h

@ -2208,7 +2208,9 @@ void set_chorus_feedback(uint8_t value)
Serial.print(F("Set CHORUS_FEEDBACK ")); Serial.print(F("Set CHORUS_FEEDBACK "));
Serial.println(value); Serial.println(value);
#endif #endif
float tmp = mapfloat(float(value), ENC_CHORUS_FEEDBACK_MIN, ENC_CHORUS_FEEDBACK_MAX, 0.0, 0.2); float tmp = mapfloat(float(value), ENC_CHORUS_FEEDBACK_MIN, ENC_CHORUS_FEEDBACK_MAX, 0.0, 0.5);
modchorus_fbk_mixer_r.gain(0, 1.0 - tmp);
modchorus_fbk_mixer_l.gain(0, 1.0 - tmp);
modchorus_fbk_mixer_r.gain(1, tmp); modchorus_fbk_mixer_r.gain(1, tmp);
modchorus_fbk_mixer_l.gain(1, tmp); modchorus_fbk_mixer_l.gain(1, tmp);
configuration.chorus_feedback = value; configuration.chorus_feedback = value;
@ -2280,7 +2282,7 @@ void set_bass_mono_level(uint8_t value)
configuration.bass_mono_level = value; configuration.bass_mono_level = value;
} }
void set_eq_bass(uint8_t value) void set_eq_bass(int8_t value)
{ {
if (value > ENC_EQ_TREBLE_MAX) if (value > ENC_EQ_TREBLE_MAX)
value = ENC_EQ_TREBLE_MAX; value = ENC_EQ_TREBLE_MAX;
@ -2294,7 +2296,7 @@ void set_eq_bass(uint8_t value)
configuration.eq_bass = value; configuration.eq_bass = value;
} }
void set_eq_treble(uint8_t value) void set_eq_treble(int8_t value)
{ {
if (value > ENC_EQ_BASS_MAX ) if (value > ENC_EQ_BASS_MAX )
value = ENC_EQ_BASS_MAX; value = ENC_EQ_BASS_MAX;

@ -137,7 +137,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 MICRO_MDAEPIANO_VERSION "0.9.6" #define MICRO_MDAEPIANO_VERSION "0.9.7"
#define MAX_SOUNDS min(99,int((4096-EEPROM_CONFIGURATIONS)/sizeof(config_t))) #define MAX_SOUNDS min(99,int((4096-EEPROM_CONFIGURATIONS)/sizeof(config_t)))
@ -243,7 +243,7 @@
#define ENC_CHORUS_INTENSITY_DEFAULT 50 #define ENC_CHORUS_INTENSITY_DEFAULT 50
// //
#define ENC_CHORUS_FEEDBACK_MIN 0 #define ENC_CHORUS_FEEDBACK_MIN 0
#define ENC_CHORUS_FEEDBACK_MAX 20 #define ENC_CHORUS_FEEDBACK_MAX 10
#define ENC_CHORUS_FEEDBACK_DEFAULT 0 #define ENC_CHORUS_FEEDBACK_DEFAULT 0
// //
#define ENC_CHORUS_WAVEFORM_MIN 1 #define ENC_CHORUS_WAVEFORM_MIN 1

Loading…
Cancel
Save