|
|
|
@ -34,6 +34,7 @@ using namespace TeensyTimerTool; |
|
|
|
|
#include "synth_dexed.h" |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#include "drums.h" |
|
|
|
|
extern void set_drums_volume(float vol); |
|
|
|
|
extern drum_config_t drum_config[]; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
@ -43,11 +44,10 @@ extern void check_configuration_performance(void); |
|
|
|
|
extern void check_configuration_fx(void); |
|
|
|
|
extern void sequencer(); |
|
|
|
|
extern float drums_volume; |
|
|
|
|
//extern StaticJsonDocument<JSON_BUFFER> data_json;
|
|
|
|
|
extern uint8_t seq_chain_lenght; |
|
|
|
|
extern uint8_t seq_data[NUM_SEQ_PATTERN][16]; |
|
|
|
|
extern uint8_t seq_vel[NUM_SEQ_PATTERN][16]; |
|
|
|
|
extern uint8_t seq_patternchain[NUM_SEQ_TRACKS][4]; |
|
|
|
|
extern uint8_t seq_patternchain[4][NUM_SEQ_TRACKS]; |
|
|
|
|
extern uint8_t seq_content_type[NUM_SEQ_PATTERN]; |
|
|
|
|
extern uint8_t seq_track_type[NUM_SEQ_TRACKS]; |
|
|
|
|
extern uint8_t seq_chord_key_ammount; |
|
|
|
@ -483,7 +483,7 @@ bool load_sd_drumsettings_json(uint8_t number, uint8_t target) |
|
|
|
|
Serial.println(); |
|
|
|
|
#endif |
|
|
|
|
drums_volume = data_json["drums_volume"]; |
|
|
|
|
|
|
|
|
|
set_drums_volume(drums_volume); |
|
|
|
|
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG; i++) |
|
|
|
|
{ |
|
|
|
|
set_sample_pitch( i, data_json["pitch"][i] ); |
|
|
|
@ -1089,13 +1089,9 @@ bool save_sd_seq_json(uint8_t seq_number) |
|
|
|
|
Serial.print(F(" to ")); |
|
|
|
|
Serial.println(filename); |
|
|
|
|
#endif |
|
|
|
|
int total = sizeof(seq_data); |
|
|
|
|
int columns = sizeof(seq_data[0]); |
|
|
|
|
int total = sizeof(seq_patternchain); |
|
|
|
|
int columns = sizeof(seq_patternchain[0]); |
|
|
|
|
int rows = total / columns; |
|
|
|
|
Serial.print(F("Rows: ")); |
|
|
|
|
Serial.print(rows); |
|
|
|
|
Serial.print(" Columns: "); |
|
|
|
|
Serial.print(columns); |
|
|
|
|
Serial.print(F(" ")); |
|
|
|
|
AudioNoInterrupts(); |
|
|
|
|
SD.begin(); |
|
|
|
@ -1103,9 +1099,6 @@ bool save_sd_seq_json(uint8_t seq_number) |
|
|
|
|
json = SD.open(filename, FILE_WRITE); |
|
|
|
|
if (json) |
|
|
|
|
{ |
|
|
|
|
total = sizeof(seq_patternchain); |
|
|
|
|
columns = sizeof(seq_patternchain[0]); |
|
|
|
|
rows = total / columns; |
|
|
|
|
Serial.print(F("Chain Rows: ")); |
|
|
|
|
Serial.print(rows); |
|
|
|
|
Serial.print(" Chain Columns: "); |
|
|
|
@ -1401,23 +1394,29 @@ bool load_sd_seq_json(uint8_t seq_number) |
|
|
|
|
int count = 0; |
|
|
|
|
for (uint8_t i = 0; i < rows; i++) |
|
|
|
|
{ |
|
|
|
|
for (uint8_t j = 0; j < columns; j++) { |
|
|
|
|
for (uint8_t j = 0; j < columns; j++) |
|
|
|
|
{ |
|
|
|
|
seq_patternchain[i][j] = data_json["seq_patternchain"][count]; |
|
|
|
|
count++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) { |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) |
|
|
|
|
{ |
|
|
|
|
seq_track_type[i] = data_json["track_type"][i]; |
|
|
|
|
} |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_content_type); i++) { |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_content_type); i++) |
|
|
|
|
{ |
|
|
|
|
seq_content_type[i] = data_json["content_type"][i]; |
|
|
|
|
} |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) { |
|
|
|
|
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) |
|
|
|
|
{ |
|
|
|
|
seq_inst_dexed[i] = data_json["seq_inst_dexed"][i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (data_json["seq_name"][0] != 0) { |
|
|
|
|
for (uint8_t i = 0; i < FILENAME_LEN; i++) { |
|
|
|
|
if (data_json["seq_name"][0] != 0) |
|
|
|
|
{ |
|
|
|
|
for (uint8_t i = 0; i < FILENAME_LEN; i++) |
|
|
|
|
{ |
|
|
|
|
seq_name[i] = data_json["seq_name"][i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|