From cc5c5b16f27abcacd6c661991eb64017c4331384 Mon Sep 17 00:00:00 2001 From: positionhigh Date: Sat, 14 Aug 2021 20:27:45 +0200 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UI.hpp | 180 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 91 insertions(+), 89 deletions(-) diff --git a/UI.hpp b/UI.hpp index 9f5f57b..f0588a0 100644 --- a/UI.hpp +++ b/UI.hpp @@ -100,6 +100,7 @@ extern uint8_t arp_oct_usersetting; extern uint8_t arp_style; extern uint8_t arp_speed; extern char arp_style_names[4][3]; +extern char seq_chord_names[7][4]; #endif #ifdef DISPLAY_LCD_SPI @@ -4243,7 +4244,6 @@ void UI_func_seq_vel_editor(uint8_t param) else if (seq_vel[seq_active_track][seq_menu - 1] == 203) lcd.print("Aug" ); else if (seq_vel[seq_active_track][seq_menu - 1] == 204) lcd.print("Dim" ); else if (seq_vel[seq_active_track][seq_menu - 1] == 205) lcd.print("Mj7" ); - } } } @@ -4301,8 +4301,6 @@ void arp_refresh_display_play_status() } } - - void UI_func_sequencer(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -4786,17 +4784,19 @@ void UI_func_arpeggio(uint8_t param) if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); - seq_temp_active_menu = 0; + seq_temp_select_menu=0; + seq_temp_active_menu=0; lcd.setCursor( 0, 0); lcd.print("Oct"); + lcd.setCursor(7, 0); + lcd.print( seq_chord_names[arp_chord][0]); + lcd.print( seq_chord_names[arp_chord][1]); + lcd.print( seq_chord_names[arp_chord][2]); + lcd.print( seq_chord_names[arp_chord][3]); lcd.setCursor( 0, 1); lcd.print("Style"); - lcd.setCursor( 7, 0); - lcd.print("Maj"); lcd.setCursor( 11, 1); lcd.print("1/16"); - lcd.setCursor( 7, 0); - lcd.print(" "); arp_refresh_display_play_status(); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -4830,6 +4830,7 @@ void UI_func_arpeggio(uint8_t param) else if (LCDML.BT_checkUp()) arp_speed = constrain(arp_speed - ENCODER[ENC_R].speed(), 0, 1); } + if (LCDML.BT_checkEnter()) //handle button presses during menu >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> { if ( seq_temp_select_menu == 0 && seq_temp_active_menu == 0 ) @@ -4849,26 +4850,25 @@ void UI_func_arpeggio(uint8_t param) seq_temp_active_menu = 0; } - //else if ( seq_temp_select_menu == 2 && seq_temp_active_menu == 0 ) else if ( seq_temp_select_menu == 2 ) { - + if (seq_running) { seq_running = !seq_running; timer1.stop(); MicroDexed[0]->panic(); - arp_refresh_display_play_status(); + arp_refresh_display_play_status(); seq_step = 0; arp_octave = 0; arp_step = 0; seq_chain_active_step = 0; } else { - seq_running = !seq_running; - arp_refresh_display_play_status(); + seq_running = !seq_running; + arp_refresh_display_play_status(); timer1.start(); } - + } else if ( seq_temp_select_menu == 3 && seq_temp_active_menu == 0 ) { @@ -4880,80 +4880,80 @@ void UI_func_arpeggio(uint8_t param) } } } - lcd.setCursor( 4, 0); - lcd.print(arp_oct_usersetting); - lcd.setCursor( 6, 1); - lcd.print( arp_style_names[arp_style][0] ); - lcd.print( arp_style_names[arp_style][1] ); - lcd.print( arp_style_names[arp_style][2] ); - lcd.setCursor( 11, 1); - if (arp_speed == 0)lcd.print("1/16"); else if (arp_speed == 1)lcd.print("1/8 "); - if (seq_temp_select_menu == 0) { - lcd.setCursor( 3, 0); - lcd.print("["); - lcd.setCursor( 5, 0); - lcd.print("]"); - lcd.setCursor( 11, 0); - lcd.print(" "); - lcd.setCursor( 15, 0); - lcd.print(" "); - lcd.setCursor( 5, 1); - lcd.print(" "); - lcd.setCursor( 9, 1); - lcd.print(" "); - lcd.setCursor( 10, 1); - lcd.print(" "); - lcd.setCursor( 15, 1); - lcd.print(" "); + + lcd.setCursor( 4, 0); + lcd.print(arp_oct_usersetting); + lcd.setCursor( 6, 1); + lcd.print( arp_style_names[arp_style][0] ); + lcd.print( arp_style_names[arp_style][1] ); + lcd.print( arp_style_names[arp_style][2] ); + lcd.setCursor( 11, 1); + if (arp_speed == 0)lcd.print("1/16"); else if (arp_speed == 1)lcd.print("1/8 "); - } - else if (seq_temp_select_menu == 1) - { - lcd.setCursor( 3, 0); - lcd.print(" "); - lcd.setCursor( 5, 0); - lcd.print(" "); - lcd.setCursor( 11, 0); - lcd.print(" "); - lcd.setCursor( 15, 0); - lcd.print(" "); - lcd.setCursor( 5, 1); - lcd.print("["); - lcd.setCursor( 9, 1); - lcd.print("]"); - } - else if (seq_temp_select_menu == 2) - { - lcd.setCursor( 5, 1); - lcd.print(" "); - lcd.setCursor( 9, 1); - lcd.print(" "); - lcd.setCursor( 10, 1); - lcd.print(" "); - lcd.setCursor( 15, 1); - lcd.print(" "); - lcd.setCursor( 11, 0); - lcd.print("["); - lcd.setCursor( 15, 0); - lcd.print("]"); - } - else if (seq_temp_select_menu == 3) - { - lcd.setCursor( 11, 0); - lcd.print(" "); - lcd.setCursor( 15, 0); - lcd.print(" "); + if (seq_temp_select_menu == 0) { + lcd.setCursor( 3, 0); + lcd.print("["); + lcd.setCursor( 5, 0); + lcd.print("]"); + lcd.setCursor( 5, 1); + lcd.print(" "); + lcd.setCursor( 9, 1); + lcd.print(" "); + lcd.setCursor( 10, 1); + 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); + lcd.print("]"); + lcd.setCursor( 3, 0); + lcd.print(" "); + lcd.setCursor( 5, 0); + lcd.print(" "); + lcd.setCursor( 11, 0); + lcd.print(" "); + lcd.setCursor( 15, 0); + lcd.print(" "); + } + else if (seq_temp_select_menu == 2) + { + lcd.setCursor( 5, 1); + lcd.print(" "); + lcd.setCursor( 9, 1); + lcd.print(" "); + lcd.setCursor( 11, 0); + lcd.print("["); + lcd.setCursor( 15, 0); + lcd.print("]"); + lcd.setCursor( 10, 1); + lcd.print(" "); + lcd.setCursor( 15, 1); + lcd.print(" "); + } + else if (seq_temp_select_menu == 3) + { + lcd.setCursor( 11, 0); + lcd.print(" "); + lcd.setCursor( 15, 0); + lcd.print(" "); + lcd.setCursor( 10, 1); + lcd.print("["); + lcd.setCursor( 15, 1); + lcd.print("]"); lcd.setCursor( 3, 0); - lcd.print(" "); - lcd.setCursor( 5, 0); - lcd.print(" "); - lcd.setCursor( 10, 1); - lcd.print("["); - lcd.setCursor( 15, 1); - lcd.print("]"); - } + lcd.print(" "); + lcd.setCursor( 5, 0); + lcd.print(" "); } + + } if (LCDML.FUNC_close()) // ****** STABLE END ********* { encoderDir[ENC_R].reset(); @@ -4965,7 +4965,8 @@ void UI_func_seq_pat_chain(uint8_t param) if (LCDML.FUNC_setup()) // ****** SETUP ********* { // setup function - + seq_temp_select_menu = 0; + seq_temp_active_menu = 99; lcd.setCursor( 12, 0); lcd.print(seq_chain_active_chainstep + 1); lcd.setCursor( 13, 0); @@ -4974,22 +4975,22 @@ void UI_func_seq_pat_chain(uint8_t param) lcd.print(seq_chain_lenght + 1); lcd.setCursor(0 , 0); - if (seq_track_type[0] == 0 ) lcd.print("D"); else lcd.print("I"); + if (seq_track_type[0] == 0 ) lcd.print("D"); else if (seq_track_type[0] == 1 ) lcd.print("I"); else if (seq_track_type[0] == 2 ) lcd.print("C"); else lcd.print("A"); lcd.setCursor(2 , 0); lcd.print( seq_patternchain[seq_chain_active_chainstep][0]); lcd.setCursor(0 , 1); - if (seq_track_type[1] == 0 )lcd.print("D"); else lcd.print("I"); + if (seq_track_type[1] == 0 ) lcd.print("D"); else if (seq_track_type[1] == 1 ) lcd.print("I"); else if (seq_track_type[1] == 2 ) lcd.print("C"); else lcd.print("A"); lcd.setCursor(2 , 1); lcd.print( seq_patternchain[seq_chain_active_chainstep][1]); lcd.setCursor(6 , 0); - if (seq_track_type[2] == 0 ) lcd.print("D"); else lcd.print("I"); + if (seq_track_type[2] == 0 ) lcd.print("D"); else if (seq_track_type[2] == 1 ) lcd.print("I"); else if (seq_track_type[2] == 2 ) lcd.print("C"); else lcd.print("A"); lcd.setCursor(8 , 0); lcd.print( seq_patternchain[seq_chain_active_chainstep][2]); lcd.setCursor(6 , 1); - if (seq_track_type[3] == 0 )lcd.print("D"); else lcd.print("I"); + if (seq_track_type[3] == 0 ) lcd.print("D"); else if (seq_track_type[3] == 1 ) lcd.print("I"); else if (seq_track_type[3] == 2 ) lcd.print("C"); else lcd.print("A"); lcd.setCursor(8 , 1); lcd.print( seq_patternchain[seq_chain_active_chainstep][3]); } @@ -5021,6 +5022,7 @@ void UI_func_seq_pat_chain(uint8_t param) 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_temp_select_menu == 0 && seq_temp_active_menu == 99) // Drum 0 { lcd.setCursor(1 , 0);