Dateien hochladen nach „“

pull/75/head
positionhigh 3 years ago
parent 3359dcf18c
commit 1b60989609
  1. 24
      UI_FX.h
  2. 24
      UI_FX_T4.h
  3. 21
      UI_NO_FX.h
  4. 85
      dexed_sd.cpp

@ -128,15 +128,17 @@ LCDML_add(94, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght);
LCDML_add(95, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); LCDML_add(95, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup);
LCDML_add(96, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); LCDML_add(96, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style);
LCDML_add(97, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); LCDML_add(97, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign);
LCDML_add(98, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct); LCDML_add(98, LCDML_0_5_5, 6, "shift&transp.", UI_func_arp_shift);
LCDML_add(99, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_pattern_load); LCDML_add(99, LCDML_0_5_5, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount);
LCDML_add(100, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_pattern_save); LCDML_add(100, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct);
LCDML_add(101, LCDML_0, 6, "System", NULL); LCDML_add(101, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load);
LCDML_add(102, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono); LCDML_add(102, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save);
LCDML_add(103, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); LCDML_add(103, LCDML_0, 6, "System", NULL);
LCDML_add(104, LCDML_0_6, 3, "Favorites", UI_func_favorites); LCDML_add(104, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono);
LCDML_add(105, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset); LCDML_add(105, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru);
LCDML_add(106, LCDML_0, 7, "Info", UI_func_information); LCDML_add(106, LCDML_0_6, 3, "Favorites", UI_func_favorites);
LCDML_addAdvanced(107, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); LCDML_add(107, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset);
#define _LCDML_DISP_cnt 107 LCDML_add(108, LCDML_0, 7, "Info", UI_func_information);
LCDML_addAdvanced(109, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 109
#endif #endif

@ -131,15 +131,17 @@ LCDML_add(97, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght);
LCDML_add(98, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); LCDML_add(98, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup);
LCDML_add(99, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); LCDML_add(99, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style);
LCDML_add(100, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); LCDML_add(100, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign);
LCDML_add(101, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct); LCDML_add(101, LCDML_0_5_5, 6, "shift&transp.", UI_func_arp_shift);
LCDML_add(102, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_pattern_load); LCDML_add(102, LCDML_0_5_5, 7, "L.Transp.Key", UI_func_seq_live_transpose_oct);
LCDML_add(103, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_pattern_save); LCDML_add(103, LCDML_0_5_5, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount);
LCDML_add(104, LCDML_0, 6, "System", NULL); LCDML_add(104, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load);
LCDML_add(105, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono); LCDML_add(105, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save);
LCDML_add(106, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); LCDML_add(106, LCDML_0, 6, "System", NULL);
LCDML_add(107, LCDML_0_6, 3, "Favorites", UI_func_favorites); LCDML_add(107, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono);
LCDML_add(108, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset); LCDML_add(108, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru);
LCDML_add(109, LCDML_0, 7, "Info", UI_func_information); LCDML_add(109, LCDML_0_6, 3, "Favorites", UI_func_favorites);
LCDML_addAdvanced(110, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); LCDML_add(110, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset);
#define _LCDML_DISP_cnt 110 LCDML_add(111, LCDML_0, 7, "Info", UI_func_information);
LCDML_addAdvanced(112, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 112
#endif #endif

@ -102,15 +102,16 @@ LCDML_add(68, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup);
LCDML_add(69, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); LCDML_add(69, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style);
LCDML_add(70, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); LCDML_add(70, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign);
LCDML_add(71, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct); LCDML_add(71, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct);
LCDML_add(72, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_pattern_load); LCDML_add(72, LCDML_0_5_5, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount);
LCDML_add(73, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_pattern_save); LCDML_add(73, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load);
LCDML_add(74, LCDML_0, 5, "System", NULL); LCDML_add(74, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save);
LCDML_add(75, LCDML_0_5, 1, "Stereo/Mono", UI_func_stereo_mono); LCDML_add(75, LCDML_0, 5, "System", NULL);
LCDML_add(76, LCDML_0_5, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); LCDML_add(76, LCDML_0_5, 1, "Stereo/Mono", UI_func_stereo_mono);
LCDML_add(77, LCDML_0_5, 3, "Favorites", UI_func_favorites); LCDML_add(77, LCDML_0_5, 2, "MIDI Soft THRU", UI_func_midi_soft_thru);
LCDML_add(78, LCDML_0_5, 4, "EEPROM Reset", UI_func_eeprom_reset); LCDML_add(78, LCDML_0_5, 3, "Favorites", UI_func_favorites);
LCDML_add(79, LCDML_0, 6, "Info", UI_func_information); LCDML_add(79, LCDML_0_5, 4, "EEPROM Reset", UI_func_eeprom_reset);
LCDML_addAdvanced(80, LCDML_0, 5, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); LCDML_add(80, LCDML_0, 6, "Info", UI_func_information);
#define _LCDML_DISP_cnt 80 LCDML_addAdvanced(81, LCDML_0, 5, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 81
#endif #endif

@ -45,12 +45,15 @@ extern uint8_t seq_vel[10][16];
extern uint8_t seq_patternchain[4][4]; extern uint8_t seq_patternchain[4][4];
extern uint8_t seq_content_type[10]; extern uint8_t seq_content_type[10];
extern uint8_t seq_track_type[4]; extern uint8_t seq_track_type[4];
extern uint8_t seq_chord_key_ammount;
extern uint8_t seq_element_shift;
extern int seq_oct_shift;
extern int seq_transpose; extern int seq_transpose;
extern int seq_tempo_ms ; extern int seq_tempo_ms ;
extern int seq_bpm; extern int seq_bpm;
extern bool arp_play_basenote; extern bool arp_play_basenote;
extern uint8_t arp_speed; extern uint8_t arp_speed;
extern uint8_t arp_oct_usersetting; extern uint8_t arp_lenght;
extern uint8_t arp_style; extern uint8_t arp_style;
extern uint8_t seq_chord_velocity; extern uint8_t seq_chord_velocity;
extern uint8_t seq_chord_dexed_inst; extern uint8_t seq_chord_dexed_inst;
@ -830,6 +833,8 @@ bool load_sd_seq_drumsettings_json(uint8_t number)
} }
bool load_sd_seq_voicesettings_json(uint8_t number) bool load_sd_seq_voicesettings_json(uint8_t number)
{ {
uint8_t bank[MAX_DEXED];
uint8_t voice[MAX_DEXED];
if (number < 0) if (number < 0)
return (false); return (false);
@ -870,8 +875,8 @@ bool load_sd_seq_voicesettings_json(uint8_t number)
for (uint8_t i = 0; i < MAX_DEXED; i++) for (uint8_t i = 0; i < MAX_DEXED; i++)
{ {
configuration.performance.bank[i] = data_json["bank"][i]; bank[i] = data_json["bank"][i];
configuration.performance.voice[i] = data_json["voice"][i]; voice[i] = data_json["voice"][i];
configuration.fx.reverb_send[i] = data_json["rev_send"][i]; configuration.fx.reverb_send[i] = data_json["rev_send"][i];
configuration.dexed[i].midi_channel = data_json["midi_ch"][i]; configuration.dexed[i].midi_channel = data_json["midi_ch"][i];
configuration.dexed[i].sound_intensity = data_json["vol"][i]; configuration.dexed[i].sound_intensity = data_json["vol"][i];
@ -890,7 +895,7 @@ bool load_sd_seq_voicesettings_json(uint8_t number)
for (uint8_t i = 0; i < NUM_DEXED; i++) for (uint8_t i = 0; i < NUM_DEXED; i++)
{ {
load_sd_voice(configuration.performance.bank[i], configuration.performance.voice[i], i); load_sd_voice(bank[i], voice[i], i);
MicroDexed[i]->doRefreshVoice(); MicroDexed[i]->doRefreshVoice();
MicroDexed[i]->panic(); MicroDexed[i]->panic();
} }
@ -945,14 +950,14 @@ bool save_sd_seq_drumsettings_json(uint8_t number)
json = SD.open(filename, FILE_WRITE); json = SD.open(filename, FILE_WRITE);
if (json) if (json)
{ {
data_json["drums_volume"] = drums_volume; // data_json["drums_volume"] = drums_volume;
for (uint8_t i = 0; i < 20; i++) // needs to be replaced by NUM_DRUMSET_CONFIG for (uint8_t i = 0; i < 20; i++) // needs to be replaced by NUM_DRUMSET_CONFIG
{ {
data_json["pan"][i] = drum_config[i].pan; // data_json["pan"][i] = drum_config[i].pan;
data_json["vol_max"][i] = drum_config[i].vol_max; // data_json["vol_max"][i] = drum_config[i].vol_max;
data_json["vol_min"][i] = drum_config[i].vol_min; // data_json["vol_min"][i] = drum_config[i].vol_min;
data_json["reverb_send"][i] = drum_config[i].reverb_send; // data_json["reverb_send"][i] = drum_config[i].reverb_send;
} }
#ifdef DEBUG #ifdef DEBUG
Serial.println(F("Write JSON data:")); Serial.println(F("Write JSON data:"));
@ -1050,8 +1055,23 @@ bool save_sd_seq_json(uint8_t seq_number)
int count = 0; int count = 0;
seq_number = constrain(seq_number, 0, 99); seq_number = constrain(seq_number, 0, 99);
save_sd_seq_drumsettings_json(seq_number);
save_sd_seq_voicesettings_json(seq_number);
if (sd_card > 0) if (sd_card > 0)
{ {
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, seq_number);
AudioNoInterrupts();
if (SD.exists(filename)) {
Serial.println("Remove");
Serial.print(filename);
SD.remove(filename);
}
AudioInterrupts();
File json; File json;
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, seq_number); sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, seq_number);
@ -1071,7 +1091,9 @@ bool save_sd_seq_json(uint8_t seq_number)
Serial.print(" Columns: "); Serial.print(" Columns: ");
Serial.print(columns); Serial.print(columns);
Serial.print(F(" ")); Serial.print(F(" "));
AudioNoInterrupts(); AudioNoInterrupts();
json = SD.open(filename, FILE_WRITE); json = SD.open(filename, FILE_WRITE);
if (json) if (json)
{ {
@ -1114,12 +1136,15 @@ bool save_sd_seq_json(uint8_t seq_number)
data_json["seq_bpm"] = seq_bpm; data_json["seq_bpm"] = seq_bpm;
data_json["arp_play_basenote"] = arp_play_basenote; data_json["arp_play_basenote"] = arp_play_basenote;
data_json["arp_speed"] = arp_speed; data_json["arp_speed"] = arp_speed;
data_json["arp_oct_usersetting"] = arp_oct_usersetting; data_json["arp_lenght"] = arp_lenght;
data_json["arp_style"] = arp_style; data_json["arp_style"] = arp_style;
data_json["seq_chord_velocity"] = seq_chord_velocity; data_json["seq_chord_velocity"] = seq_chord_velocity;
data_json["seq_chord_dexed_inst"] = seq_chord_dexed_inst; data_json["seq_chord_dexed_inst"] = seq_chord_dexed_inst;
data_json["seq_chain_lenght"] = seq_chain_lenght; data_json["seq_chain_lenght"] = seq_chain_lenght;
data_json["seq_transpose"] = seq_transpose; data_json["seq_transpose"] = seq_transpose;
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;
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) { for (uint8_t i = 0; i < sizeof(seq_track_type); i++) {
data_json["track_type"][i] = seq_track_type[i]; data_json["track_type"][i] = seq_track_type[i];
@ -1138,10 +1163,11 @@ bool save_sd_seq_json(uint8_t seq_number)
#endif #endif
serializeJsonPretty(data_json, json); serializeJsonPretty(data_json, json);
json.close(); json.close();
AudioInterrupts();
return (true); return (true);
} }
json.close(); json.close();
AudioInterrupts();
} }
else else
{ {
@ -1151,8 +1177,6 @@ bool save_sd_seq_json(uint8_t seq_number)
Serial.println(F(" on SD.")); Serial.println(F(" on SD."));
#endif #endif
} }
save_sd_seq_drumsettings_json(seq_number);
save_sd_seq_voicesettings_json(seq_number);
AudioInterrupts(); AudioInterrupts();
return (false); return (false);
} }
@ -1165,6 +1189,9 @@ bool load_sd_seq_json(uint8_t seq_number)
seq_number = constrain(seq_number, 0, 99); seq_number = constrain(seq_number, 0, 99);
load_sd_seq_drumsettings_json(seq_number);
load_sd_seq_voicesettings_json(seq_number);
if (sd_card > 0) if (sd_card > 0)
{ {
File json; File json;
@ -1243,12 +1270,15 @@ bool load_sd_seq_json(uint8_t seq_number)
seq_bpm = data_json["seq_bpm"]; seq_bpm = data_json["seq_bpm"];
arp_play_basenote = data_json["arp_play_basenote"]; arp_play_basenote = data_json["arp_play_basenote"];
arp_speed = data_json["arp_speed"] ; arp_speed = data_json["arp_speed"] ;
arp_oct_usersetting = data_json["arp_oct_usersetting"]; arp_lenght = data_json["arp_lenght"];
arp_style = data_json["arp_style"]; arp_style = data_json["arp_style"];
seq_chord_velocity = data_json["seq_chord_velocity"]; seq_chord_velocity = data_json["seq_chord_velocity"];
seq_chord_dexed_inst = data_json["seq_chord_dexed_inst"] ; seq_chord_dexed_inst = data_json["seq_chord_dexed_inst"] ;
seq_transpose = data_json["seq_transpose"];
seq_chain_lenght = data_json["seq_chain_lenght"]; seq_chain_lenght = data_json["seq_chain_lenght"];
seq_transpose = data_json["seq_transpose"];
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"];
set_fx_params(); set_fx_params();
@ -1270,12 +1300,33 @@ bool load_sd_seq_json(uint8_t seq_number)
#endif #endif
} }
} }
load_sd_seq_drumsettings_json(seq_number);
load_sd_seq_voicesettings_json(seq_number);
AudioInterrupts(); AudioInterrupts();
return (false); return (false);
} }
bool check_sd_seq_exists(uint8_t number)
{
if (number < 0)
return (false);
number = constrain(number, 0, 99);
if (sd_card > 0)
{
char filename[FILENAME_LEN];
sprintf(filename, "/%s/%s%d.json", SEQ_CONFIG_PATH, SEQ_CONFIG_NAME, number);
// check if file exists...
AudioNoInterrupts();
if (SD.exists(filename))
{
return (true);
} else return (false);
} else
return (false);
AudioInterrupts();
}
/****************************************************************************** /******************************************************************************
SD PERFORMANCE SD PERFORMANCE

Loading…
Cancel
Save