|
|
|
@ -53,6 +53,7 @@ |
|
|
|
|
|
|
|
|
|
extern PeriodicTimer timer1; |
|
|
|
|
extern void sequencer(void); |
|
|
|
|
extern bool check_sd_seq_exists(uint8_t); |
|
|
|
|
|
|
|
|
|
extern config_t configuration; |
|
|
|
|
extern void set_volume(uint8_t v, uint8_t m); |
|
|
|
@ -78,6 +79,7 @@ extern uint8_t seq_patternchain[4][4]; |
|
|
|
|
extern uint8_t seq_content_type[10]; |
|
|
|
|
extern uint8_t seq_track_type[4]; |
|
|
|
|
extern uint8_t seq_step; |
|
|
|
|
extern uint8_t seq_chord_key_ammount; |
|
|
|
|
extern int seq_tempo_ms; |
|
|
|
|
extern uint8_t seq_bpm; |
|
|
|
|
extern uint8_t seq_chain_lenght; |
|
|
|
@ -92,15 +94,19 @@ extern uint8_t seq_temp_active_menu; |
|
|
|
|
extern uint8_t seq_chain_active_chainstep; //for editor
|
|
|
|
|
extern uint8_t seq_chain_active_step; |
|
|
|
|
extern int seq_transpose; |
|
|
|
|
extern uint8_t seq_inst_dexed[4]; |
|
|
|
|
extern uint8_t arp_step; |
|
|
|
|
extern uint8_t arp_note; |
|
|
|
|
extern uint8_t arp_chord; |
|
|
|
|
extern uint8_t arp_octave; |
|
|
|
|
extern uint8_t arp_oct_usersetting; |
|
|
|
|
extern uint8_t arp_lenght; |
|
|
|
|
extern uint8_t arp_style; |
|
|
|
|
extern uint8_t arp_speed; |
|
|
|
|
extern uint8_t seq_element_shift; |
|
|
|
|
extern int seq_oct_shift; |
|
|
|
|
extern char arp_style_names[4][3]; |
|
|
|
|
extern char seq_chord_names[7][4]; |
|
|
|
|
extern float drums_volume; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
@ -282,14 +288,17 @@ void UI_func_information(uint8_t param); |
|
|
|
|
void UI_func_sequencer(uint8_t param); |
|
|
|
|
void UI_func_seq_vel_editor(uint8_t param); |
|
|
|
|
void UI_func_seq_live_transpose_oct(uint8_t param); |
|
|
|
|
void UI_func_arp_shift(uint8_t param); |
|
|
|
|
void UI_func_seq_chord_keys_ammount(uint8_t param); |
|
|
|
|
void UI_func_seq_lenght(uint8_t param); |
|
|
|
|
void UI_func_seq_tempo(uint8_t param); |
|
|
|
|
void UI_func_seq_pat_chain(uint8_t param); |
|
|
|
|
void UI_func_arpeggio(uint8_t param); |
|
|
|
|
void UI_func_seq_track_setup(uint8_t param); |
|
|
|
|
void UI_func_dexed_assign(uint8_t param); |
|
|
|
|
void UI_func_seq_display_style(uint8_t param); |
|
|
|
|
void UI_func_seq_pattern_load(uint8_t param); |
|
|
|
|
void UI_func_seq_pattern_save(uint8_t param); |
|
|
|
|
void UI_func_seq_state_load(uint8_t param); |
|
|
|
|
void UI_func_seq_state_save(uint8_t param); |
|
|
|
|
void UI_func_volume(uint8_t param); |
|
|
|
|
void UI_func_load_performance(uint8_t param); |
|
|
|
|
void UI_func_save_performance(uint8_t param); |
|
|
|
@ -337,7 +346,7 @@ void locate_previous_favorite(); |
|
|
|
|
void locate_next_favorite(); |
|
|
|
|
void locate_next_non_favorite(); |
|
|
|
|
void locate_random_non_favorite(); |
|
|
|
|
void UI_func_drum_main_volume(uint8_t param); |
|
|
|
|
void UI_func_drums_main_volume(uint8_t param); |
|
|
|
|
void UI_func_drum_volume(uint8_t param); |
|
|
|
|
void UI_func_drum_pan(uint8_t param); |
|
|
|
|
|
|
|
|
@ -3600,6 +3609,10 @@ void UI_func_drum_reverb_send(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("Drum Rev. Send"); |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
sprintf(displayname, "%02d", activesample); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.show(4, 5, 6, basename(drum_config[activesample].name)); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
@ -3674,9 +3687,42 @@ void UI_func_drum_reverb_send(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_main_volume(uint8_t param) |
|
|
|
|
void UI_func_drums_main_volume(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
; |
|
|
|
|
char displayname[4] = {0, 0, 0, 0}; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
temp_int = mapfloat(drums_volume, 0.0, VOL_MAX_FLOAT, 0, 100); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(" Drums M.Volume "); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
temp_int = constrain(temp_int + ENCODER[ENC_R].speed(), 0, 100); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
temp_int = constrain(temp_int - ENCODER[ENC_R].speed(), 0, 100); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(5, 1); |
|
|
|
|
sprintf(displayname, "%03d", temp_int); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.setCursor(8, 1); |
|
|
|
|
lcd.print("/100"); |
|
|
|
|
master_mixer_r.gain (2, mapfloat(temp_int, 0, 100, 0.0, VOL_MAX_FLOAT)); |
|
|
|
|
master_mixer_l.gain (2, mapfloat(temp_int, 0, 100, 0.0, VOL_MAX_FLOAT)); |
|
|
|
|
drums_volume = mapfloat(temp_int, 0, 100, 0.0, VOL_MAX_FLOAT); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_volume(uint8_t param) |
|
|
|
@ -3687,6 +3733,12 @@ void UI_func_drum_volume(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("DrumSmp. Volume"); |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
sprintf(displayname, "%02d", activesample); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.show(1, 4, 7, basename(drum_config[activesample].name)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
@ -3762,6 +3814,88 @@ void UI_func_drum_volume(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_arp_shift(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
char displayname[4] = {0, 0, 0, 0}; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("Arp/Chord Transp"); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Oct"); |
|
|
|
|
lcd.setCursor(4, 1); |
|
|
|
|
sprintf(displayname, "%02d", seq_oct_shift); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.setCursor(8, 1); |
|
|
|
|
lcd.print("Shift"); |
|
|
|
|
lcd.setCursor(14, 1); |
|
|
|
|
lcd.print(seq_element_shift); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (menu_select_toggle == false) { |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
seq_oct_shift = constrain(seq_oct_shift + ENCODER[ENC_R].speed(), -2, 2); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
seq_oct_shift = constrain(seq_oct_shift - ENCODER[ENC_R].speed(), -2, 2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
seq_element_shift = constrain(seq_element_shift + ENCODER[ENC_R].speed(), 0, 6); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
seq_element_shift = constrain(seq_element_shift - ENCODER[ENC_R].speed(), 0, 6); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
menu_select_toggle = !menu_select_toggle; |
|
|
|
|
} |
|
|
|
|
if (menu_select_toggle == false) |
|
|
|
|
{ lcd.setCursor(13, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(3, 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(6, 1); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(4, 1); |
|
|
|
|
sprintf(displayname, "%02d", seq_oct_shift); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
lcd.setCursor(3, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(6, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(13, 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(14, 1); |
|
|
|
|
lcd.print(seq_element_shift); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_pan(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
char displayname[8] = {0, 0, 0, 0, 0, 0, 0}; |
|
|
|
@ -3770,6 +3904,10 @@ void UI_func_drum_pan(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("DrmSmp. Panorama"); |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
sprintf(displayname, "%02d", activesample); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.show(1, 4, 6, basename(drum_config[activesample].name)); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
@ -3843,7 +3981,7 @@ void UI_func_drum_pan(uint8_t param) |
|
|
|
|
else { |
|
|
|
|
lcd.print("C"); |
|
|
|
|
} |
|
|
|
|
sprintf(displayname, "%02d", temp_int); |
|
|
|
|
sprintf(displayname, "%02d", abs(temp_int)); |
|
|
|
|
lcd.setCursor(13, 1); |
|
|
|
|
lcd.print( displayname); |
|
|
|
|
} |
|
|
|
@ -4042,6 +4180,38 @@ void UI_func_seq_live_transpose_oct(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_seq_chord_keys_ammount(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
char displayname[4] = {0, 0, 0, 0}; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("ChordTrack Keys:"); |
|
|
|
|
lcd.setCursor(8, 1); |
|
|
|
|
lcd.print("Keys"); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
seq_chord_key_ammount = constrain(seq_chord_key_ammount + ENCODER[ENC_R].speed(), 1, 7); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
seq_chord_key_ammount = constrain(seq_chord_key_ammount - ENCODER[ENC_R].speed(), 1, 7); |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(4, 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
sprintf(displayname, "%02d", seq_chord_key_ammount); |
|
|
|
|
lcd.print(displayname); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_seq_lenght(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
@ -4411,7 +4581,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
|
seq_active_track = constrain(seq_active_track - 1, 0, 9); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(1, 0); |
|
|
|
|
if (seq_content_type[seq_active_track] == 0) lcd.print("Drum "); else lcd.print("Inst "); //else lcd.print("[ ]");
|
|
|
|
|
if (seq_content_type[seq_active_track] == 0) lcd.print("Drum "); else if (seq_content_type[seq_active_track] == 1) lcd.print("Instr "); else if (seq_content_type[seq_active_track] == 2) lcd.print("Chord "); else lcd.print("Arp "); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
@ -4483,7 +4653,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
|
seq_active_function = 0; |
|
|
|
|
} else if ( seq_menu == 0 && seq_active_function == 0) |
|
|
|
|
{ |
|
|
|
|
if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 4) || (seq_content_type[seq_active_track] == 1 && temp_int == 114) ) |
|
|
|
|
if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 4) || (seq_content_type[seq_active_track] > 0 && temp_int == 114) ) |
|
|
|
|
{ //fill patterns
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("Fill Pattern:"); |
|
|
|
@ -4493,25 +4663,25 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
|
seq_temp_select_menu = 0; |
|
|
|
|
seq_temp_active_menu = 0; |
|
|
|
|
} |
|
|
|
|
else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 3) || (seq_content_type[seq_active_track] == 1 && temp_int == 113) ) |
|
|
|
|
else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 3) || (seq_content_type[seq_active_track] > 0 && temp_int == 113) ) |
|
|
|
|
{ //swap patterns: Active pattern <-> destination pattern
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("Swap Pattern:"); |
|
|
|
|
temp_int = seq_active_track + 1; |
|
|
|
|
if (temp_int > 9)temp_int = 0; |
|
|
|
|
seq_menu = 30; |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 2) || (seq_content_type[seq_active_track] == 1 && temp_int == 112) ) |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 2) || (seq_content_type[seq_active_track] > 0 && temp_int == 112) ) |
|
|
|
|
{ //copy pattern
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("Copy Pattern:"); |
|
|
|
|
temp_int = seq_active_track + 1; |
|
|
|
|
if (temp_int > 9)temp_int = 0; |
|
|
|
|
seq_menu = 31; |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 1) || (seq_content_type[seq_active_track] == 1 && temp_int == 111) ) |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG + 1) || (seq_content_type[seq_active_track] > 0 && temp_int == 111) ) |
|
|
|
|
{ //clear all patterns
|
|
|
|
|
seq_clear_all_patterns(); |
|
|
|
|
seq_printAllSeqSteps(); |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG) || (seq_content_type[seq_active_track] == 1 && temp_int == 110) ) |
|
|
|
|
} else if ( (seq_content_type[seq_active_track] == 0 && activesample == NUM_DRUMSET_CONFIG) || (seq_content_type[seq_active_track] > 0 && temp_int == 110) ) |
|
|
|
|
{ //clear pattern
|
|
|
|
|
seq_clear_active_pattern(); |
|
|
|
|
seq_printAllSeqSteps(); |
|
|
|
@ -4600,7 +4770,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
|
|
|
|
|
|
} else if (seq_menu == 32 ) { //fill pattern
|
|
|
|
|
|
|
|
|
|
if (seq_content_type[seq_active_track] == 0) { //inst
|
|
|
|
|
if (seq_content_type[seq_active_track] == 0) { //drum
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("with"); |
|
|
|
|
lcd.setCursor(4, 1); |
|
|
|
@ -4787,7 +4957,7 @@ void UI_func_arpeggio(uint8_t param) |
|
|
|
|
seq_temp_select_menu = 0; |
|
|
|
|
seq_temp_active_menu = 0; |
|
|
|
|
lcd.setCursor( 0, 0); |
|
|
|
|
lcd.print("Oct"); |
|
|
|
|
lcd.print("Len"); |
|
|
|
|
lcd.setCursor(7, 0); |
|
|
|
|
lcd.print( seq_chord_names[arp_chord][0]); |
|
|
|
|
lcd.print( seq_chord_names[arp_chord][1]); |
|
|
|
@ -4809,12 +4979,13 @@ void UI_func_arpeggio(uint8_t param) |
|
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu + ENCODER[ENC_R].speed(), 0, 3); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu - ENCODER[ENC_R].speed(), 0, 3); |
|
|
|
|
} else if (seq_temp_active_menu == 1) // Octave setting
|
|
|
|
|
} |
|
|
|
|
else if (seq_temp_active_menu == 1) // Octave setting
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
arp_oct_usersetting = constrain(arp_oct_usersetting + ENCODER[ENC_R].speed(), 0, 3); |
|
|
|
|
arp_lenght = constrain(arp_lenght + ENCODER[ENC_R].speed(), 0, 9); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
arp_oct_usersetting = constrain(arp_oct_usersetting - ENCODER[ENC_R].speed(), 0, 3); |
|
|
|
|
arp_lenght = constrain(arp_lenght - ENCODER[ENC_R].speed(), 0, 9); |
|
|
|
|
} |
|
|
|
|
else if (seq_temp_active_menu == 2) // Style setting
|
|
|
|
|
{ |
|
|
|
@ -4880,10 +5051,8 @@ void UI_func_arpeggio(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor( 4, 0); |
|
|
|
|
lcd.print(arp_oct_usersetting); |
|
|
|
|
lcd.print(arp_lenght); |
|
|
|
|
lcd.setCursor( 6, 1); |
|
|
|
|
lcd.print( arp_style_names[arp_style][0] ); |
|
|
|
|
lcd.print( arp_style_names[arp_style][1] ); |
|
|
|
@ -4904,11 +5073,9 @@ void UI_func_arpeggio(uint8_t param) |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor( 15, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else if (seq_temp_select_menu == 1) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
lcd.setCursor( 5, 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor( 9, 1); |
|
|
|
@ -4952,7 +5119,6 @@ void UI_func_arpeggio(uint8_t param) |
|
|
|
|
lcd.setCursor( 5, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
@ -5265,7 +5431,122 @@ void UI_func_seq_track_setup(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
|
void UI_func_dexed_assign(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
// setup function
|
|
|
|
|
seq_temp_active_menu = 99; |
|
|
|
|
lcd.setCursor(0 , 0); |
|
|
|
|
lcd.print("T1"); |
|
|
|
|
lcd.setCursor(0 , 1); |
|
|
|
|
lcd.print("T2"); |
|
|
|
|
lcd.setCursor(9 , 0); |
|
|
|
|
lcd.print("T3"); |
|
|
|
|
lcd.setCursor(9 , 1); |
|
|
|
|
lcd.print("T4"); |
|
|
|
|
lcd.setCursor(3 , 0); |
|
|
|
|
if (seq_inst_dexed[0] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
|
if (seq_inst_dexed[1] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
lcd.setCursor(12 , 0); |
|
|
|
|
if (seq_inst_dexed[2] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
lcd.setCursor(12 , 1); |
|
|
|
|
if (seq_inst_dexed[3] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (seq_temp_active_menu == 99) { |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu + 1, 0, 3); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, 3); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
seq_inst_dexed[seq_temp_active_menu] = constrain(seq_inst_dexed[seq_temp_active_menu] + 1, 0, 1); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
seq_inst_dexed[seq_temp_active_menu] = constrain(seq_inst_dexed[seq_temp_active_menu] - 1, 0, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
|
{ |
|
|
|
|
if (seq_temp_active_menu == 99) { |
|
|
|
|
seq_temp_active_menu = seq_temp_select_menu; |
|
|
|
|
} else |
|
|
|
|
{ |
|
|
|
|
seq_temp_active_menu = 99; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (seq_temp_select_menu == 0) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(6 , 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(6 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(3 , 0); |
|
|
|
|
if (seq_inst_dexed[0] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
} else if (seq_temp_select_menu == 1) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(6 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(6 , 1); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(11 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(15 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
|
if (seq_inst_dexed[1] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
} else if (seq_temp_select_menu == 2) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(6 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(11 , 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(15 , 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(11 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(15 , 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(12 , 0); |
|
|
|
|
if (seq_inst_dexed[2] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
} else if (seq_temp_select_menu == 3) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(11 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(15 , 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(11 , 1); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(15 , 1); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
lcd.setCursor(12 , 1); |
|
|
|
|
if (seq_inst_dexed[3] == 0 ) lcd.print("D1"); else lcd.print("D2"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_seq_state_load(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static uint8_t mode; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
@ -5275,7 +5556,7 @@ void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
|
mode = 0; |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Load Patterns")); |
|
|
|
|
lcd.print(F("Load Seq. state ")); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
sprintf(tmp, "[%2d]", param); |
|
|
|
|
lcd.print(tmp); |
|
|
|
@ -5306,11 +5587,18 @@ void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
char tmp[10]; |
|
|
|
|
sprintf(tmp, "[%2d]", temp_int); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
lcd.setCursor(5, 1); |
|
|
|
|
if (check_sd_seq_exists(temp_int)) |
|
|
|
|
{ |
|
|
|
|
lcd.print("-- DATA --"); |
|
|
|
|
} |
|
|
|
|
else lcd.print(" "); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
@ -5324,7 +5612,7 @@ void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_seq_pattern_save(uint8_t param) |
|
|
|
|
void UI_func_seq_state_save(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static bool overwrite; |
|
|
|
|
static bool yesno; |
|
|
|
@ -5337,7 +5625,7 @@ void UI_func_seq_pattern_save(uint8_t param) |
|
|
|
|
mode = 0; |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Save Patterns to:")); |
|
|
|
|
lcd.print(F("Save Seq. state:")); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
sprintf(tmp, "[%2d]", temp_int); |
|
|
|
|
lcd.print(tmp); |
|
|
|
@ -5412,6 +5700,8 @@ void UI_func_seq_pattern_save(uint8_t param) |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
sprintf(tmp, "[%2d]", temp_int); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
lcd.setCursor(5, 1); |
|
|
|
|
if (overwrite == false)lcd.print("-- empty --"); else lcd.print(" "); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|