Dateien hochladen nach „“

pull/93/head
positionhigh 3 years ago
parent 2f9e6f3b72
commit f6c1c83b2b
  1. 432
      UI.hpp
  2. 18
      UI_FX.h
  3. 18
      UI_FX_T4.h
  4. 11
      config.h

432
UI.hpp

@ -209,7 +209,7 @@ const uint8_t meter_bar[5][8] = {
{B00001, B00001, B00001, B00001, B00001, B00001, B00001, B00001}
};
const uint8_t special_chars[19][8] = {
const uint8_t special_chars[22][8] = {
{B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [0] 1 small invers
{B11111, B11011, B10101, B11101, B11011, B10111, B10001, B11111}, // [1] 2 small invers
{B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [2] 1 OP invers
@ -228,7 +228,10 @@ const uint8_t special_chars[19][8] = {
{B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [15] Level 8
{B00100, B00110, B00101, B00101, B01101, B11101, B11100, B11000}, // [16] Note
{B01110, B10001, B10001, B01110, B00100, B00100, B00110, B00110}, // [17] Disabled 2nd instance symbol
{B11111, B10001, B10111, B10001, B10111, B10111, B10111, B11111} // [18] Favorites Icon
{B11111, B10001, B10111, B10001, B10111, B10111, B10111, B11111}, // [18] Favorites Icon
{B01000, B01100, B01110, B01111, B01110, B01100, B01000, B00000}, // [19] Play Symbol
{B00000, B01110, B11111, B11111, B11111, B01110, B00000, B00000}, // [20] Record Symbol
{B00000, B00000, B01110, B01110, B01110, B00000, B00000, B00000} // [21] Stop Symbol
};
enum { SCROLLBAR, BLOCKBAR, METERBAR };
@ -288,7 +291,7 @@ void UI_func_portamento_glissando(uint8_t param);
void UI_func_portamento_time(uint8_t param);
void UI_handle_OP(uint8_t param);
void UI_func_information(uint8_t param);
void UI_func_sequencer(uint8_t param);
void UI_func_seq_pattern_editor(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);
@ -3613,6 +3616,7 @@ void UI_func_drum_reverb_send(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
encoderDir[ENC_R].reset();
temp_int = (int)(drum_config[activesample].reverb_send * 100);
lcd.setCursor(0, 0);
lcd.print("Drum Rev. Send");
lcd.setCursor(1, 1);
@ -3769,6 +3773,7 @@ void UI_func_drum_volume(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
encoderDir[ENC_R].reset();
temp_int = (int)(drum_config[activesample].vol_max * 100);
lcd.setCursor(0, 0);
lcd.print("DrumSmp. Volume");
lcd.setCursor(1, 1);
@ -3940,6 +3945,7 @@ void UI_func_drum_pan(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
encoderDir[ENC_R].reset();
temp_int = mapfloat(drum_config[activesample].pan, -1.0, 1.0, -99, 99);
lcd.setCursor(0, 0);
lcd.print("DrmSmp. Panorama");
lcd.setCursor(1, 1);
@ -3980,7 +3986,6 @@ void UI_func_drum_pan(uint8_t param)
menu_select_toggle = false;
} else
{ menu_select_toggle = true;
}
}
if (menu_select_toggle == false) {
@ -4080,6 +4085,33 @@ void seq_printAllSeqSteps()
}
}
#ifdef TESTDISPLAY20x4
void seq_printVelGraphBar()
{
lcd.setCursor(0, 2);
for (uint8_t i = 0; i < 16; i++)
{
if (seq_vel[seq_active_track][i] == 0)
lcd.print(" ");
else if (seq_vel[seq_active_track][i] > 0 && seq_vel[seq_active_track][i] <= 20)
lcd.write(1);
else if (seq_vel[seq_active_track][i] > 21 && seq_vel[seq_active_track][i] <= 40)
lcd.write(2);
else if (seq_vel[seq_active_track][i] > 41 && seq_vel[seq_active_track][i] <= 60)
lcd.write(3);
else if (seq_vel[seq_active_track][i] > 61 && seq_vel[seq_active_track][i] <= 80)
lcd.write(4);
else if (seq_vel[seq_active_track][i] > 81 && seq_vel[seq_active_track][i] <= 90)
lcd.write(5);
else if (seq_vel[seq_active_track][i] > 91 && seq_vel[seq_active_track][i] <= 105)
lcd.write(6);
else if (seq_vel[seq_active_track][i] > 105 && seq_vel[seq_active_track][i] <= 128)
lcd.write(7);
else
lcd.print("C");
}
}
#endif
// deactivated for now since audio library seems not like to change reverb settings at runtime (and is skipping notes)
//void seq_set_rev_for_single_instr_per_step(uint8_t track, uint8_t note)
//{
@ -4403,6 +4435,13 @@ void UI_func_seq_vel_editor(uint8_t param)
if ( seq_content_type[seq_active_track] > 1 && seq_vel[seq_active_track][seq_menu - 1] < 200) seq_vel[seq_active_track][seq_menu - 1] = 200;
if (seq_menu > 0 && seq_content_type[seq_active_track] < 2) {
lcd.setCursor(0, 0);
lcd.print("Vel:");
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]);
lcd.setCursor(4, 0);
lcd.print(tmp);
}
if (seq_menu == 0) {
lcd.setCursor(4, 0);
lcd.print("--- --- ");
@ -4418,7 +4457,7 @@ void UI_func_seq_vel_editor(uint8_t param)
lcd.setCursor(15, 0);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print("x");
lcd.write(219); // cursor symbol
lcd.setCursor(1, 1);
lcd.print(seq_find_shortname(1)[0] );
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]);
@ -4426,45 +4465,41 @@ void UI_func_seq_vel_editor(uint8_t param)
lcd.print(tmp);
} else if (seq_menu > 1) {
lcd.setCursor(seq_menu - 1, 1);
lcd.print("x");
lcd.write(219); // cursor symbol
lcd.setCursor(seq_menu - 2, 1);
lcd.print(seq_find_shortname(seq_menu - 2)[0] );
lcd.setCursor(seq_menu , 1);
lcd.print(seq_find_shortname(seq_menu)[0] );
sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]);
lcd.setCursor(4, 0);
lcd.print(tmp);
//sprintf(tmp, "%03d", seq_vel[seq_active_track][seq_menu - 1]);
}
if (seq_menu > 0) {
lcd.setCursor(8, 0);
lcd.setCursor(4, 0);
if (seq_data[seq_active_track][seq_menu - 1] > 0) {
if (seq_content_type[seq_active_track] == 0) //is Drumtrack
{
lcd.show(0, 8, 5, seq_find_drum_name_from_note( seq_data[seq_active_track][seq_menu - 1]) );
} else
{
if (seq_content_type[seq_active_track] < 2)
{
lcd.print(noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][0] );
if (noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][1] != '\0' ) {
lcd.print(noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][1] );
}
lcd.print( (seq_data[seq_active_track][seq_menu - 1] / 12) - 1);
lcd.print(" ");
{ lcd.setCursor(0, 0);
lcd.print(noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][0] );
if (noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][1] != '\0' ) {
lcd.print(noteNames[seq_data[seq_active_track][seq_menu - 1] % 12 ][1] );
}
else {
if (seq_vel[seq_active_track][seq_menu - 1] == 200) lcd.print("Maj" );
else if (seq_vel[seq_active_track][seq_menu - 1] == 201) lcd.print("Min" );
else if (seq_vel[seq_active_track][seq_menu - 1] == 202) lcd.print("Sev" );
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" );
lcd.print( (seq_data[seq_active_track][seq_menu - 1] / 12) - 1);
lcd.print(" ");
if (seq_content_type[seq_active_track] > 1) {
lcd.setCursor(3, 0);
if (seq_vel[seq_active_track][seq_menu - 1] == 200) lcd.print("Major" );
else if (seq_vel[seq_active_track][seq_menu - 1] == 201) lcd.print("Minor" );
else if (seq_vel[seq_active_track][seq_menu - 1] == 202) lcd.print("Seven" );
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("Maj7 " );
}
}
}
else
lcd.print(" ");
lcd.print(" ");
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -4489,38 +4524,69 @@ void seq_clear_all_patterns()
void seq_refresh_display_play_status()
{
lcd.setCursor(9, 0);
if (seq_running == false && seq_recording == false)
{
lcd.print("PLY");
lcd.createChar(0, (uint8_t*)special_chars[19]); //play symbol
#ifdef TESTDISPLAY20x4
lcd.setCursor(15, 0);
#else
lcd.setCursor(11, 0);
#endif
lcd.write(0);
} else if (seq_running == true && seq_recording == false)
{
seq_note_in = 0;
lcd.print("REC");
lcd.createChar(0, (uint8_t*)special_chars[20]); //record symbol
#ifdef TESTDISPLAY20x4
lcd.setCursor(15, 0);
#else
lcd.setCursor(11, 0);
#endif
lcd.write(0);
} else if (seq_running == true && seq_recording == true)
{
seq_note_in = 0;
lcd.print("STP");
lcd.createChar(0, (uint8_t*)special_chars[21]); //stop symbol
#ifdef TESTDISPLAY20x4
lcd.setCursor(15, 0);
#else
lcd.setCursor(11, 0);
#endif
lcd.write(0);
}
}
void arp_refresh_display_play_status()
{
lcd.setCursor(12, 0);
if (seq_running == false )
{
lcd.print("PLY");
lcd.createChar(0, (uint8_t*)special_chars[19]); //play symbol
lcd.setCursor(14, 0);
lcd.write(0);
} else if (seq_running == true )
{
seq_note_in = 0;
lcd.print("STP");
lcd.createChar(0, (uint8_t*)special_chars[21]); //stop symbol
lcd.setCursor(14, 0);
lcd.write(0);
}
}
void UI_func_sequencer(uint8_t param)
void UI_func_seq_pattern_editor(uint8_t param)
{
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
lcd.createChar(0, (uint8_t*)special_chars[19]); //play symbol + record symbol switching
#ifdef TESTDISPLAY20x4
lcd.createChar(1, (uint8_t*)special_chars[9]); //bar graph
lcd.createChar(2, (uint8_t*)special_chars[10]); //bar graph
lcd.createChar(3, (uint8_t*)special_chars[11]); //bar graph
lcd.createChar(4, (uint8_t*)special_chars[12]); //bar graph
lcd.createChar(5, (uint8_t*)special_chars[13]); //bar graph
lcd.createChar(6, (uint8_t*)special_chars[14]); //bar graph
lcd.createChar(7, (uint8_t*)special_chars[15]); //bar graph
#endif
temp_int = seq_data[seq_active_track][0];
encoderDir[ENC_R].reset();
seq_note_in = 0;
@ -4528,9 +4594,16 @@ void UI_func_sequencer(uint8_t param)
lcd.setCursor(1, 0);
lcd.show(0, 1, 6, basename(drum_config[activesample].name));
seq_refresh_display_play_status();
#ifdef TESTDISPLAY20x4
lcd.setCursor(18, 0);
#else
lcd.setCursor(14, 0);
#endif
lcd.print(seq_active_track);
seq_printAllSeqSteps();
#ifdef TESTDISPLAY20x4
seq_printVelGraphBar();
#endif
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
{ if (seq_menu == 33 ) { // is in sub-function - fill pattern
@ -4538,98 +4611,92 @@ 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()) {
seq_temp_active_menu = constrain(seq_temp_active_menu + 1, 0, 3);
}
else if (LCDML.BT_checkUp()) {
seq_temp_active_menu = constrain(seq_temp_active_menu - 1, 0, 3);
}
}
} else
if (seq_menu == 32 ) { // is in sub-function - fill pattern
seq_active_function = 97;
if (seq_content_type[seq_active_track] == 0) {
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, NUM_DRUMSET_CONFIG - 1);
}
else if (LCDML.BT_checkUp()) {
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, NUM_DRUMSET_CONFIG - 1);
}
}
} else
{
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, 108 );
else if (LCDML.BT_checkUp())
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, 108 );
}
}
} else if (seq_menu == 30 || seq_menu == 31 ) { // is in sub-function - swap pattern or copy pattern
seq_active_function = 98;
} else if (seq_menu == 32 ) { // is in sub-function - fill pattern
seq_active_function = 97;
if (seq_content_type[seq_active_track] == 0) {
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, 9);
if (temp_int == seq_active_track)temp_int++;
if (temp_int > 9)temp_int = 0;
seq_temp_select_menu = constrain(seq_temp_select_menu + 1, 0, NUM_DRUMSET_CONFIG - 1);
}
else if (LCDML.BT_checkUp()) {
temp_int = constrain(temp_int - 1, 0, 9);
if (temp_int == seq_active_track)temp_int--;
if (temp_int < 0)temp_int = 9;
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, NUM_DRUMSET_CONFIG - 1);
}
}
} else if (seq_active_function == 99)
} else
{
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, 18);
seq_temp_select_menu = constrain(seq_temp_select_menu + 1, 0, 108 );
else if (LCDML.BT_checkUp())
seq_menu = constrain(seq_menu - 1, 0, 18);
seq_temp_select_menu = constrain(seq_temp_select_menu - 1, 0, 108 );
}
} else if (seq_active_function == 0 ) {
if (seq_content_type[seq_active_track] == 0) // is in Drumedit mode
{
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()))
{
if (LCDML.BT_checkDown())
activesample = constrain(activesample + 1, 0, NUM_DRUMSET_CONFIG + 4 );
else if (LCDML.BT_checkUp())
activesample = constrain(activesample - 1, 0, NUM_DRUMSET_CONFIG + 4 );
}
} else //is in Instrument Mode
}
} else if (seq_menu == 30 || seq_menu == 31 ) { // is in sub-function - swap pattern or copy pattern
seq_active_function = 98;
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, 9);
if (temp_int == seq_active_track)temp_int++;
if (temp_int > 9)temp_int = 0;
}
else if (LCDML.BT_checkUp()) {
temp_int = constrain(temp_int - 1, 0, 9);
if (temp_int == seq_active_track)temp_int--;
if (temp_int < 0)temp_int = 9;
}
}
} else 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, 18);
else if (LCDML.BT_checkUp())
seq_menu = constrain(seq_menu - 1, 0, 18);
}
} else if (seq_active_function == 0 ) {
if (seq_content_type[seq_active_track] == 0) // is in Drumedit mode
{
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())
temp_int = constrain(temp_int + 1, 0, 114 );
else if (LCDML.BT_checkUp())
temp_int = constrain(temp_int - 1, 0, 114 );
}
if (LCDML.BT_checkDown())
activesample = constrain(activesample + 1, 0, NUM_DRUMSET_CONFIG + 4 );
else if (LCDML.BT_checkUp())
activesample = constrain(activesample - 1, 0, NUM_DRUMSET_CONFIG + 4 );
}
} else if (seq_active_function == 2)
} else //is in Instrument Mode
{
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);
temp_int = constrain(temp_int + 1, 0, 114 );
else if (LCDML.BT_checkUp())
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 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 ");
temp_int = constrain(temp_int - 1, 0, 114 );
}
}
} else if (seq_active_function == 2)
{
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);
lcd.setCursor(1, 0);
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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
{
if (seq_menu == 32 && seq_active_function == 97) //fill pattern every 1/4, 1/8, 1/16 step with active sample/note step 1
@ -4736,18 +4803,16 @@ void UI_func_sequencer(uint8_t param)
}
if ( seq_menu == 1)
{
lcd.setCursor(9, 0);
//lcd.setCursor(11, 0);
if (seq_running == false && seq_recording == false)
{
seq_running = true;
lcd.print("REC");
timer1.start();
} else if (seq_running == true && seq_recording == false)
{
seq_running = true;
seq_recording = true;
seq_note_in = 0;
lcd.print("STP");
} else if (seq_running == true && seq_recording == true)
{
seq_running = false;
@ -4755,7 +4820,6 @@ void UI_func_sequencer(uint8_t param)
seq_note_in = 0;
seq_step = 0;
seq_chain_active_step = 0;
lcd.print("PLY");
timer1.stop();
MicroDexed[0]->panic();
}
@ -4813,9 +4877,7 @@ void UI_func_sequencer(uint8_t param)
if (seq_temp_active_menu == 0) lcd.print(" 1/4");
else if (seq_temp_active_menu == 1) lcd.print(" 1/8");
else if (seq_temp_active_menu == 2) lcd.print("1/16");
} else if (seq_menu == 32 ) { //fill pattern
if (seq_content_type[seq_active_track] == 0) { //drum
lcd.setCursor(0, 1);
lcd.print("with");
@ -4834,7 +4896,6 @@ void UI_func_sequencer(uint8_t param)
lcd.print("with");
lcd.setCursor(4, 1);
lcd.print("[");
lcd.setCursor(5, 1);
lcd.print(noteNames[seq_temp_select_menu % 12 ]);
lcd.print( (seq_temp_select_menu / 12) - 1);
@ -4846,7 +4907,6 @@ void UI_func_sequencer(uint8_t param)
else if (seq_temp_active_menu == 1) lcd.print(" 1/8");
else if (seq_temp_active_menu == 2) lcd.print("1/16");
}
} else if (seq_menu == 31) { //copy pattern
lcd.setCursor(13, 0);
lcd.print("[");
@ -4866,10 +4926,17 @@ void UI_func_sequencer(uint8_t param)
lcd.setCursor(14, 1);
lcd.print(temp_int);
} else if (seq_menu == 0) {
lcd.setCursor(8, 0);
#ifdef TESTDISPLAY20x4
lcd.setCursor(14, 0);
lcd.print(" ");
lcd.setCursor(16, 0);
lcd.print(" ");
#else
lcd.setCursor(10, 0);
lcd.print(" ");
lcd.setCursor(12, 0);
lcd.print(" ");
#endif
lcd.setCursor(0, 0);
lcd.print("[");
if (seq_content_type[seq_active_track] == 0) //Drum Mode
@ -4937,19 +5004,45 @@ void UI_func_sequencer(uint8_t param)
lcd.print(" ");
lcd.setCursor(7, 0);
lcd.print(" ");
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
lcd.print(" ");
lcd.setCursor(19, 0);
lcd.print(" ");
#else
lcd.setCursor(13, 0);
lcd.print(" ");
lcd.setCursor(15, 0);
lcd.print(" ");
lcd.setCursor(8, 0);
#endif
#ifdef TESTDISPLAY20x4
lcd.setCursor(14, 0);
lcd.print("[");
seq_refresh_display_play_status();
lcd.setCursor(16, 0);
lcd.print("]");
#else
lcd.setCursor(10, 0);
lcd.print("[");
lcd.setCursor(9, 0);
seq_refresh_display_play_status();
lcd.setCursor(12, 0);
lcd.print("]");
#endif
}
if (seq_menu == 2) {
lcd.setCursor(8, 0);
#ifdef TESTDISPLAY20x4
lcd.setCursor(14, 0);
lcd.print(" ");
lcd.setCursor(16, 0);
lcd.print(" ");
lcd.setCursor(17, 0);
lcd.print("[");
lcd.setCursor(18, 0);
lcd.print(seq_active_track);
lcd.setCursor(19, 0);
lcd.print("]");
#else
lcd.setCursor(10, 0);
lcd.print(" ");
lcd.setCursor(12, 0);
lcd.print(" ");
@ -4959,26 +5052,40 @@ void UI_func_sequencer(uint8_t param)
lcd.print(seq_active_track);
lcd.setCursor(15, 0);
lcd.print("]");
#endif
lcd.setCursor(0, 1);
seq_printAllSeqSteps();
#ifdef TESTDISPLAY20x4
seq_printVelGraphBar();
#endif
}
if (seq_menu == 3) {
lcd.setCursor(15, 0);
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
lcd.print(" ");
lcd.setCursor(19, 0);
lcd.print(" ");
#else
lcd.setCursor(13, 0);
lcd.print(" ");
lcd.setCursor(15, 0);
lcd.print(" ");
#endif
lcd.setCursor(0, 1);
lcd.print("x");
lcd.print("_");
lcd.setCursor(1, 1);
lcd.print(seq_find_shortname(1)[0]);
}
if (seq_menu > 3 && seq_menu < 30) {
if (seq_menu > 3 && seq_menu < 19) {
lcd.setCursor(seq_menu - 3, 1);
lcd.print("x");
lcd.write(219); // cursor symbol
lcd.setCursor(seq_menu - 4, 1);
lcd.print(seq_find_shortname(seq_menu - 4)[0]);
lcd.setCursor(seq_menu - 2, 1);
lcd.print(seq_find_shortname(seq_menu - 2)[0]);
if (seq_menu < 18)
{
lcd.setCursor(seq_menu - 2, 1);
lcd.print(seq_find_shortname(seq_menu - 2)[0]);
}
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -4986,12 +5093,7 @@ void UI_func_sequencer(uint8_t param)
encoderDir[ENC_R].reset();
seq_menu = 0;
seq_active_function = 99;
// seq_running = false;
// seq_recording = false;
// seq_note_in = 0;
// seq_step = 0;
// seq_chain_active_step = 0;
// MicroDexed[0]->panic();
lcd_special_chars(SCROLLBAR);
}
}
@ -5000,6 +5102,8 @@ void UI_func_arpeggio(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
encoderDir[ENC_R].reset();
lcd.createChar(0, (uint8_t*)special_chars[19]); //play symbol
lcd.createChar(2, (uint8_t*)special_chars[21]); //stop symbol
seq_temp_select_menu = 0;
seq_temp_active_menu = 0;
lcd.setCursor( 0, 0);
@ -5115,7 +5219,7 @@ void UI_func_arpeggio(uint8_t param)
lcd.print(" ");
lcd.setCursor( 9, 1);
lcd.print(" ");
lcd.setCursor( 10, 1);
lcd.setCursor( 13, 1);
lcd.print(" ");
lcd.setCursor( 15, 1);
lcd.print(" ");
@ -5130,7 +5234,7 @@ void UI_func_arpeggio(uint8_t param)
lcd.print(" ");
lcd.setCursor( 5, 0);
lcd.print(" ");
lcd.setCursor( 11, 0);
lcd.setCursor( 13, 0);
lcd.print(" ");
lcd.setCursor( 15, 0);
lcd.print(" ");
@ -5141,7 +5245,7 @@ void UI_func_arpeggio(uint8_t param)
lcd.print(" ");
lcd.setCursor( 9, 1);
lcd.print(" ");
lcd.setCursor( 11, 0);
lcd.setCursor( 13, 0);
lcd.print("[");
lcd.setCursor( 15, 0);
lcd.print("]");
@ -5152,7 +5256,7 @@ void UI_func_arpeggio(uint8_t param)
}
else if (seq_temp_select_menu == 3)
{
lcd.setCursor( 11, 0);
lcd.setCursor( 13, 0);
lcd.print(" ");
lcd.setCursor( 15, 0);
lcd.print(" ");
@ -5169,6 +5273,7 @@ void UI_func_arpeggio(uint8_t param)
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
encoderDir[ENC_R].reset();
lcd_special_chars(SCROLLBAR);
}
}
@ -5293,7 +5398,6 @@ void UI_func_seq_pat_chain(uint8_t param)
lcd.print(" ");
lcd.setCursor(9 , 1);
lcd.print(" ");
lcd.setCursor( 11, 0);
lcd.print("[");
lcd.setCursor( 12, 0);
@ -5316,16 +5420,12 @@ void UI_func_seq_pat_chain(uint8_t param)
lcd.print(seq_chain_lenght + 1);
lcd.setCursor( 15, 0);
lcd.print("]");
lcd.setCursor(2 , 0);
lcd.print( seq_patternchain[seq_chain_active_chainstep][0]);
lcd.setCursor(2 , 1);
lcd.print( seq_patternchain[seq_chain_active_chainstep][1]);
lcd.setCursor(8 , 0);
lcd.print( seq_patternchain[seq_chain_active_chainstep][2]);
lcd.setCursor(8 , 1);
lcd.print( seq_patternchain[seq_chain_active_chainstep][3]);
} else if (seq_temp_select_menu == 0 && seq_temp_active_menu == 0) // Drum 0 modify
@ -5954,10 +6054,17 @@ void UI_func_eeprom_reset(uint8_t param)
void UI_update_instance_icons()
{
#ifdef TESTDISPLAY20x4
lcd.setCursor(18, 0);
lcd.write(0); //Icon for first instance
lcd.setCursor(19, 0);
lcd.write(1); //Icon for second instance
#else
lcd.setCursor(14, 0);
lcd.write(0); //Icon for first instance
lcd.setCursor(15, 0);
lcd.write(1); //Icon for second instance
#endif
}
void UI_func_voice_select(uint8_t param)
@ -5966,6 +6073,12 @@ void UI_func_voice_select(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
#ifdef TESTDISPLAY20x4
lcd.setCursor(0, 3);
lcd.print("MENU");
lcd.setCursor(17, 3);
lcd.print("+/-");
#endif
encoderDir[ENC_R].reset();
lcd_active_instance_number(selected_instance_id);
@ -6214,6 +6327,27 @@ void UI_func_voice_select(uint8_t param)
lcd.show(0, 0, 2, configuration.performance.bank[selected_instance_id]);
lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1);
#ifdef TESTDISPLAY20x4
string_toupper(bank_name);
lcd.show(0, 4, 8, bank_name);
string_toupper(voice_name);
lcd.show(1, 4, 10, voice_name);
switch (menu_voice_select)
{
case MENU_VOICE_BANK:
lcd.show(0, 3, 1, "[");
lcd.show(0, 12, 1, "]");
lcd.show(1, 3, 1, " ");
lcd.show(1, 14, 1, " ");
break;
case MENU_VOICE_SOUND:
lcd.show(0, 3, 1, " ");
lcd.show(0, 12, 1, " ");
lcd.show(1, 3, 1, "[");
lcd.show(1, 14, 1, "]");
break;
}
#else
string_toupper(bank_name);
lcd.show(0, 3, 8, bank_name);
lcd.show(0, 12, 1, " "); //forced because this char does not clear after fav-search (because the bank name is one char to short to do it).
@ -6235,9 +6369,9 @@ void UI_func_voice_select(uint8_t param)
lcd.show(1, 13, 1, "]");
break;
}
#endif
draw_favorite_icon(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
@ -8758,13 +8892,11 @@ void locate_next_favorite()
do { //seek in next bank
configuration.performance.bank[selected_instance_id]++;
if ( configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1 && favsearcher < 190)
{
configuration.performance.bank[selected_instance_id] = 0;
configuration.performance.voice[selected_instance_id] = 0;
}
favsearcher++;
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false &&
favsearcher < 132 );
@ -8780,7 +8912,6 @@ void locate_next_favorite()
selected_instance_id) == false && favsearcher < 170);
}
}
}
favsearcher = 0;
@ -8793,7 +8924,6 @@ void locate_next_non_favorite()
lcd.print(">SEARCHING");
do {
configuration.performance.voice[selected_instance_id]++;
if (configuration.performance.voice[selected_instance_id] > 31) {
configuration.performance.voice[selected_instance_id] = 0;
//configuration.performance.bank[selected_instance_id]++;
@ -8831,17 +8961,14 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id)
v = constrain(v, 0, MAX_VOICES - 1);
char tmp[18];
File myFav;
if (sd_card > 0)
{
sprintf(tmp, "/%s/%d/%d.fav", FAV_CONFIG_PATH, b, v);
#ifdef DEBUG
Serial.print("check if Voice is a Favorite: ");
Serial.print(tmp);
Serial.println();
#endif
if (SD.exists(tmp))
{ //is Favorite
#ifdef DEBUG
@ -8868,19 +8995,25 @@ void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id)
v = constrain(v, 0, MAX_VOICES - 1);
char tmp[18];
File myFav;
if (sd_card > 0)
{
sprintf(tmp, "/%s/%d/%d.fav", FAV_CONFIG_PATH, b, v);
if (SD.exists(tmp))
{ //is Favorite
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
#else
lcd.setCursor(13, 0);
#endif
lcd.write(2); //fav symbol
}
else
{ // it was not a favorite
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
#else
lcd.setCursor(13, 0);
#endif
lcd.print(" ");
}
}
@ -8899,7 +9032,6 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id)
Serial.print(tmp);
Serial.println();
#endif
if (SD.exists(tmp) )
{ // this bank HAS at least 1 favorite(s)
#ifdef DEBUG
@ -8924,14 +9056,12 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id)
#ifdef DEBUG
Serial.println("Starting saving Favorite.");
#endif
b = constrain(b, 0, MAX_BANKS - 1);
v = constrain(v, 0, MAX_VOICES - 1);
char tmp[18];
char tmpfolder[18];
File myFav;
uint8_t i = 0, countfavs = 0;
if (sd_card > 0)
{
sprintf(tmp, "/%s/%d/%d.fav", FAV_CONFIG_PATH, b, v);
@ -8940,7 +9070,6 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id)
Serial.println("Save Favorite to SD card...");
Serial.println(tmp);
#endif
if (!SD.exists(tmp))
{ //create Favorite Semaphore
if (!SD.exists(tmpfolder))
@ -8950,8 +9079,11 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id)
myFav = SD.open(tmp, FILE_WRITE);
myFav.close();
Serial.println("Favorite saved...");
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
#else
lcd.setCursor(13, 0);
#endif
lcd.write(2); //fav symbol
#ifdef DEBUG
Serial.println("Added to Favorites...");
@ -8970,14 +9102,17 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id)
if (countfavs == 0) {
sprintf(tmp, "/%s/%d", FAV_CONFIG_PATH, b);
SD.rmdir(tmp);
#ifdef DEBUG
Serial.println("Fav count in bank:");
Serial.print(countfavs);
Serial.println("Removed folder since no voice in bank flagged as favorite any more");
#endif
}
#ifdef TESTDISPLAY20x4
lcd.setCursor(17, 0);
#else
lcd.setCursor(13, 0);
#endif
lcd.print(" "); //remove fav symbol
#ifdef DEBUG
Serial.println("Removed from Favorites...");
@ -8991,6 +9126,5 @@ char* basename(const char* filename)
char* p = strrchr (filename, '/');
return p ? p + 1 : (char *) filename;
}
#endif
#endif

