|
|
@ -85,6 +85,7 @@ extern drum_config_t drum_config[NUM_DRUMSET_CONFIG]; |
|
|
|
extern sequencer_t seq; |
|
|
|
extern sequencer_t seq; |
|
|
|
uint8_t seq_active_function = 99; |
|
|
|
uint8_t seq_active_function = 99; |
|
|
|
uint8_t activesample; |
|
|
|
uint8_t activesample; |
|
|
|
|
|
|
|
extern custom_midi_map_t custom_midi_map[NUM_CUSTOM_MIDI_MAPPINGS]; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef SGTL5000_AUDIO_ENHANCE |
|
|
|
#ifdef SGTL5000_AUDIO_ENHANCE |
|
|
@ -175,6 +176,18 @@ int temp_int; |
|
|
|
bool menu_select_toggle; |
|
|
|
bool menu_select_toggle; |
|
|
|
float temp_float; |
|
|
|
float temp_float; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char cc_names[8][12] = { "Volume ", |
|
|
|
|
|
|
|
"Panorama ", |
|
|
|
|
|
|
|
"Bank Select", |
|
|
|
|
|
|
|
"Reverb Send", |
|
|
|
|
|
|
|
"Seq. Start ", |
|
|
|
|
|
|
|
"Seq. Stop ", |
|
|
|
|
|
|
|
"Seq. RECORD", |
|
|
|
|
|
|
|
"Panic Dexed" |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const uint8_t cc_dest_values[8] = { 7, 10, 32, 91, 200, 201, 202, 203 }; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef I2C_DISPLAY |
|
|
|
#ifdef I2C_DISPLAY |
|
|
|
#include <LiquidCrystal_I2C.h> |
|
|
|
#include <LiquidCrystal_I2C.h> |
|
|
|
Disp_Plus<LiquidCrystal_I2C> display(LCD_I2C_ADDRESS, _LCDML_DISP_cols, _LCDML_DISP_rows); |
|
|
|
Disp_Plus<LiquidCrystal_I2C> display(LCD_I2C_ADDRESS, _LCDML_DISP_cols, _LCDML_DISP_rows); |
|
|
@ -4788,6 +4801,222 @@ void UI_func_drum_pitch(uint8_t param) |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void print_custom_mappings() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// for (uint8_t y = 0; y < 10; y++)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, y + 8);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// seq_print_formatted_number(y + 1, 2); //entry no.
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (custom_midi_map[y].type == 0)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setTextColor(GREY1, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 4, 5, "NONE" );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else if (custom_midi_map[y].type == 1)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setTextColor(DX_CYAN, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 4, 7, "KEY/PAD" );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else if (custom_midi_map[y].type == 2)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setTextColor(DX_CYAN, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 4, 7, "MIDI CC" );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// display.setTextColor(DX_ORANGE, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 12, 3, custom_midi_map[y].in );
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextColor(DX_MAGENTA, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 16, 3, custom_midi_map[y].out );
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextColor(LIGHTBLUE, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 20, 3, custom_midi_map[y].channel );
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextColor(DX_PURPLE, BLACK);
|
|
|
|
|
|
|
|
// if (custom_midi_map[y].in == 0)
|
|
|
|
|
|
|
|
// display.show(y + 8, 24, 12, "EMPTY SLOT");
|
|
|
|
|
|
|
|
// else if (custom_midi_map[y].type == 1)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setTextColor(PINK, BLACK);
|
|
|
|
|
|
|
|
// display.show(y + 8, 24, 13, find_long_drum_name_from_note(custom_midi_map[y].out) );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else if (custom_midi_map[y].type == 2)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// display.setTextColor(LIGHTBLUE, BLACK);
|
|
|
|
|
|
|
|
// for (uint8_t i = 0; i < sizeof(cc_dest_values); i++)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (custom_midi_map[y].out == cc_dest_values[i])
|
|
|
|
|
|
|
|
// display.show(y + 8, 24, 13, cc_names[i] );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_custom_mappings(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//char displayname[8] = {0, 0, 0, 0, 0, 0, 0};
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
// display.fillScreen(BLACK);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// border1();
|
|
|
|
|
|
|
|
// border2();
|
|
|
|
|
|
|
|
// border3_large();
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, 1);
|
|
|
|
|
|
|
|
// display.print(F("CUSTOM MAPPINGS"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLUE);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.fillRect (240 + CHAR_width, CHAR_height, 8 * CHAR_width, 4 * CHAR_height, BLUE);
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 2 + 5, 2 * CHAR_height );
|
|
|
|
|
|
|
|
// display.print(F("TOUCH"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.drawBitmap(240 + CHAR_width * 2 + 4, CHAR_height * 4 - 12, special_chars[19], 8, 8, GREEN);
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 3 + 10, CHAR_height * 4 - 12 );
|
|
|
|
|
|
|
|
// display.setTextSize(1);
|
|
|
|
|
|
|
|
// display.print(F("PREVIEW"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.fillRect (240 + CHAR_width + CHAR_width * 10 - 2, CHAR_height, 8 * CHAR_width, 4 * CHAR_height, BLUE);
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 12 + 4, 2 * CHAR_height);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.print(F("TOUCH"));
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 12 + 3, CHAR_height * 4 - 12 );
|
|
|
|
|
|
|
|
// display.setTextSize(1);
|
|
|
|
|
|
|
|
// display.print(F("MIDI LEARN"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //scrollbar
|
|
|
|
|
|
|
|
// display.fillRect (480 - 28, 8 * CHAR_height, 14, 10 * CHAR_height, WHITE);
|
|
|
|
|
|
|
|
// display.fillRect (480 - 27, 8 * CHAR_height + 1, 12, 4 * CHAR_height, GREY1);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, 7);
|
|
|
|
|
|
|
|
// display.print(F("NO TYPE IN OUT CH. NAME"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_custom_mappings(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
smart_filter(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
smart_filter(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.BT_checkEnter()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, 2);
|
|
|
|
|
|
|
|
// display.print("[");
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(4, 2);
|
|
|
|
|
|
|
|
// display.print("]");
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(2, 2);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// sprintf(displayname, "%02d", activesample);
|
|
|
|
|
|
|
|
// display.print(displayname);
|
|
|
|
|
|
|
|
// display.setTextColor(DX_CYAN, BLACK);
|
|
|
|
|
|
|
|
// display.show(2, 5, 13, basename(drum_config[activesample].name));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq.midi_learn_active = false; |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_cc_mappings(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
// display.fillScreen(BLACK);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// border1();
|
|
|
|
|
|
|
|
// border2();
|
|
|
|
|
|
|
|
// border3_large();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UI_update_instance_icons(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, 1);
|
|
|
|
|
|
|
|
// display.print("CUSTOM DEXED CC");
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLUE);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.fillRect (240 + CHAR_width + CHAR_width * 10 - 2, CHAR_height, 8 * CHAR_width, 4 * CHAR_height, BLUE);
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 12 + 4, 2 * CHAR_height);
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.print(F("TOUCH"));
|
|
|
|
|
|
|
|
// display.setCursor(240 + CHAR_width * 12 + 3, CHAR_height * 4 - 12 );
|
|
|
|
|
|
|
|
// display.setTextSize(1);
|
|
|
|
|
|
|
|
// display.print(F("MIDI LEARN"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //scrollbar
|
|
|
|
|
|
|
|
// display.fillRect (480 - 28, 8 * CHAR_height, 14, 10 * CHAR_height, WHITE);
|
|
|
|
|
|
|
|
// display.fillRect (480 - 27, 8 * CHAR_height + 1, 12, 4 * CHAR_height, GREY1);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.setTextColor(WHITE, BLACK);
|
|
|
|
|
|
|
|
// display.setCursor_textGrid(1, 7);
|
|
|
|
|
|
|
|
// display.print(F("NO TYPE IN OUT CH. NAME"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_custom_mappings(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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.temp_select_menu = constrain(seq.temp_select_menu + ENCODER[ENC_R].speed(), 0, 7); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq.temp_select_menu = constrain(seq.temp_select_menu - ENCODER[ENC_R].speed(), 0, 7); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.BT_checkEnter()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
selected_instance_id = !selected_instance_id; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UI_update_instance_icons(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// display.setTextSize(2);
|
|
|
|
|
|
|
|
// display.setTextColor(DX_CYAN, BLACK);
|
|
|
|
|
|
|
|
// display.show(2, 1, 13, cc_names[seq.temp_select_menu] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seq.midi_learn_active = false; |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UI_func_drum_volume(uint8_t param) |
|
|
|
void UI_func_drum_volume(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char displayname[8] = {0, 0, 0, 0, 0, 0, 0}; |
|
|
|
char displayname[8] = {0, 0, 0, 0, 0, 0, 0}; |
|
|
|