|
|
|
@ -418,7 +418,7 @@ void setup() |
|
|
|
|
sgtl5000.enable(); |
|
|
|
|
sgtl5000.lineOutLevel(SGTL5000_LINEOUT_LEVEL); |
|
|
|
|
sgtl5000.dacVolumeRamp(); |
|
|
|
|
//sgtl5000.dacVolume(1.0); // doing this at the end of setup()
|
|
|
|
|
sgtl5000.dacVolume(1.0); |
|
|
|
|
//sgtl5000.dacVolumeRampLinear();
|
|
|
|
|
//sgtl5000.dacVolumeRampDisable();
|
|
|
|
|
sgtl5000.unmuteHeadphone(); |
|
|
|
@ -645,10 +645,6 @@ void setup() |
|
|
|
|
|
|
|
|
|
strcpy(seq_name, "INIT Perf"); |
|
|
|
|
LCDML.OTHER_jumpToFunc(UI_func_voice_select); |
|
|
|
|
|
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
|
sgtl5000.dacVolume(1.0); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void loop() |
|
|
|
@ -1930,15 +1926,31 @@ void initial_values(bool init) |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
uint8_t eeprom_performance = EEPROM[EEPROM_START_ADDRESS + 2]; |
|
|
|
|
|
|
|
|
|
load_sd_sys_json(); |
|
|
|
|
if (configuration.sys.load_at_startup == 255) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Loading initial system data from performance ")); |
|
|
|
|
Serial.println(eeprom_performance, DEC); |
|
|
|
|
Serial.print(F("Loading initial system data from performance ")); |
|
|
|
|
Serial.println(configuration.sys.performance_number, DEC); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
load_sd_performance_json(eeprom_performance); |
|
|
|
|
load_sd_sys_json(); |
|
|
|
|
load_sd_performance_json(configuration.sys.performance_number); |
|
|
|
|
} |
|
|
|
|
else if (configuration.sys.load_at_startup < 100) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Loading initial system data from performance ")); |
|
|
|
|
Serial.println(configuration.sys.load_at_startup, DEC); |
|
|
|
|
#endif |
|
|
|
|
load_sd_performance_json(configuration.sys.load_at_startup); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Loading initial system data from default performance ")); |
|
|
|
|
Serial.println(STARTUP_NUM_DEFAULT, DEC); |
|
|
|
|
#endif |
|
|
|
|
load_sd_performance_json(STARTUP_NUM_DEFAULT); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("OK, loaded!")); |
|
|
|
@ -1946,7 +1958,7 @@ void initial_values(bool init) |
|
|
|
|
|
|
|
|
|
check_configuration(); |
|
|
|
|
} |
|
|
|
|
configuration.sys.vol = EEPROM[EEPROM_START_ADDRESS + 3]; |
|
|
|
|
configuration.sys.vol = EEPROM[EEPROM_START_ADDRESS + 2]; |
|
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -1970,6 +1982,7 @@ void check_configuration_sys(void) |
|
|
|
|
configuration.sys.soft_midi_thru = constrain(configuration.sys.soft_midi_thru, SOFT_MIDI_THRU_MIN, SOFT_MIDI_THRU_MAX); |
|
|
|
|
configuration.sys.favorites = constrain(configuration.sys.favorites, FAVORITES_NUM_MIN, FAVORITES_NUM_MAX); |
|
|
|
|
configuration.sys.performance_number = constrain(configuration.sys.performance_number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX); |
|
|
|
|
configuration.sys.load_at_startup = constrain(configuration.sys.load_at_startup, STARTUP_NUM_MIN, STARTUP_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void check_configuration_fx(void) |
|
|
|
@ -2065,6 +2078,7 @@ void init_configuration(void) |
|
|
|
|
configuration.sys.mono = MONO_DEFAULT; |
|
|
|
|
configuration.sys.soft_midi_thru = SOFT_MIDI_THRU_DEFAULT; |
|
|
|
|
configuration.sys.performance_number = PERFORMANCE_NUM_DEFAULT; |
|
|
|
|
configuration.sys.load_at_startup = STARTUP_NUM_DEFAULT; |
|
|
|
|
|
|
|
|
|
#ifdef USE_PLATEREVERB |
|
|
|
|
configuration.fx.reverb_lowpass = REVERB_LOWPASS_DEFAULT; |
|
|
|
@ -2145,8 +2159,7 @@ void eeprom_update(void) |
|
|
|
|
{ |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS, (EEPROM_MARKER & 0xff00) >> 8); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + 1, EEPROM_MARKER & 0xff); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + 2, configuration.sys.performance_number); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + 3, configuration.sys.vol); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + 2, configuration.sys.vol); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
@ -2777,6 +2790,7 @@ void show_configuration(void) |
|
|
|
|
Serial.print(F(" Soft MIDI Thru ")); Serial.println(configuration.sys.soft_midi_thru, DEC); |
|
|
|
|
Serial.print(F(" Favorites ")); Serial.println(configuration.sys.favorites, DEC); |
|
|
|
|
Serial.print(F(" Performance Number ")); Serial.println(configuration.sys.performance_number, DEC); |
|
|
|
|
Serial.print(F(" Load at startup ")); Serial.println(configuration.sys.load_at_startup, DEC); |
|
|
|
|
Serial.println(F("FX")); |
|
|
|
|
Serial.print(F(" Reverb Roomsize ")); Serial.println(configuration.fx.reverb_roomsize, DEC); |
|
|
|
|
Serial.print(F(" Reverb Level ")); Serial.println(configuration.fx.reverb_level, DEC); |
|
|
|
|