|
|
@ -64,9 +64,20 @@ extern void eeprom_update_dexed(uint8_t instance_id); |
|
|
|
extern float pseudo_log_curve(float value); |
|
|
|
extern float pseudo_log_curve(float value); |
|
|
|
extern uint8_t selected_instance_id; |
|
|
|
extern uint8_t selected_instance_id; |
|
|
|
extern char receive_bank_filename[FILENAME_LEN]; |
|
|
|
extern char receive_bank_filename[FILENAME_LEN]; |
|
|
|
extern uint8_t seq_data[4][16]; |
|
|
|
|
|
|
|
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
|
|
|
#include "drums.h" |
|
|
|
|
|
|
|
extern drum_config_t drum_config[DRUM_MAX_INSTRUMENTS + 1]; |
|
|
|
|
|
|
|
extern uint8_t num_drums; |
|
|
|
|
|
|
|
extern char drumset_name[26]; |
|
|
|
|
|
|
|
extern uint8_t seq_data[10][16]; |
|
|
|
|
|
|
|
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_step_timer; |
|
|
|
extern uint8_t seq_content_type[10]; |
|
|
|
|
|
|
|
extern uint8_t seq_track_type[4]; |
|
|
|
|
|
|
|
extern uint8_t seq_step; |
|
|
|
|
|
|
|
extern int seq_tempo_ms; |
|
|
|
|
|
|
|
extern uint8_t seq_bpm; |
|
|
|
extern uint8_t seq_chain_lenght; |
|
|
|
extern uint8_t seq_chain_lenght; |
|
|
|
extern bool seq_running; |
|
|
|
extern bool seq_running; |
|
|
|
extern bool seq_recording; |
|
|
|
extern bool seq_recording; |
|
|
@ -75,16 +86,11 @@ uint8_t activesample; |
|
|
|
extern uint8_t seq_active_track; |
|
|
|
extern uint8_t seq_active_track; |
|
|
|
extern elapsedMillis seq_millis_timer; |
|
|
|
extern elapsedMillis seq_millis_timer; |
|
|
|
extern uint8_t seq_menu; |
|
|
|
extern uint8_t seq_menu; |
|
|
|
extern uint8_t seq_chain_select_menu; |
|
|
|
extern uint8_t seq_temp_select_menu; |
|
|
|
extern uint8_t seq_chain_active_menu; |
|
|
|
extern uint8_t seq_temp_active_menu; |
|
|
|
extern uint8_t seq_chain_active_chainstep; //for editor
|
|
|
|
extern uint8_t seq_chain_active_chainstep; //for editor
|
|
|
|
extern uint8_t seq_chain_active_step; |
|
|
|
extern uint8_t seq_chain_active_step; |
|
|
|
extern int seq_transpose; |
|
|
|
extern int seq_transpose; |
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
|
|
|
#include "drums.h" |
|
|
|
|
|
|
|
extern drum_config_t drum_config[DRUM_MAX_INSTRUMENTS + 1]; |
|
|
|
|
|
|
|
extern uint8_t num_drums; |
|
|
|
|
|
|
|
extern char drumset_name[26]; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
@ -263,9 +269,12 @@ void UI_func_portamento_time(uint8_t param); |
|
|
|
void UI_handle_OP(uint8_t param); |
|
|
|
void UI_handle_OP(uint8_t param); |
|
|
|
void UI_func_information(uint8_t param); |
|
|
|
void UI_func_information(uint8_t param); |
|
|
|
void UI_func_sequencer(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_seq_live_transpose_oct(uint8_t param); |
|
|
|
void UI_func_seq_lenght(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_seq_pat_chain(uint8_t param); |
|
|
|
|
|
|
|
void UI_func_seq_track_setup(uint8_t param); |
|
|
|
void UI_func_seq_pattern_load(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_pattern_save(uint8_t param); |
|
|
|
void UI_func_volume(uint8_t param); |
|
|
|
void UI_func_volume(uint8_t param); |
|
|
@ -677,6 +686,14 @@ void lcdml_menu_control(void) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
encoderDir[ENC_R].ButtonLong(true); |
|
|
|
encoderDir[ENC_R].ButtonLong(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (seq_running) { |
|
|
|
|
|
|
|
seq_running = false; |
|
|
|
|
|
|
|
seq_recording = false; |
|
|
|
|
|
|
|
seq_step = 0; |
|
|
|
|
|
|
|
seq_chain_active_step = 0; |
|
|
|
|
|
|
|
MicroDexed[0]->panic(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LCDML.BT_enter(); |
|
|
|
LCDML.BT_enter(); |
|
|
@ -3616,7 +3633,7 @@ void UI_func_drum_reverb_send(uint8_t param) |
|
|
|
lcd.setCursor(1, 1); |
|
|
|
lcd.setCursor(1, 1); |
|
|
|
sprintf(displayname, "%02d", activesample); |
|
|
|
sprintf(displayname, "%02d", activesample); |
|
|
|
lcd.print(displayname); |
|
|
|
lcd.print(displayname); |
|
|
|
lcd.show(4, 1, 6, basename(drum_config[activesample].filename)); |
|
|
|
lcd.show(4, 5, 6, basename(drum_config[activesample].filename)); |
|
|
|
sprintf(displayname, "%03d", (int)(drum_config[activesample].reverb_send * 100) ); |
|
|
|
sprintf(displayname, "%03d", (int)(drum_config[activesample].reverb_send * 100) ); |
|
|
|
lcd.setCursor(12, 1); |
|
|
|
lcd.setCursor(12, 1); |
|
|
|
lcd.print(displayname); |
|
|
|
lcd.print(displayname); |
|
|
@ -3824,10 +3841,12 @@ const char* seq_find_shortname(uint8_t sstep) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const char* shortname = " "; |
|
|
|
const char* shortname = " "; |
|
|
|
bool found = false; |
|
|
|
bool found = false; |
|
|
|
if (seq_active_track < 3) { |
|
|
|
if (seq_content_type[seq_active_track] == 0) //is Drumtrack
|
|
|
|
|
|
|
|
{ |
|
|
|
for (uint8_t d = 0; d < num_drums - 1; d++) |
|
|
|
for (uint8_t d = 0; d < num_drums - 1; d++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (seq_data[ seq_patternchain[seq_chain_active_step][seq_active_track] ][sstep] == drum_config[d].midinote) |
|
|
|
// if (seq_data[ seq_patternchain[seq_chain_active_step][seq_active_track] ][sstep] == drum_config[d].midinote)
|
|
|
|
|
|
|
|
if (seq_data[seq_active_track][sstep] == drum_config[d].midinote) |
|
|
|
{ |
|
|
|
{ |
|
|
|
shortname = drum_config[d].shortname; |
|
|
|
shortname = drum_config[d].shortname; |
|
|
|
found = true; |
|
|
|
found = true; |
|
|
@ -3837,7 +3856,8 @@ const char* seq_find_shortname(uint8_t sstep) |
|
|
|
if (found == false) shortname = "-"; |
|
|
|
if (found == false) shortname = "-"; |
|
|
|
} else |
|
|
|
} else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (seq_data[ seq_patternchain[seq_chain_active_step][seq_active_track] ][sstep] > 0) shortname = "*"; else shortname = "-"; |
|
|
|
// if (seq_data[ seq_patternchain[seq_chain_active_step][seq_active_track] ][sstep] > 0) shortname = "*"; else shortname = "-";
|
|
|
|
|
|
|
|
if (seq_data[seq_active_track][sstep] > 0) shortname = "*"; else shortname = "-"; |
|
|
|
} |
|
|
|
} |
|
|
|
return shortname; |
|
|
|
return shortname; |
|
|
|
} |
|
|
|
} |
|
|
@ -3849,9 +3869,9 @@ const char* seq_find_shortname(uint8_t sstep) |
|
|
|
// if (track < 3) {
|
|
|
|
// if (track < 3) {
|
|
|
|
// for (uint8_t d = 0; d < num_drums - 1; d++)
|
|
|
|
// for (uint8_t d = 0; d < num_drums - 1; d++)
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// if (seq_data[track][seq_step_timer] == drum_config[d].midinote)
|
|
|
|
// if (seq_data[track][seq_step] == drum_config[d].midinote)
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// drum_config[d].reverb_send = float(seq_reverb[track][seq_step_timer]) / float(100);
|
|
|
|
// drum_config[d].reverb_send = float(seq_reverb[track][seq_step]) / float(100);
|
|
|
|
// break;
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -3936,6 +3956,162 @@ void UI_func_seq_lenght(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_seq_tempo(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char tmp[5]; |
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
|
|
|
lcd.print(" Seq. Tempo "); |
|
|
|
|
|
|
|
lcd.setCursor(5, 1); |
|
|
|
|
|
|
|
lcd.print("BPM"); |
|
|
|
|
|
|
|
lcd.setCursor(14, 1); |
|
|
|
|
|
|
|
lcd.print("ms"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_bpm = constrain(seq_bpm + ENCODER[ENC_R].speed(), 60, 180); |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
seq_bpm = constrain(seq_bpm - ENCODER[ENC_R].speed(), 60, 180); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
seq_tempo_ms = 60000 / seq_bpm / 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sprintf(tmp, "[%3d]", seq_bpm); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(9, 1); |
|
|
|
|
|
|
|
sprintf(tmp, "[%3d]", seq_tempo_ms); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_seq_vel_editor(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char tmp[5]; |
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
// setup function
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
|
|
|
lcd.print("Vel:"); |
|
|
|
|
|
|
|
//lcd.show(0, 6, 6, basename(drum_config[activesample].filename));
|
|
|
|
|
|
|
|
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]); |
|
|
|
|
|
|
|
lcd.setCursor(4, 0); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
lcd.setCursor(10, 0); |
|
|
|
|
|
|
|
lcd.print("Seq["); |
|
|
|
|
|
|
|
lcd.setCursor(15, 0); |
|
|
|
|
|
|
|
lcd.print("]"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(14, 0); |
|
|
|
|
|
|
|
lcd.print(seq_active_track); |
|
|
|
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
|
|
|
|
lcd.setCursor(i, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (seq_active_function == 99) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
|
|
|
seq_menu = constrain(seq_menu + 1, 0, 16); |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
seq_menu = constrain(seq_menu - 1, 0, 16); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (seq_active_function == 0) { |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
|
|
|
seq_active_track = constrain(seq_active_track + 1, 0, 9); |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
seq_active_track = constrain(seq_active_track - 1, 0, 9); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (seq_active_function == 1) { |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
|
|
|
seq_vel[seq_active_track][seq_menu - 1] = constrain(seq_vel[seq_active_track][seq_menu - 1] + 1, 0, 127); |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
seq_vel[seq_active_track][seq_menu - 1] = constrain(seq_vel[seq_active_track][seq_menu - 1] - 1, 0, 127); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ( seq_menu == 0 && seq_active_function == 99) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq_active_function = 0; |
|
|
|
|
|
|
|
} else if ( seq_menu == 0 && seq_active_function == 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq_active_function = 99; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (seq_menu > 0 && seq_active_function == 99) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq_active_function = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
seq_active_function = 99; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//button check end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (seq_menu == 0) { |
|
|
|
|
|
|
|
lcd.setCursor(4, 0); |
|
|
|
|
|
|
|
lcd.print("---"); |
|
|
|
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
|
|
|
lcd.print("["); |
|
|
|
|
|
|
|
lcd.print(seq_active_track); |
|
|
|
|
|
|
|
lcd.print("]"); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
|
|
|
|
lcd.setCursor(i, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (seq_menu == 1) { |
|
|
|
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
lcd.setCursor(15, 0); |
|
|
|
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print("x"); |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(1) ); |
|
|
|
|
|
|
|
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]); |
|
|
|
|
|
|
|
lcd.setCursor(4, 0); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
} else if (seq_menu > 1) { |
|
|
|
|
|
|
|
lcd.setCursor(seq_menu - 1, 1); |
|
|
|
|
|
|
|
lcd.print("x"); |
|
|
|
|
|
|
|
lcd.setCursor(seq_menu - 2, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(seq_menu - 2) ); |
|
|
|
|
|
|
|
lcd.setCursor(seq_menu , 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(seq_menu ) ); |
|
|
|
|
|
|
|
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]); |
|
|
|
|
|
|
|
lcd.setCursor(4, 0); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UI_func_sequencer(uint8_t param) |
|
|
|
void UI_func_sequencer(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
@ -3949,6 +4125,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
if (seq_running == false && seq_recording == false) |
|
|
|
if (seq_running == false && seq_recording == false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.print("PLY"); |
|
|
|
lcd.print("PLY"); |
|
|
|
|
|
|
|
|
|
|
|
} else if (seq_running == true && seq_recording == false) |
|
|
|
} else if (seq_running == true && seq_recording == false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
seq_note_in = 0; |
|
|
|
seq_note_in = 0; |
|
|
@ -3959,7 +4136,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
lcd.print("STP"); |
|
|
|
lcd.print("STP"); |
|
|
|
} |
|
|
|
} |
|
|
|
lcd.setCursor(14, 0); |
|
|
|
lcd.setCursor(14, 0); |
|
|
|
lcd.print(seq_active_track + 1); |
|
|
|
lcd.print(seq_active_track); |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
lcd.setCursor(i, 1); |
|
|
|
lcd.setCursor(i, 1); |
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
@ -3988,9 +4165,9 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
seq_active_track = constrain(seq_active_track + 1, 0, 8); |
|
|
|
seq_active_track = constrain(seq_active_track + 1, 0, 9); |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
seq_active_track = constrain(seq_active_track - 1, 0, 8); |
|
|
|
seq_active_track = constrain(seq_active_track - 1, 0, 9); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
@ -4003,6 +4180,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
if (activesample == num_drums + 2) { |
|
|
|
if (activesample == num_drums + 2) { |
|
|
|
for (int i = 0; i < 10; i++) { |
|
|
|
for (int i = 0; i < 10; i++) { |
|
|
|
memset(seq_data[i], 0, sizeof(seq_data[i])); |
|
|
|
memset(seq_data[i], 0, sizeof(seq_data[i])); |
|
|
|
|
|
|
|
memset(seq_vel[i], 0, sizeof(seq_vel[i])); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
lcd.setCursor(i, 1); |
|
|
|
lcd.setCursor(i, 1); |
|
|
@ -4011,6 +4189,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
} else if (activesample == num_drums + 1) { |
|
|
|
} else if (activesample == num_drums + 1) { |
|
|
|
memset(seq_data[seq_active_track], 0, sizeof(seq_data[seq_active_track])); |
|
|
|
memset(seq_data[seq_active_track], 0, sizeof(seq_data[seq_active_track])); |
|
|
|
|
|
|
|
memset(seq_vel[seq_active_track], 0, sizeof(seq_vel[seq_active_track])); |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
lcd.setCursor(i, 1); |
|
|
|
lcd.setCursor(i, 1); |
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
|
lcd.print(seq_find_shortname(i) ); |
|
|
@ -4039,6 +4218,8 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
seq_running = false; |
|
|
|
seq_running = false; |
|
|
|
seq_recording = false; |
|
|
|
seq_recording = false; |
|
|
|
seq_note_in = 0; |
|
|
|
seq_note_in = 0; |
|
|
|
|
|
|
|
seq_step = 0; |
|
|
|
|
|
|
|
seq_chain_active_step = 0; |
|
|
|
lcd.print("PLY"); |
|
|
|
lcd.print("PLY"); |
|
|
|
MicroDexed[0]->panic(); |
|
|
|
MicroDexed[0]->panic(); |
|
|
|
} |
|
|
|
} |
|
|
@ -4050,6 +4231,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (seq_active_function == 99) { |
|
|
|
if (seq_active_function == 99) { |
|
|
|
seq_data[seq_active_track][seq_menu - 3] = drum_config[activesample].midinote; |
|
|
|
seq_data[seq_active_track][seq_menu - 3] = drum_config[activesample].midinote; |
|
|
|
|
|
|
|
seq_vel[seq_active_track][seq_menu - 3] = 120; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
seq_active_function = 99; |
|
|
|
seq_active_function = 99; |
|
|
@ -4115,7 +4297,7 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
lcd.setCursor(13, 0); |
|
|
|
lcd.setCursor(13, 0); |
|
|
|
lcd.print("["); |
|
|
|
lcd.print("["); |
|
|
|
lcd.setCursor(14, 0); |
|
|
|
lcd.setCursor(14, 0); |
|
|
|
lcd.print(seq_active_track + 1); |
|
|
|
lcd.print(seq_active_track); |
|
|
|
lcd.setCursor(15, 0); |
|
|
|
lcd.setCursor(15, 0); |
|
|
|
lcd.print("]"); |
|
|
|
lcd.print("]"); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
@ -4147,10 +4329,13 @@ void UI_func_sequencer(uint8_t param) |
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
seq_running = false; |
|
|
|
|
|
|
|
seq_recording = false; |
|
|
|
// seq_running = false;
|
|
|
|
seq_note_in = 0; |
|
|
|
// seq_recording = false;
|
|
|
|
MicroDexed[0]->panic(); |
|
|
|
// seq_note_in = 0;
|
|
|
|
|
|
|
|
// seq_step = 0;
|
|
|
|
|
|
|
|
// seq_chain_active_step = 0;
|
|
|
|
|
|
|
|
// MicroDexed[0]->panic();
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -4167,38 +4352,39 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print("/"); |
|
|
|
lcd.print("/"); |
|
|
|
lcd.setCursor( 14, 0); |
|
|
|
lcd.setCursor( 14, 0); |
|
|
|
lcd.print(seq_chain_lenght + 1); |
|
|
|
lcd.print(seq_chain_lenght + 1); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0 , 0); |
|
|
|
lcd.setCursor(0 , 0); |
|
|
|
lcd.print("D"); |
|
|
|
if (seq_track_type[0] == 0 ) lcd.print("D"); else lcd.print("I"); |
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][0]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][0]); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0 , 1); |
|
|
|
lcd.setCursor(0 , 1); |
|
|
|
lcd.print("D"); |
|
|
|
if (seq_track_type[1] == 0 )lcd.print("D"); else lcd.print("I"); |
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][1]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][1]); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(6 , 0); |
|
|
|
lcd.setCursor(6 , 0); |
|
|
|
lcd.print("D"); |
|
|
|
if (seq_track_type[2] == 0 ) lcd.print("D"); else lcd.print("I"); |
|
|
|
lcd.setCursor(8 , 0); |
|
|
|
lcd.setCursor(8 , 0); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][2]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][2]); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(6 , 1); |
|
|
|
lcd.setCursor(6 , 1); |
|
|
|
lcd.print("I"); |
|
|
|
if (seq_track_type[3] == 0 )lcd.print("D"); else lcd.print("I"); |
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if (seq_chain_active_menu == 99) { |
|
|
|
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() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
seq_chain_select_menu = constrain(seq_chain_select_menu + 1, 0, 4); |
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu + 1, 0, 4); |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
seq_chain_select_menu = constrain(seq_chain_select_menu - 1, 0, 4); |
|
|
|
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, 4); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (seq_chain_active_menu == 4) { |
|
|
|
} else if (seq_temp_active_menu == 4) { |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
@ -4207,16 +4393,16 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
seq_chain_active_chainstep = constrain(seq_chain_active_chainstep - 1, 0, seq_chain_lenght); |
|
|
|
seq_chain_active_chainstep = constrain(seq_chain_active_chainstep - 1, 0, seq_chain_lenght); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (seq_chain_active_menu < 4) { |
|
|
|
else if (seq_temp_active_menu < 4) { |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
seq_patternchain[seq_chain_active_chainstep][seq_chain_active_menu] = constrain(seq_patternchain[seq_chain_active_chainstep][seq_chain_active_menu] + 1, 0, 9); |
|
|
|
seq_patternchain[seq_chain_active_chainstep][seq_temp_active_menu] = constrain(seq_patternchain[seq_chain_active_chainstep][seq_temp_active_menu] + 1, 0, 9); |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
seq_patternchain[seq_chain_active_chainstep][seq_chain_active_menu] = constrain(seq_patternchain[seq_chain_active_chainstep][seq_chain_active_menu] - 1, 0, 9); |
|
|
|
seq_patternchain[seq_chain_active_chainstep][seq_temp_active_menu] = constrain(seq_patternchain[seq_chain_active_chainstep][seq_temp_active_menu] - 1, 0, 9); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (seq_chain_select_menu == 0 && seq_chain_active_menu == 99) // Drum 0
|
|
|
|
if (seq_temp_select_menu == 0 && seq_temp_active_menu == 99) // Drum 0
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(1 , 0); |
|
|
|
lcd.setCursor(1 , 0); |
|
|
|
lcd.print("["); |
|
|
|
lcd.print("["); |
|
|
@ -4226,7 +4412,7 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
} else if (seq_chain_select_menu == 1 && seq_chain_active_menu == 99) // Drum 1
|
|
|
|
} else if (seq_temp_select_menu == 1 && seq_temp_active_menu == 99) // Drum 1
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(1 , 0); |
|
|
|
lcd.setCursor(1 , 0); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
@ -4240,7 +4426,7 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print("["); |
|
|
|
lcd.print("["); |
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
lcd.print("]"); |
|
|
|
lcd.print("]"); |
|
|
|
} else if (seq_chain_select_menu == 2 && seq_chain_active_menu == 99) // Drum 2
|
|
|
|
} else if (seq_temp_select_menu == 2 && seq_temp_active_menu == 99) // Drum 2
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(7 , 0); |
|
|
|
lcd.setCursor(7 , 0); |
|
|
|
lcd.print("["); |
|
|
|
lcd.print("["); |
|
|
@ -4254,7 +4440,7 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.setCursor(9 , 1); |
|
|
|
lcd.setCursor(9 , 1); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
} else if (seq_chain_select_menu == 3 && seq_chain_active_menu == 99) // Inst
|
|
|
|
} else if (seq_temp_select_menu == 3 && seq_temp_active_menu == 99) // Inst
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(7 , 0); |
|
|
|
lcd.setCursor(7 , 0); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
@ -4268,7 +4454,7 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.setCursor( 15, 0); |
|
|
|
lcd.setCursor( 15, 0); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
|
} else if (seq_chain_select_menu == 4 && seq_chain_active_menu == 99) // Chainselect
|
|
|
|
} else if (seq_temp_select_menu == 4 && seq_temp_active_menu == 99) // Chainselect
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(7 , 1); |
|
|
|
lcd.setCursor(7 , 1); |
|
|
|
lcd.print(" "); |
|
|
|
lcd.print(" "); |
|
|
@ -4285,7 +4471,7 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
lcd.print(seq_chain_lenght + 1); |
|
|
|
lcd.print(seq_chain_lenght + 1); |
|
|
|
lcd.setCursor( 15, 0); |
|
|
|
lcd.setCursor( 15, 0); |
|
|
|
lcd.print("]"); |
|
|
|
lcd.print("]"); |
|
|
|
} else if (seq_chain_select_menu == 4 && seq_chain_active_menu == 4) // Chainselect modify
|
|
|
|
} else if (seq_temp_select_menu == 4 && seq_temp_active_menu == 4) // Chainselect modify
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor( 11, 0); |
|
|
|
lcd.setCursor( 11, 0); |
|
|
|
lcd.print("["); |
|
|
|
lcd.print("["); |
|
|
@ -4309,19 +4495,19 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
|
} else if (seq_chain_select_menu == 0 && seq_chain_active_menu == 0) // Drum 0 modify
|
|
|
|
} else if (seq_temp_select_menu == 0 && seq_temp_active_menu == 0) // Drum 0 modify
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
lcd.setCursor(2 , 0); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][0]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][0]); |
|
|
|
} else if (seq_chain_select_menu == 1 && seq_chain_active_menu == 1) // Drum 1 modify
|
|
|
|
} else if (seq_temp_select_menu == 1 && seq_temp_active_menu == 1) // Drum 1 modify
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
lcd.setCursor(2 , 1); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][1]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][1]); |
|
|
|
} else if (seq_chain_select_menu == 2 && seq_chain_active_menu == 2) // Drum 2 modify
|
|
|
|
} else if (seq_temp_select_menu == 2 && seq_temp_active_menu == 2) // Drum 2 modify
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(8 , 0); |
|
|
|
lcd.setCursor(8 , 0); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][2]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][2]); |
|
|
|
} else if (seq_chain_select_menu == 3 && seq_chain_active_menu == 3) // Inst modify
|
|
|
|
} else if (seq_temp_select_menu == 3 && seq_temp_active_menu == 3) // Inst modify
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.setCursor(8 , 1); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
|
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); |
|
|
@ -4329,11 +4515,11 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if (seq_chain_active_menu == seq_chain_select_menu) { |
|
|
|
if (seq_temp_active_menu == seq_temp_select_menu) { |
|
|
|
seq_chain_active_menu = 99; |
|
|
|
seq_temp_active_menu = 99; |
|
|
|
} else |
|
|
|
} else |
|
|
|
{ |
|
|
|
{ |
|
|
|
seq_chain_active_menu = seq_chain_select_menu; |
|
|
|
seq_temp_active_menu = seq_temp_select_menu; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -4343,13 +4529,130 @@ void UI_func_seq_pat_chain(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_seq_track_setup(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_track_type[0] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
lcd.setCursor(3 , 1); |
|
|
|
|
|
|
|
if (seq_track_type[1] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
lcd.setCursor(12 , 0); |
|
|
|
|
|
|
|
if (seq_track_type[2] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
lcd.setCursor(12 , 1); |
|
|
|
|
|
|
|
if (seq_track_type[3] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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_track_type[seq_temp_active_menu] = constrain(seq_track_type[seq_temp_active_menu] + 1, 0, 1); |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
seq_track_type[seq_temp_active_menu] = constrain(seq_track_type[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_track_type[0] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
} 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_track_type[1] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
} 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_track_type[2] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
} 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_track_type[3] == 0 ) lcd.print("Drm"); else lcd.print("Ins"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
void UI_func_seq_pattern_load(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static uint8_t mode; |
|
|
|
static uint8_t mode; |
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
char tmp[10]; |
|
|
|
char tmp[10]; |
|
|
|
temp_int=param; |
|
|
|
temp_int = param; |
|
|
|
mode = 0; |
|
|
|
mode = 0; |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|