Dateien hochladen nach „“

pull/79/head
positionhigh 4 years ago
parent 688c60720a
commit 0fb3e4dc09
  1. 5
      UI.hpp
  2. 2
      config.h
  3. 26
      dexed_sd.cpp

@ -6636,8 +6636,7 @@ void UI_func_load_voiceconfig(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
char tmp[10];
selected_instance_id = 0;
encoderDir[ENC_R].reset();
@ -6743,8 +6742,6 @@ void UI_func_save_voiceconfig(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
char tmp[FILENAME_LEN];
yesno = false;
selected_instance_id = 0;

@ -634,6 +634,8 @@
#define JSON_BUFFER_SIZE 8192
#define JSON_BUFFER 1024 //This line put back to resolve a merge conflict. this line should be removed
// Internal configuration structure
typedef struct dexed_s {
uint8_t lowest_note;

@ -52,6 +52,7 @@ extern int seq_transpose;
extern int seq_tempo_ms ;
extern int seq_bpm;
extern bool arp_play_basenote;
extern bool seq_running;
extern uint8_t arp_speed;
extern uint8_t arp_lenght;
extern uint8_t arp_style;
@ -979,6 +980,7 @@ bool save_sd_seq_json(uint8_t seq_number)
data_json["chord_key_ammount"] = seq_chord_key_ammount;
data_json["seq_oct_shift"] = seq_oct_shift;
data_json["seq_element_shift"] = seq_element_shift;
data_json["performance"] = configuration.sys.performance_number;
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) {
data_json["track_type"][i] = seq_track_type[i];
@ -1046,7 +1048,7 @@ bool load_sd_seq_json(uint8_t seq_number)
deserializeJson(data_json, json);
json.close();
AudioInterrupts();
#ifdef DEBUG
Serial.println(F("Read JSON data:"));
@ -1093,7 +1095,6 @@ bool load_sd_seq_json(uint8_t seq_number)
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) {
seq_inst_dexed[i] = data_json["seq_inst_dexed"][i];
}
count = 0;
seq_tempo_ms = data_json["seq_tempo_ms"] ;
seq_bpm = data_json["seq_bpm"];
@ -1108,10 +1109,15 @@ bool load_sd_seq_json(uint8_t seq_number)
seq_chord_key_ammount = data_json["chord_key_ammount"];
seq_oct_shift = data_json["seq_oct_shift"];
seq_element_shift = data_json["seq_element_shift"];
configuration.sys.performance_number = data_json["performance"];
load_sd_performance_json(configuration.sys.performance_number);
if (seq_running)
timer1.begin(sequencer, seq_tempo_ms / 2);
else
timer1.begin(sequencer, seq_tempo_ms / 2, false);
return (true);
}
#ifdef DEBUG
else
@ -1138,7 +1144,7 @@ bool check_sd_seq_exists(uint8_t number)
return (false);
number = constrain(number, 0, 99);
AudioNoInterrupts();
if (sd_card > 0)
{
char filename[FILENAME_LEN];
@ -1146,14 +1152,20 @@ bool check_sd_seq_exists(uint8_t number)
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, number);
// check if file exists...
AudioNoInterrupts();
if (SD.exists(filename))
{
AudioInterrupts();
return (true);
} else return (false);
} else
{
AudioInterrupts();
return (false);
}
} else
{ AudioInterrupts();
return (false);
AudioInterrupts();
}
}
/******************************************************************************

Loading…
Cancel
Save