|
|
|
@ -63,6 +63,14 @@ extern void eeprom_update_dexed(uint8_t instance_id); |
|
|
|
|
extern float pseudo_log_curve(float value); |
|
|
|
|
extern uint8_t selected_instance_id; |
|
|
|
|
extern char receive_bank_filename[FILENAME_LEN]; |
|
|
|
|
extern uint8_t seqdata[3][16]; |
|
|
|
|
extern uint8_t seqsteptimer; |
|
|
|
|
extern bool seq_running; |
|
|
|
|
uint8_t activesample; |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#include "drums.h" |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
extern void change_disp_sd(bool d); |
|
|
|
@ -114,6 +122,8 @@ const char accepted_chars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-abcdefghijk |
|
|
|
|
uint8_t active_perform_page = 1; |
|
|
|
|
uint8_t orig_attack_values[2][7]; |
|
|
|
|
uint8_t orig_release_values[2][7]; |
|
|
|
|
uint8_t active_seq_track = 0; |
|
|
|
|
uint8_t seq_menu; |
|
|
|
|
|
|
|
|
|
#ifdef I2C_DISPLAY |
|
|
|
|
#include <LiquidCrystal_I2C.h> |
|
|
|
@ -234,6 +244,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_volume(uint8_t param); |
|
|
|
|
void UI_func_load_performance(uint8_t param); |
|
|
|
|
void UI_func_save_performance(uint8_t param); |
|
|
|
@ -3519,6 +3530,282 @@ void UI_handle_OP(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_sequencer(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
String displayname = String(8); |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
// setup function
|
|
|
|
|
|
|
|
|
|
// lcd.print(drum_config[activesample].midinote);
|
|
|
|
|
lcd.setCursor(1, 0); |
|
|
|
|
displayname = drum_config[activesample].filename; |
|
|
|
|
lcd.print(displayname.substring(5, 11) ); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(8, 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(9, 0); |
|
|
|
|
if (seq_running) |
|
|
|
|
{ |
|
|
|
|
lcd.print("STP"); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
lcd.print("RUN"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(14, 0); |
|
|
|
|
lcd.print(active_seq_track + 1); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("----------------" ); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(10, 0); |
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
|
lcd.setCursor(i, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][i] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
bool foundsound = false; |
|
|
|
|
if (seq_menu == 0) { |
|
|
|
|
lcd.setCursor(8, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(1, 0); |
|
|
|
|
displayname = drum_config[activesample].filename; |
|
|
|
|
lcd.print(displayname.substring(5, 11) ); |
|
|
|
|
lcd.setCursor(7, 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (seq_menu == 1) { |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(7, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(15, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(8, 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
lcd.setCursor(9, 0); |
|
|
|
|
if (seq_running) |
|
|
|
|
{ |
|
|
|
|
lcd.print("STP"); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
lcd.print("RUN"); |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (seq_menu == 2) { |
|
|
|
|
lcd.setCursor(8, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
lcd.print("["); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(14, 0); |
|
|
|
|
lcd.print(active_seq_track + 1); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(15, 0); |
|
|
|
|
lcd.print("]"); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][0] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
foundsound = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (foundsound == false) lcd.print("-"); |
|
|
|
|
foundsound = false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (seq_menu == 3) { |
|
|
|
|
lcd.setCursor(15, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("X"); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][1] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
foundsound = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (foundsound == false) lcd.print("-"); |
|
|
|
|
foundsound = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (seq_menu > 3) { |
|
|
|
|
|
|
|
|
|
lcd.setCursor(seq_menu - 3, 1); |
|
|
|
|
lcd.print("X"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(seq_menu - 4, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][seq_menu - 4] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
foundsound = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (foundsound == false) lcd.print("-"); |
|
|
|
|
foundsound = false; |
|
|
|
|
|
|
|
|
|
lcd.setCursor(seq_menu - 2, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][seq_menu - 2] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
foundsound = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (foundsound == false) lcd.print("-"); |
|
|
|
|
foundsound = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if (seq_menu == 55) {
|
|
|
|
|
//
|
|
|
|
|
// 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_DRUMCONFIG - 1);
|
|
|
|
|
// else if (LCDML.BT_checkUp())
|
|
|
|
|
// activesample = constrain(activesample - 1, 0, NUM_DRUMCONFIG - 1);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
//
|
|
|
|
|
// if (seq_menu == 41) {
|
|
|
|
|
//
|
|
|
|
|
// 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_DRUMCONFIG - 1);
|
|
|
|
|
// else if (LCDML.BT_checkUp())
|
|
|
|
|
// activesample = constrain(activesample - 1, 0, NUM_DRUMCONFIG - 1);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// lcd.setCursor(1, 0);
|
|
|
|
|
// displayname = drum_config[activesample].filename;
|
|
|
|
|
//
|
|
|
|
|
// lcd.print(displayname.substring(5, 11) );
|
|
|
|
|
//
|
|
|
|
|
// } else
|
|
|
|
|
//
|
|
|
|
|
// if (seq_menu == 54) {
|
|
|
|
|
//
|
|
|
|
|
// ;
|
|
|
|
|
//
|
|
|
|
|
// } else
|
|
|
|
|
//
|
|
|
|
|
// if (seq_menu == 555) {
|
|
|
|
|
//
|
|
|
|
|
// if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()))
|
|
|
|
|
// {
|
|
|
|
|
// if (LCDML.BT_checkDown())
|
|
|
|
|
// active_seq_track = constrain(active_seq_track + 1, 0, 2);
|
|
|
|
|
// else if (LCDML.BT_checkUp())
|
|
|
|
|
// active_seq_track = constrain(active_seq_track - 1, 0, 2);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("----------------" ); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
|
lcd.setCursor(i, 1); |
|
|
|
|
|
|
|
|
|
for (uint8_t d = 0; d < NUM_DRUMCONFIG; d++) |
|
|
|
|
{ |
|
|
|
|
if (seqdata[active_seq_track][i] == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
lcd.print(drum_config[d].shortname ); //one letter name of Category
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_information(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
@ -4010,9 +4297,11 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
|
|
|
|
|
void UI_func_volume(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
char tmp[6]; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_L].reset(); |
|
|
|
|
|
|
|
|
|
if (active_perform_page == 1) |
|
|
|
@ -4177,6 +4466,7 @@ void UI_func_volume(uint8_t param) |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, sys.vol), configuration.sys.vol); |
|
|
|
|
encoderDir[ENC_L].reset(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_load_performance(uint8_t param) |
|
|
|
|