|
|
@ -109,7 +109,6 @@ extern float _loudness; |
|
|
|
const char comp_gain_value_text1[] PROGMEM = " 0 dB"; |
|
|
|
const char comp_gain_value_text1[] PROGMEM = " 0 dB"; |
|
|
|
const char comp_gain_value_text2[] PROGMEM = "+ 6 dB"; |
|
|
|
const char comp_gain_value_text2[] PROGMEM = "+ 6 dB"; |
|
|
|
const char comp_gain_value_text3[] PROGMEM = "+12 dB"; |
|
|
|
const char comp_gain_value_text3[] PROGMEM = "+12 dB"; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_gain_value_text(void) |
|
|
|
char* get_comp_gain_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (configuration.comp_gain) |
|
|
|
switch (configuration.comp_gain) |
|
|
@ -131,7 +130,6 @@ const char comp_response_value_text1[] PROGMEM = " 0 ms"; |
|
|
|
const char comp_response_value_text2[] PROGMEM = " 25 ms"; |
|
|
|
const char comp_response_value_text2[] PROGMEM = " 25 ms"; |
|
|
|
const char comp_response_value_text3[] PROGMEM = " 50 ms"; |
|
|
|
const char comp_response_value_text3[] PROGMEM = " 50 ms"; |
|
|
|
const char comp_response_value_text4[] PROGMEM = "100 ms"; |
|
|
|
const char comp_response_value_text4[] PROGMEM = "100 ms"; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_response_value_text(void) |
|
|
|
char* get_comp_response_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (configuration.comp_response) |
|
|
|
switch (configuration.comp_response) |
|
|
@ -154,7 +152,6 @@ char* get_comp_response_value_text(void) |
|
|
|
|
|
|
|
|
|
|
|
const char comp_limit_value_text1[] PROGMEM = "soft Knee"; |
|
|
|
const char comp_limit_value_text1[] PROGMEM = "soft Knee"; |
|
|
|
const char comp_limit_value_text2[] PROGMEM = "hard Knee"; |
|
|
|
const char comp_limit_value_text2[] PROGMEM = "hard Knee"; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_limit_value_text(void) |
|
|
|
char* get_comp_limit_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (configuration.comp_limit) |
|
|
|
switch (configuration.comp_limit) |
|
|
@ -170,7 +167,6 @@ char* get_comp_limit_value_text(void) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char comp_threshold_value_text1[] = " "; |
|
|
|
char comp_threshold_value_text1[] = " "; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_threshold_value_text(void) |
|
|
|
char* get_comp_threshold_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (configuration.comp_threshold == 0) |
|
|
|
if (configuration.comp_threshold == 0) |
|
|
@ -182,23 +178,28 @@ char* get_comp_threshold_value_text(void) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char comp_attack_value_text1[] = " "; |
|
|
|
char comp_attack_value_text1[] = " "; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_attack_value_text(void) |
|
|
|
char* get_comp_attack_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
sprintf(comp_attack_value_text1, "%0d dB/s", configuration.comp_attack); |
|
|
|
sprintf(comp_attack_value_text1, "%0.1f dB/s", (float)configuration.comp_attack / 10); |
|
|
|
|
|
|
|
|
|
|
|
return (comp_attack_value_text1); |
|
|
|
return (comp_attack_value_text1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char comp_decay_value_text1[] = " "; |
|
|
|
char comp_decay_value_text1[] = " "; |
|
|
|
|
|
|
|
|
|
|
|
char* get_comp_decay_value_text(void) |
|
|
|
char* get_comp_decay_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
sprintf(comp_decay_value_text1, "%0d dB/s", configuration.comp_decay); |
|
|
|
sprintf(comp_decay_value_text1, "%0.1f dB/s", (float)configuration.comp_decay / 10); |
|
|
|
|
|
|
|
|
|
|
|
return (comp_decay_value_text1); |
|
|
|
return (comp_decay_value_text1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char tune_value_text1[] = " "; |
|
|
|
|
|
|
|
char* get_tune_value_text(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
sprintf(tune_value_text1, "%3d cent", configuration.tune); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (tune_value_text1); |
|
|
|
|
|
|
|
} |
|
|
|
/******************************************
|
|
|
|
/******************************************
|
|
|
|
MAIN MENU |
|
|
|
MAIN MENU |
|
|
|
******************************************/ |
|
|
|
******************************************/ |
|
|
@ -319,7 +320,8 @@ LiquidMenu transpose_menu(lcd); |
|
|
|
#define NUM_TUNE_MENUS 1 |
|
|
|
#define NUM_TUNE_MENUS 1 |
|
|
|
const char tune_text1[] PROGMEM = "Tune"; |
|
|
|
const char tune_text1[] PROGMEM = "Tune"; |
|
|
|
LiquidLine tune_line1(1, 0, tune_text1); |
|
|
|
LiquidLine tune_line1(1, 0, tune_text1); |
|
|
|
LiquidLine tune_line2(1, 1, configuration.tune); |
|
|
|
//LiquidLine tune_line2(1, 1, configuration.tune);
|
|
|
|
|
|
|
|
LiquidLine tune_line2(1, 1, get_tune_value_text); |
|
|
|
LiquidScreen tune_screen; |
|
|
|
LiquidScreen tune_screen; |
|
|
|
LiquidMenu tune_menu(lcd); |
|
|
|
LiquidMenu tune_menu(lcd); |
|
|
|
|
|
|
|
|
|
|
@ -518,7 +520,7 @@ LiquidMenu reverb_level_menu(lcd); |
|
|
|
CHORUS_FREQUENCY MENU |
|
|
|
CHORUS_FREQUENCY MENU |
|
|
|
******************************************/ |
|
|
|
******************************************/ |
|
|
|
#define NUM_CHORUS_FREQUENCY_MENUS 1 |
|
|
|
#define NUM_CHORUS_FREQUENCY_MENUS 1 |
|
|
|
const char chorus_frequency_text1[] PROGMEM = "Chorus Frequency"; |
|
|
|
const char chorus_frequency_text1[] PROGMEM = "Chorus Freq."; |
|
|
|
LiquidLine chorus_frequency_line1(1, 0, chorus_frequency_text1); |
|
|
|
LiquidLine chorus_frequency_line1(1, 0, chorus_frequency_text1); |
|
|
|
LiquidLine chorus_frequency_line2(1, 1, configuration.chorus_frequency); |
|
|
|
LiquidLine chorus_frequency_line2(1, 1, configuration.chorus_frequency); |
|
|
|
LiquidScreen chorus_frequency_screen; |
|
|
|
LiquidScreen chorus_frequency_screen; |
|
|
@ -1487,7 +1489,7 @@ void init_menus(void) |
|
|
|
chorus_level_screen.add_line(chorus_level_line2); |
|
|
|
chorus_level_screen.add_line(chorus_level_line2); |
|
|
|
chorus_level_screen.set_displayLineCount(2); |
|
|
|
chorus_level_screen.set_displayLineCount(2); |
|
|
|
chorus_level_menu.add_screen(chorus_level_screen); |
|
|
|
chorus_level_menu.add_screen(chorus_level_screen); |
|
|
|
|
|
|
|
|
|
|
|
// setup bass_lr_level menu
|
|
|
|
// setup bass_lr_level menu
|
|
|
|
bass_lr_level_screen.add_line(bass_lr_level_line1); |
|
|
|
bass_lr_level_screen.add_line(bass_lr_level_line1); |
|
|
|
bass_lr_level_screen.add_line(bass_lr_level_line2); |
|
|
|
bass_lr_level_screen.add_line(bass_lr_level_line2); |
|
|
@ -1826,7 +1828,7 @@ void set_comp_attack(uint8_t value) |
|
|
|
Serial.println(value); |
|
|
|
Serial.println(value); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
//float tmp = mapfloat(float(value), ENC_COMP_ATTACK_MIN, ENC_COMP_ATTACK_MAX, 0.0, 1.0);
|
|
|
|
//float tmp = mapfloat(float(value), ENC_COMP_ATTACK_MIN, ENC_COMP_ATTACK_MAX, 0.0, 1.0);
|
|
|
|
sgtl5000_1.autoVolumeControl(configuration.comp_gain, configuration.comp_response, configuration.comp_limit, (float)configuration.comp_threshold, (float)value, (float)configuration.comp_decay); // maxGain, response, hardLimit, threshold, attack, decay, e.g.: 1, 1, 1, 0.9, 0.01, 0.05
|
|
|
|
sgtl5000_1.autoVolumeControl(configuration.comp_gain, configuration.comp_response, configuration.comp_limit, (float)configuration.comp_threshold, (float)value / 10, (float)configuration.comp_decay); // maxGain, response, hardLimit, threshold, attack, decay, e.g.: 1, 1, 1, 0.9, 0.01, 0.05
|
|
|
|
configuration.comp_attack = value; |
|
|
|
configuration.comp_attack = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1837,7 +1839,7 @@ void set_comp_decay(uint8_t value) |
|
|
|
Serial.println(value); |
|
|
|
Serial.println(value); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
//float tmp = mapfloat(float(value), ENC_COMP_DECAY_MIN, ENC_COMP_DECAY_MAX, 0.0, 1.0);
|
|
|
|
//float tmp = mapfloat(float(value), ENC_COMP_DECAY_MIN, ENC_COMP_DECAY_MAX, 0.0, 1.0);
|
|
|
|
sgtl5000_1.autoVolumeControl(configuration.comp_gain, configuration.comp_response, configuration.comp_limit, (float)configuration.comp_threshold, (float)configuration.comp_attack, (float)value); // maxGain, response, hardLimit, threshold, attack, decay, e.g.: 1, 1, 1, 0.9, 0.01, 0.05
|
|
|
|
sgtl5000_1.autoVolumeControl(configuration.comp_gain, configuration.comp_response, configuration.comp_limit, (float)configuration.comp_threshold, (float)configuration.comp_attack, (float)value / 10); // maxGain, response, hardLimit, threshold, attack, decay, e.g.: 1, 1, 1, 0.9, 0.01, 0.05
|
|
|
|
configuration.comp_decay = value; |
|
|
|
configuration.comp_decay = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|