@ -53,14 +53,14 @@ LCDML_add(19, LCDML_0_1_2_3_4, 1, "Roomsize", UI_func_reverb_roomsize);
LCDML_add(20, LCDML_0_1_2_3_4, 2, "Damping", UI_func_reverb_damping);
LCDML_add(21, LCDML_0_1_2_3_4, 3, "Level", UI_func_reverb_level);
LCDML_add(22, LCDML_0_1_2_3_4, 4, "Reverb Send", UI_func_reverb_send);
LCDML_add(23, LCDML_0_1_2, 4, "EQ", NULL);
LCDML_add(24, LCDML_0_1_2_4, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(25, LCDML_0_1_2_4, 2, "120Hz", UI_func_eq_2);
LCDML_add(26, LCDML_0_1_2_4, 3, "220Hz", UI_func_eq_3);
LCDML_add(27, LCDML_0_1_2_4, 4, "1000Hz", UI_func_eq_4);
LCDML_add(28, LCDML_0_1_2_4, 5, "2000Hz", UI_func_eq_5);
LCDML_add(29, LCDML_0_1_2_4, 6, "7000Hz", UI_func_eq_6);
LCDML_add(30, LCDML_0_1_2_4, 7, "High-Cut", UI_func_eq_7);
LCDML_add(23, LCDML_0_1_2_3, 5, "EQ", NULL);
LCDML_add(24, LCDML_0_1_2_3_5, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(25, LCDML_0_1_2_3_5, 2, "120Hz", UI_func_eq_2);
LCDML_add(26, LCDML_0_1_2_3_5, 3, "220Hz", UI_func_eq_3);
LCDML_add(27, LCDML_0_1_2_3_5, 4, "1000Hz", UI_func_eq_4);
LCDML_add(28, LCDML_0_1_2_3_5, 5, "2000Hz", UI_func_eq_5);
LCDML_add(29, LCDML_0_1_2_3_5, 6, "7000Hz", UI_func_eq_6);
LCDML_add(30, LCDML_0_1_2_3_5, 7, "High-Cut", UI_func_eq_7);
LCDML_add(31, LCDML_0_1, 3, "Controller", NULL);
LCDML_add(32, LCDML_0_1_3, 1, "Pitchbend", NULL);
LCDML_add(33, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range);
@ -121,7 +121,7 @@ LCDML_add(87, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan);
LCDML_add(88, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send);
LCDML_add(89, LCDML_0_4, 5, "MIDI Channel", UI_func_drum_midi_channel);
LCDML_add(90, LCDML_0, 5, "Sequencer", NULL);
LCDML_add(91, LCDML_0_5, 1, "Sequencer", UI_func_sequencer);
LCDML_add(91, LCDML_0_5, 1, "Pattern Editor", UI_func_seq_pattern_editor);
LCDML_add(92, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor);
LCDML_add(93, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain);
LCDML_add(94, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio);

@ -56,14 +56,14 @@ LCDML_add(22, LCDML_0_1_2_3_4, 4, "Hidamp", UI_func_reverb_hidamp);
LCDML_add(23, LCDML_0_1_2_3_4, 5, "Diffusion", UI_func_reverb_diffusion);
LCDML_add(24, LCDML_0_1_2_3_4, 6, "Level", UI_func_reverb_level);
LCDML_add(25, LCDML_0_1_2_3_4, 7, "Reverb Send", UI_func_reverb_send);
LCDML_add(26, LCDML_0_1_2, 4, "EQ", NULL);
LCDML_add(27, LCDML_0_1_2_4, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(28, LCDML_0_1_2_4, 2, "110Hz", UI_func_eq_2);
LCDML_add(29, LCDML_0_1_2_4, 3, "220Hz", UI_func_eq_3);
LCDML_add(30, LCDML_0_1_2_4, 4, "1000Hz", UI_func_eq_4);
LCDML_add(31, LCDML_0_1_2_4, 5, "2000Hz", UI_func_eq_5);
LCDML_add(32, LCDML_0_1_2_4, 6, "7000Hz", UI_func_eq_6);
LCDML_add(33, LCDML_0_1_2_4, 7, "High-Cut", UI_func_eq_7);
LCDML_add(26, LCDML_0_1_2_3, 5, "EQ", NULL);
LCDML_add(27, LCDML_0_1_2_3_5, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(28, LCDML_0_1_2_3_5, 2, "110Hz", UI_func_eq_2);
LCDML_add(29, LCDML_0_1_2_3_5, 3, "220Hz", UI_func_eq_3);
LCDML_add(30, LCDML_0_1_2_3_5, 4, "1000Hz", UI_func_eq_4);
LCDML_add(31, LCDML_0_1_2_3_5, 5, "2000Hz", UI_func_eq_5);
LCDML_add(32, LCDML_0_1_2_3_5, 6, "7000Hz", UI_func_eq_6);
LCDML_add(33, LCDML_0_1_2_3_5, 7, "High-Cut", UI_func_eq_7);
LCDML_add(34, LCDML_0_1, 3, "Controller", NULL);
LCDML_add(35, LCDML_0_1_3, 1, "Pitchbend", NULL);
LCDML_add(36, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range);
@ -124,7 +124,7 @@ LCDML_add(90, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan);
LCDML_add(91, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send);
LCDML_add(92, LCDML_0_4, 5, "MIDI Channel", UI_func_drum_midi_channel);
LCDML_add(93, LCDML_0, 5, "Sequencer", NULL);
LCDML_add(94, LCDML_0_5, 1, "Sequencer", UI_func_sequencer);
LCDML_add(94, LCDML_0_5, 1, "Pattern Editor", UI_func_seq_pattern_editor);
LCDML_add(95, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor);
LCDML_add(96, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain);
LCDML_add(97, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio);

@ -188,6 +188,7 @@
#define ENABLE_LCD_UI 1
#define STANDARD_LCD_I2C
//#define OLED_SPI
//#define TESTDISPLAY20x4 //Currently for testing I2C Display 20x4
// LCD Display
//I2C_DISPLAY only
@ -195,8 +196,14 @@
#define LCD_I2C_ADDRESS 0x27
//#define LCD_I2C_ADDRESS 0x3f
//Display size, must be set for U8X8 as well
#ifdef TESTDISPLAY20x4
#define LCD_cols 20
#define LCD_rows 4
#else
#define LCD_cols 16
#define LCD_rows 2
#endif
#define I2C_DISPLAY
// [I2C] SCL: Pin 19, SDA: Pin 18 (https://www.pjrc.com/teensy/td_libs_Wire.html)
//#define LCD_GFX 1
@ -229,8 +236,8 @@
#define SDCARD_AUDIO_CS_PIN 10
#define SDCARD_AUDIO_MOSI_PIN 7
#define SDCARD_AUDIO_SCK_PIN 14
#ifndef TEENSY4
// Teensy 3.5 & 3.6 SD card
#if defined(ARDUINO_TEENSY41) || defined(TEENSY3_6) // new detection logic to also find on board SD Card from Teensy 4.1
// Teensy 3.6 & 4.1 internal SD card
#define SDCARD_TEENSY_CS_PIN BUILTIN_SDCARD
#define SDCARD_TEENSY_MOSI_PIN 11
#define SDCARD_TEENSY_SCK_PIN 13

Loading…
Cancel
Save