diff --git a/MicroDexed.ino b/MicroDexed.ino index 58aae4b..6b78ffd 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -666,8 +666,8 @@ void loop() seq_UI_last_step = seq_step; if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor)) //is in UI of Sequencer { - lcd.setCursor(seq_step, 1); - lcd.print("X"); + lcd.setCursor(seq_step, 1); + lcd.write(124); if (seq_step == 0) { lcd.setCursor(15, 1); diff --git a/UI.hpp b/UI.hpp index 1e64c32..c616158 100644 --- a/UI.hpp +++ b/UI.hpp @@ -4069,9 +4069,11 @@ const char* seq_find_shortname(uint8_t sstep) if (found == false) shortname = "-"; } else { - if (seq_data[seq_active_track][sstep] > 0) + if (seq_data[seq_active_track][sstep] > 0 && seq_data[seq_active_track][sstep] != 130) shortname = noteNames[seq_data[seq_active_track][sstep] % 12]; - else shortname = "-"; + else if (seq_data[seq_active_track][sstep] == 130) shortname = "~"; // note has tie/latch + else + shortname = "-"; } return shortname; } @@ -4679,9 +4681,9 @@ void UI_func_seq_pattern_editor(uint8_t param) if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) { if (LCDML.BT_checkDown()) - temp_int = constrain(temp_int + 1, 0, 114 ); + temp_int = constrain(temp_int + 1, 0, 115 ); //was 114 else if (LCDML.BT_checkUp()) - temp_int = constrain(temp_int - 1, 0, 114 ); + temp_int = constrain(temp_int - 1, 0, 115 );//was 114 } } } else if (seq_active_function == 2) @@ -4766,7 +4768,7 @@ void UI_func_seq_pattern_editor(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] > 0 && 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 == 115) ) { //fill patterns lcd.setCursor(0, 0); lcd.print("Fill Pattern:"); @@ -4776,25 +4778,25 @@ void UI_func_seq_pattern_editor(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] > 0 && 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 == 114) ) { //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] > 0 && 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 == 113) ) { //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] > 0 && 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 == 112) ) { //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] > 0 && 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 == 111) ) { //clear pattern seq_clear_active_pattern(); seq_printAllSeqSteps(); @@ -4851,6 +4853,9 @@ void UI_func_seq_pattern_editor(uint8_t param) if (temp_int == 109) { //clear note seq_data[seq_active_track][seq_menu - 3] = 0; seq_vel[seq_active_track][seq_menu - 3] = 0; + } else if (temp_int == 110) { //latch note + seq_data[seq_active_track][seq_menu - 3] = 130; + //seq_vel[seq_active_track][seq_menu - 3] = 0; } else { seq_data[seq_active_track][seq_menu - 3] = temp_int; @@ -4980,18 +4985,20 @@ void UI_func_seq_pattern_editor(uint8_t param) lcd.print("EMPTY "); } else if (temp_int == 110) { lcd.setCursor(1, 0); - lcd.print("ClrPat"); + lcd.print("LATCH"); } else if (temp_int == 111) { lcd.setCursor(1, 0); - lcd.print("ClrAll"); + lcd.print("ClrPat"); } else if (temp_int == 112) { + lcd.setCursor(1, 0); + lcd.print("ClrAll"); + } else if (temp_int == 113) { lcd.setCursor(1, 0); lcd.print("Copy P"); - } else if (temp_int == 113) { + } else if (temp_int == 114) { lcd.setCursor(1, 0); lcd.print("Swap P"); - } - else if (temp_int == 114) { + } else if (temp_int == 115) { lcd.setCursor(1, 0); lcd.print("Fill P"); } diff --git a/sequencer.h b/sequencer.h index 9b84e06..0a3105d 100644 --- a/sequencer.h +++ b/sequencer.h @@ -64,18 +64,18 @@ uint8_t seq_data[10][16] = {72 , 0 , 0 , 0 , 72 , 0 , 0 , 0 , 72 , 0 , 0 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 72 , 0 , 0 , 0 , 72 , 0 , 0 , 0 , 72 , 0 , 0 , 75 , 72 , 0 , 0 , 0 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 77 , 0 , 0 , 55 , 0 , 0 , 0 , 0 , 0 , 52 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 57 , 0 , 0 , 0 , 0 , 0 , 53 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 74 , 0 , 0 , 72 , 0 , 0 , 74 , 0 , 0 , 0 , 76 , 0 , 0 , 0 , 0 , 0 , - 74 , 0 , 0 , 72 , 0 , 0 , 71 , 0 , 0 , 0 , 67 , 0 , 0 , 0 , 0 , 0 , - 69 , 0 , 0 , 76 , 0 , 0 , 69 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 + 74 , 0 , 0 , 72 , 0 , 0 , 74 , 0 , 0 , 0 , 76 , 130 , 130 , 130 , 130 , 0 , + 74 , 0 , 0 , 72 , 0 , 0 , 71 , 0 , 0 , 0 , 67 , 130 , 0 , 0 , 0 , 0 , + 69 , 0 , 0 , 76 , 0 , 0 , 69 , 130 , 130 , 130 , 0 , 0 , 0 , 0 , 0 , 0 }; uint8_t seq_vel[10][16] = {120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 105, 80, 105, 70, 106, 98, 106, 70, 126, 97, 106, 70, 106, 99, 90, 65, 120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 120, 60, 120, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, + 0, 0, 1, 10, 30, 50, 70, 90, 100, 127, 100, 60, 40, 30, 0, 200, 200, 200, 200, 200, 200, 200, 201, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 200, 200, 200, 200, 200, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 98, 120, 0, 88, 120, 0, 127, 120, 0, 0, 125, 120, 0, 0, 0, 0, @@ -85,7 +85,7 @@ uint8_t seq_vel[10][16] = {120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0, uint8_t seq_patternchain[4][4] = { 0 , 1 , 6 , 9 , 0 , 1 , 5 , 8 , 0 , 1 , 6 , 9 , 2 , 1 , 5 , 7 }; -uint8_t seq_content_type[10] = { 0, 0, 0, 0 , 1, 1, 1 , 1 , 1 , 1 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio +uint8_t seq_content_type[10] = { 0, 0, 0, 0 , 2, 2, 1 , 1 , 1 , 1 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio uint8_t seq_track_type[4] = { 0, 0, 3, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp //uint8_t seq_reverb[4][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,