|
|
|
@ -38,7 +38,7 @@ extern void check_configuration_dexed(uint8_t instance_id); |
|
|
|
|
extern void check_configuration_performance(void); |
|
|
|
|
extern void check_configuration_fx(void); |
|
|
|
|
extern void sequencer(); |
|
|
|
|
extern StaticJsonDocument<JSON_BUFFER> data_json; |
|
|
|
|
//extern StaticJsonDocument<JSON_BUFFER> data_json;
|
|
|
|
|
extern uint8_t seq_chain_lenght; |
|
|
|
|
extern uint8_t seq_data[10][16]; |
|
|
|
|
extern uint8_t seq_vel[10][16]; |
|
|
|
@ -433,7 +433,7 @@ bool load_sd_voiceconfig_json(int8_t vc, uint8_t instance_id) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
sprintf(filename, "/%s/%s%d.json", VOICE_CONFIG_PATH, VOICE_CONFIG_NAME, vc); |
|
|
|
|
|
|
|
|
|
// first check if file exists...
|
|
|
|
@ -525,7 +525,7 @@ bool save_sd_voiceconfig_json(uint8_t vc, uint8_t instance_id) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
sprintf(filename, "/%s/%s%d.json", VOICE_CONFIG_PATH, VOICE_CONFIG_NAME, vc); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -612,6 +612,7 @@ bool load_sd_fx_json(int8_t fx) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
char filename[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
sprintf(filename, "/%s/%s%d.json", FX_CONFIG_PATH, FX_CONFIG_NAME, fx); |
|
|
|
@ -704,7 +705,7 @@ bool save_sd_fx_json(uint8_t fx) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
sprintf(filename, "/%s/%s%d.json", FX_CONFIG_PATH, FX_CONFIG_NAME, fx); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -781,6 +782,7 @@ bool load_sd_seq_drumsettings_json(uint8_t number) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
char filename[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
sprintf(filename, "/%s/%s%d-d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, number); |
|
|
|
@ -849,7 +851,7 @@ bool save_sd_seq_drumsettings_json(uint8_t number) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
sprintf(filename, "/%s/%s%d-d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, number); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -905,7 +907,7 @@ bool save_sd_seq_json(uint8_t seq_number) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, seq_number); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -1023,6 +1025,7 @@ bool load_sd_seq_json(uint8_t seq_number) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
char filename[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, seq_number); |
|
|
|
@ -1166,6 +1169,7 @@ bool load_sd_performance_json(int8_t p) |
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
char filename[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
sprintf(filename, "/%s/%s%d.json", PERFORMANCE_CONFIG_PATH, PERFORMANCE_CONFIG_NAME, p); |
|
|
|
@ -1239,11 +1243,12 @@ bool save_sd_performance_json(uint8_t p) |
|
|
|
|
char filename[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
p = constrain(p, 0, MAX_PERFORMANCE); |
|
|
|
|
sprintf(filename, "/%s/%s%d.json", PERFORMANCE_CONFIG_PATH, PERFORMANCE_CONFIG_NAME, p); |
|
|
|
|
|
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
File json; |
|
|
|
|
|
|
|
|
|
StaticJsonDocument<JSON_BUFFER_SIZE> data_json; |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Saving performance config as JSON")); |
|
|
|
|
Serial.print(p); |
|
|
|
@ -1262,7 +1267,8 @@ bool save_sd_performance_json(uint8_t p) |
|
|
|
|
Serial.print(configuration.performance.fx_number); |
|
|
|
|
Serial.println(F(" does not exists, creating one.")); |
|
|
|
|
#endif |
|
|
|
|
save_sd_performance_json(configuration.performance.fx_number); |
|
|
|
|
//save_sd_performance_json(configuration.performance.fx_number);
|
|
|
|
|
save_sd_fx_json(configuration.performance.fx_number); |
|
|
|
|
} |
|
|
|
|
for (uint8_t i = 0; i < MAX_DEXED; i++) |
|
|
|
|
{ |
|
|
|
|