From f6a90d8864d660c8b791b9365ab19a7b0c870de6 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Mon, 23 Mar 2020 13:55:21 +0100 Subject: [PATCH] Added option for controlelrs to reverse their behaviour. Fixed controllers struct/class. --- MicroDexed.ino | 8 +- UI.hpp | 253 +++++++++++++++++++++++++++++++++++++++++++++++-- UI_1.h | 62 ++++++------ UI_1_FX.h | 90 +++++++++--------- UI_2.h | 138 ++++++++++++++------------- UI_2_FX.h | 178 +++++++++++++++++----------------- config.h | 20 ++++ controllers.h | 77 ++++++++++----- dexed.cpp | 24 ++++- dexed.h | 8 +- dx7note.h | 3 +- 11 files changed, 591 insertions(+), 270 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index d3d98b8..c2a4293 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1336,10 +1336,10 @@ void initial_values_from_eeprom(bool init) for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step); - MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign); - MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign); - MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign); - MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign); + MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode); + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode); + MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); + MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); MicroDexed[instance_id]->doRefreshVoice(); diff --git a/UI.hpp b/UI.hpp index 44aac80..ebc82b6 100644 --- a/UI.hpp +++ b/UI.hpp @@ -177,12 +177,16 @@ void UI_func_pb_range(uint8_t param); void UI_func_pb_step(uint8_t param); void UI_func_mw_range(uint8_t param); void UI_func_mw_assign(uint8_t param); +void UI_func_mw_mode(uint8_t param); void UI_func_fc_range(uint8_t param); void UI_func_fc_assign(uint8_t param); +void UI_func_fc_mode(uint8_t param); void UI_func_bc_range(uint8_t param); void UI_func_bc_assign(uint8_t param); +void UI_func_bc_mode(uint8_t param); void UI_func_at_range(uint8_t param); void UI_func_at_assign(uint8_t param); +void UI_func_at_mode(uint8_t param); void UI_func_portamento_mode(uint8_t param); void UI_func_portamento_glissando(uint8_t param); void UI_func_portamento_time(uint8_t param); @@ -2149,7 +2153,7 @@ void UI_func_mw_range(uint8_t param) } } - MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign); + MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode); } lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, false); @@ -2200,7 +2204,7 @@ void UI_func_mw_assign(uint8_t param) } } - MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign); + MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode); } lcd.setCursor(0, 1); @@ -2240,6 +2244,65 @@ void UI_func_mw_assign(uint8_t param) } } +void UI_func_mw_mode(uint8_t param) +{ + uint8_t instance_id = 0; + + if (LCDML.FUNC_getID() > MENU_ID_OF_INSTANCE_2) + instance_id = 1; + + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + // setup function + lcd.setCursor(0, 0); + lcd.print(F("MW Mode")); + } + + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkEnter()) + { + LCDML.FUNC_goBackToMenu(); + } + else if (LCDML.BT_checkDown() || LCDML.BT_checkUp()) + { + if (LCDML.BT_checkDown()) + { + if (configuration.dexed[instance_id].mw_mode < MW_MODE_MAX) + { + configuration.dexed[instance_id].mw_mode++; + } + } + else if (LCDML.BT_checkUp()) + { + if (configuration.dexed[instance_id].mw_mode > MW_MODE_MIN) + { + configuration.dexed[instance_id].mw_mode--; + } + } + + MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode); + } + + lcd.setCursor(0, 1); + switch (configuration.dexed[instance_id].mw_mode) + { + case 0: + lcd.print(F("[NORMAL ]")); + break; + case 1: + lcd.print(F("[REVERSE]")); + break; + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + // you can here reset some global vars or do nothing + eeprom_write(); + } +} + void UI_func_fc_range(uint8_t param) { uint8_t instance_id = 0; @@ -2277,7 +2340,7 @@ void UI_func_fc_range(uint8_t param) } } - MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign); + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode); } lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, false); @@ -2328,7 +2391,7 @@ void UI_func_fc_assign(uint8_t param) } } - MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign); + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign,configuration.dexed[instance_id].fc_mode); } lcd.setCursor(0, 1); @@ -2368,6 +2431,64 @@ void UI_func_fc_assign(uint8_t param) } } +void UI_func_fc_mode(uint8_t param) +{ + uint8_t instance_id = 0; + + if (LCDML.FUNC_getID() > MENU_ID_OF_INSTANCE_2) + instance_id = 1; + + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + // setup function + lcd.setCursor(0, 0); + lcd.print(F("FC Mode")); + } + + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkEnter()) + { + LCDML.FUNC_goBackToMenu(); + } + else if (LCDML.BT_checkDown() || LCDML.BT_checkUp()) + { + if (LCDML.BT_checkDown()) + { + if (configuration.dexed[instance_id].fc_mode < FC_MODE_MAX) + { + configuration.dexed[instance_id].fc_mode++; + } + } + else if (LCDML.BT_checkUp()) + { + if (configuration.dexed[instance_id].fc_mode > FC_MODE_MIN) + { + configuration.dexed[instance_id].fc_mode--; + } + } + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode); + } + + lcd.setCursor(0, 1); + switch (configuration.dexed[instance_id].fc_mode) + { + case 0: + lcd.print(F("[NORMAL ]")); + break; + case 1: + lcd.print(F("[REVERSE]")); + break; + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + // you can here reset some global vars or do nothing + eeprom_write(); + } +} + void UI_func_bc_range(uint8_t param) { uint8_t instance_id = 0; @@ -2405,7 +2526,7 @@ void UI_func_bc_range(uint8_t param) } } - MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign); + MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); } lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, false); @@ -2456,7 +2577,7 @@ void UI_func_bc_assign(uint8_t param) } } - MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign); + MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); } lcd.setCursor(0, 1); @@ -2496,6 +2617,64 @@ void UI_func_bc_assign(uint8_t param) } } +void UI_func_bc_mode(uint8_t param) +{ + uint8_t instance_id = 0; + + if (LCDML.FUNC_getID() > MENU_ID_OF_INSTANCE_2) + instance_id = 1; + + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + // setup function + lcd.setCursor(0, 0); + lcd.print(F("BC Mode")); + } + + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkEnter()) + { + LCDML.FUNC_goBackToMenu(); + } + else if (LCDML.BT_checkDown() || LCDML.BT_checkUp()) + { + if (LCDML.BT_checkDown()) + { + if (configuration.dexed[instance_id].bc_mode < BC_MODE_MAX) + { + configuration.dexed[instance_id].bc_mode++; + } + } + else if (LCDML.BT_checkUp()) + { + if (configuration.dexed[instance_id].bc_mode > BC_MODE_MIN) + { + configuration.dexed[instance_id].bc_mode--; + } + } + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); + } + + lcd.setCursor(0, 1); + switch (configuration.dexed[instance_id].bc_mode) + { + case 0: + lcd.print(F("[NORMAL ]")); + break; + case 1: + lcd.print(F("[REVERSE]")); + break; + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + // you can here reset some global vars or do nothing + eeprom_write(); + } +} + void UI_func_at_range(uint8_t param) { uint8_t instance_id = 0; @@ -2533,7 +2712,7 @@ void UI_func_at_range(uint8_t param) } } - MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign); + MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); } lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, false); @@ -2584,7 +2763,7 @@ void UI_func_at_assign(uint8_t param) } } - MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign); + MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); } lcd.setCursor(0, 1); @@ -2624,6 +2803,64 @@ void UI_func_at_assign(uint8_t param) } } +void UI_func_at_mode(uint8_t param) +{ + uint8_t instance_id = 0; + + if (LCDML.FUNC_getID() > MENU_ID_OF_INSTANCE_2) + instance_id = 1; + + if (LCDML.FUNC_setup()) // ****** SETUP ********* + { + // setup function + lcd.setCursor(0, 0); + lcd.print(F("AT Mode")); + } + + if (LCDML.FUNC_loop()) // ****** LOOP ********* + { + if (LCDML.BT_checkEnter()) + { + LCDML.FUNC_goBackToMenu(); + } + else if (LCDML.BT_checkDown() || LCDML.BT_checkUp()) + { + if (LCDML.BT_checkDown()) + { + if (configuration.dexed[instance_id].at_mode < AT_MODE_MAX) + { + configuration.dexed[instance_id].at_mode++; + } + } + else if (LCDML.BT_checkUp()) + { + if (configuration.dexed[instance_id].at_mode > AT_MODE_MIN) + { + configuration.dexed[instance_id].at_mode--; + } + } + MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); + } + + lcd.setCursor(0, 1); + switch (configuration.dexed[instance_id].at_mode) + { + case 0: + lcd.print(F("[NORMAL ]")); + break; + case 1: + lcd.print(F("[REVERSE]")); + break; + } + } + + if (LCDML.FUNC_close()) // ****** STABLE END ********* + { + // you can here reset some global vars or do nothing + eeprom_write(); + } +} + void UI_func_portamento_mode(uint8_t param) { uint8_t instance_id = 0; diff --git a/UI_1.h b/UI_1.h index 9c67d27..34e1390 100644 --- a/UI_1.h +++ b/UI_1.h @@ -41,34 +41,38 @@ LCDML_add(12, LCDML_0_1_10, 2, "PB Step", UI_func_pb_step); LCDML_add(13, LCDML_0_1, 11, "Mod Wheel", NULL); LCDML_add(14, LCDML_0_1_11, 1, "MW Range", UI_func_mw_range); LCDML_add(15, LCDML_0_1_11, 2, "MW Assign", UI_func_mw_assign); -LCDML_add(16, LCDML_0_1, 12, "Foot Ctrl", NULL); -LCDML_add(17, LCDML_0_1_12, 1, "FC Range", UI_func_fc_range); -LCDML_add(18, LCDML_0_1_12, 2, "FC Assign", UI_func_fc_assign); -LCDML_add(19, LCDML_0_1, 13, "Breath Ctrl", NULL); -LCDML_add(20, LCDML_0_1_13, 1, "BC Range", UI_func_bc_range); -LCDML_add(21, LCDML_0_1_13, 2, "BC Assign", UI_func_bc_assign); -LCDML_add(22, LCDML_0_1, 14, "Aftertouch", NULL); -LCDML_add(23, LCDML_0_1_14, 1, "AT Range", UI_func_at_range); -LCDML_add(24, LCDML_0_1_14, 2, "AT Assign", UI_func_at_assign); -LCDML_add(25, LCDML_0_1, 15, "Portamento", NULL); -LCDML_add(26, LCDML_0_1_15, 1, "Port. Mode", UI_func_portamento_mode); -LCDML_add(27, LCDML_0_1_15, 2, "Port. Gliss", UI_func_portamento_glissando); -LCDML_add(28, LCDML_0_1_15, 3, "Port. Time", UI_func_portamento_time); -LCDML_add(29, LCDML_0_1, 16, "Operator", NULL); -LCDML_add(30, LCDML_0_1_16, 1, "OP1", UI_func_OP1); -LCDML_add(31, LCDML_0_1_16, 2, "OP2", UI_func_OP2); -LCDML_add(32, LCDML_0_1_16, 3, "OP3", UI_func_OP3); -LCDML_add(33, LCDML_0_1_16, 4, "OP4", UI_func_OP4); -LCDML_add(34, LCDML_0_1_16, 5, "OP5", UI_func_OP5); -LCDML_add(35, LCDML_0_1_16, 6, "OP6", UI_func_OP6); -LCDML_add(36, LCDML_0, 2, "Load/Save", NULL); -LCDML_add(37, LCDML_0_2, 1, "Load", UI_func_load); -LCDML_add(38, LCDML_0_2, 2, "Save", UI_func_save); -LCDML_add(39, LCDML_0, 3, "System", NULL); -LCDML_add(40, LCDML_0_3, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(41, LCDML_0_3, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(42, LCDML_0, 4, "Info", UI_func_information); -#define _LCDML_DISP_cnt 42 -#define MENU_ID_OF_INSTANCE_2 36 +LCDML_add(16, LCDML_0_1_11, 3, "MW Mode", UI_func_mw_mode); +LCDML_add(17, LCDML_0_1, 12, "Foot Ctrl", NULL); +LCDML_add(18, LCDML_0_1_12, 1, "FC Range", UI_func_fc_range); +LCDML_add(19, LCDML_0_1_12, 2, "FC Assign", UI_func_fc_assign); +LCDML_add(20, LCDML_0_1_12, 3, "FC Mode", UI_func_fc_mode); +LCDML_add(21, LCDML_0_1, 13, "Breath Ctrl", NULL); +LCDML_add(22, LCDML_0_1_13, 1, "BC Range", UI_func_bc_range); +LCDML_add(23, LCDML_0_1_13, 2, "BC Assign", UI_func_bc_assign); +LCDML_add(24, LCDML_0_1_13, 3, "BC Mode", UI_func_bc_mode); +LCDML_add(25, LCDML_0_1, 14, "Aftertouch", NULL); +LCDML_add(26, LCDML_0_1_14, 1, "AT Range", UI_func_at_range); +LCDML_add(27, LCDML_0_1_14, 2, "AT Assign", UI_func_at_assign); +LCDML_add(28, LCDML_0_1_14, 3, "AT Mode", UI_func_at_mode); +LCDML_add(29, LCDML_0_1, 15, "Portamento", NULL); +LCDML_add(30, LCDML_0_1_15, 1, "Port. Mode", UI_func_portamento_mode); +LCDML_add(31, LCDML_0_1_15, 2, "Port. Gliss", UI_func_portamento_glissando); +LCDML_add(32, LCDML_0_1_15, 3, "Port. Time", UI_func_portamento_time); +LCDML_add(33, LCDML_0_1, 16, "Operator", NULL); +LCDML_add(34, LCDML_0_1_16, 1, "OP1", UI_func_OP1); +LCDML_add(35, LCDML_0_1_16, 2, "OP2", UI_func_OP2); +LCDML_add(36, LCDML_0_1_16, 3, "OP3", UI_func_OP3); +LCDML_add(37, LCDML_0_1_16, 4, "OP4", UI_func_OP4); +LCDML_add(38, LCDML_0_1_16, 5, "OP5", UI_func_OP5); +LCDML_add(39, LCDML_0_1_16, 6, "OP6", UI_func_OP6); +LCDML_add(40, LCDML_0, 2, "Load/Save", NULL); +LCDML_add(41, LCDML_0_2, 1, "Load", UI_func_load); +LCDML_add(42, LCDML_0_2, 2, "Save", UI_func_save); +LCDML_add(43, LCDML_0, 3, "System", NULL); +LCDML_add(44, LCDML_0_3, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(45, LCDML_0_3, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(46, LCDML_0, 4, "Info", UI_func_information); +#define _LCDML_DISP_cnt 46 +#define MENU_ID_OF_INSTANCE_2 40 #endif diff --git a/UI_1_FX.h b/UI_1_FX.h index 08aafa3..56e8d54 100644 --- a/UI_1_FX.h +++ b/UI_1_FX.h @@ -47,47 +47,51 @@ LCDML_add(18, LCDML_0_1_14, 2, "PB Step", UI_func_pb_step); LCDML_add(19, LCDML_0_1, 15, "Mod Wheel", NULL); LCDML_add(20, LCDML_0_1_15, 1, "MW Range", UI_func_mw_range); LCDML_add(21, LCDML_0_1_15, 2, "MW Assign", UI_func_mw_assign); -LCDML_add(22, LCDML_0_1, 16, "Foot Ctrl", NULL); -LCDML_add(23, LCDML_0_1_16, 1, "FC Range", UI_func_fc_range); -LCDML_add(24, LCDML_0_1_16, 2, "FC Assign", UI_func_fc_assign); -LCDML_add(25, LCDML_0_1, 17, "Breath Ctrl", NULL); -LCDML_add(26, LCDML_0_1_17, 1, "BC Range", UI_func_bc_range); -LCDML_add(27, LCDML_0_1_17, 2, "BC Assign", UI_func_bc_assign); -LCDML_add(28, LCDML_0_1, 18, "Aftertouch", NULL); -LCDML_add(29, LCDML_0_1_18, 1, "AT Range", UI_func_at_range); -LCDML_add(30, LCDML_0_1_18, 2, "AT Assign", UI_func_at_assign); -LCDML_add(31, LCDML_0_1, 19, "Portamento", NULL); -LCDML_add(32, LCDML_0_1_19, 1, "Port. Mode", UI_func_portamento_mode); -LCDML_add(33, LCDML_0_1_19, 2, "Port. Gliss", UI_func_portamento_glissando); -LCDML_add(34, LCDML_0_1_19, 3, "Port. Time", UI_func_portamento_time); -LCDML_add(35, LCDML_0_1, 20, "Operator", NULL); -LCDML_add(36, LCDML_0_1_20, 1, "OP1", UI_func_OP1); -LCDML_add(37, LCDML_0_1_20, 2, "OP2", UI_func_OP2); -LCDML_add(38, LCDML_0_1_20, 3, "OP3", UI_func_OP3); -LCDML_add(39, LCDML_0_1_20, 4, "OP4", UI_func_OP4); -LCDML_add(40, LCDML_0_1_20, 5, "OP5", UI_func_OP5); -LCDML_add(41, LCDML_0_1_20, 6, "OP6", UI_func_OP6); -LCDML_add(42, LCDML_0, 2, "Effect", NULL); -LCDML_add(43, LCDML_0_2, 1, "Reverb", NULL); -LCDML_add(44, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); -LCDML_add(45, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); -LCDML_add(46, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); -LCDML_add(47, LCDML_0_2, 2, "Chorus", NULL); -LCDML_add(48, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); -LCDML_add(49, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); -LCDML_add(50, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); -LCDML_add(51, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); -LCDML_add(52, LCDML_0_2, 3, "Delay", NULL); -LCDML_add(53, LCDML_0_2_3, 1, "Time", UI_func_delay_time); -LCDML_add(54, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); -LCDML_add(55, LCDML_0_2_3, 3, "Level", UI_func_delay_level); -LCDML_add(56, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(57, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(58, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(59, LCDML_0, 4, "System", NULL); -LCDML_add(60, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(61, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(62, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 62 -#define MENU_ID_OF_INSTANCE_2 42 +LCDML_add(22, LCDML_0_1_15, 3, "MW Mode", UI_func_mw_mode); +LCDML_add(23, LCDML_0_1, 16, "Foot Ctrl", NULL); +LCDML_add(24, LCDML_0_1_16, 1, "FC Range", UI_func_fc_range); +LCDML_add(25, LCDML_0_1_16, 2, "FC Assign", UI_func_fc_assign); +LCDML_add(26, LCDML_0_1_16, 3, "FC Mode", UI_func_fc_mode); +LCDML_add(27, LCDML_0_1, 17, "Breath Ctrl", NULL); +LCDML_add(28, LCDML_0_1_17, 1, "BC Range", UI_func_bc_range); +LCDML_add(29, LCDML_0_1_17, 2, "BC Assign", UI_func_bc_assign); +LCDML_add(30, LCDML_0_1_17, 3, "BC Mode", UI_func_bc_mode); +LCDML_add(31, LCDML_0_1, 18, "Aftertouch", NULL); +LCDML_add(32, LCDML_0_1_18, 1, "AT Range", UI_func_at_range); +LCDML_add(33, LCDML_0_1_18, 2, "AT Assign", UI_func_at_assign); +LCDML_add(34, LCDML_0_1_18, 3, "AT Mode", UI_func_at_mode); +LCDML_add(35, LCDML_0_1, 19, "Portamento", NULL); +LCDML_add(36, LCDML_0_1_19, 1, "Port. Mode", UI_func_portamento_mode); +LCDML_add(37, LCDML_0_1_19, 2, "Port. Gliss", UI_func_portamento_glissando); +LCDML_add(38, LCDML_0_1_19, 3, "Port. Time", UI_func_portamento_time); +LCDML_add(39, LCDML_0_1, 20, "Operator", NULL); +LCDML_add(40, LCDML_0_1_20, 1, "OP1", UI_func_OP1); +LCDML_add(41, LCDML_0_1_20, 2, "OP2", UI_func_OP2); +LCDML_add(42, LCDML_0_1_20, 3, "OP3", UI_func_OP3); +LCDML_add(43, LCDML_0_1_20, 4, "OP4", UI_func_OP4); +LCDML_add(44, LCDML_0_1_20, 5, "OP5", UI_func_OP5); +LCDML_add(45, LCDML_0_1_20, 6, "OP6", UI_func_OP6); +LCDML_add(46, LCDML_0, 2, "Effect", NULL); +LCDML_add(47, LCDML_0_2, 1, "Reverb", NULL); +LCDML_add(48, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); +LCDML_add(49, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); +LCDML_add(50, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); +LCDML_add(51, LCDML_0_2, 2, "Chorus", NULL); +LCDML_add(52, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); +LCDML_add(53, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); +LCDML_add(54, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); +LCDML_add(55, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); +LCDML_add(56, LCDML_0_2, 3, "Delay", NULL); +LCDML_add(57, LCDML_0_2_3, 1, "Time", UI_func_delay_time); +LCDML_add(58, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); +LCDML_add(59, LCDML_0_2_3, 3, "Level", UI_func_delay_level); +LCDML_add(60, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(61, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(62, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(63, LCDML_0, 4, "System", NULL); +LCDML_add(64, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(65, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(66, LCDML_0, 5, "Info", UI_func_information); +#define _LCDML_DISP_cnt 66 +#define MENU_ID_OF_INSTANCE_2 46 #endif diff --git a/UI_2.h b/UI_2.h index 87633b0..d27cd61 100644 --- a/UI_2.h +++ b/UI_2.h @@ -42,70 +42,78 @@ LCDML_add(13, LCDML_0_1_1_14, 2, "PB Step 1", UI_func_pb_step); LCDML_add(14, LCDML_0_1_1, 15, "Mod Wheel 1", NULL); LCDML_add(15, LCDML_0_1_1_15, 1, "MW Range 1", UI_func_mw_range); LCDML_add(16, LCDML_0_1_1_15, 2, "MW Assign 1", UI_func_mw_assign); -LCDML_add(17, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); -LCDML_add(18, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); -LCDML_add(19, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); -LCDML_add(20, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); -LCDML_add(21, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); -LCDML_add(22, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); -LCDML_add(23, LCDML_0_1_1, 18, "Aftertouch 1", NULL); -LCDML_add(24, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); -LCDML_add(25, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); -LCDML_add(26, LCDML_0_1_1, 19, "Portamento 1", NULL); -LCDML_add(27, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); -LCDML_add(28, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); -LCDML_add(29, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); -LCDML_add(30, LCDML_0_1_1, 20, "Operator 1", NULL); -LCDML_add(31, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); -LCDML_add(32, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); -LCDML_add(33, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); -LCDML_add(34, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); -LCDML_add(35, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); -LCDML_add(36, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); -LCDML_add(37, LCDML_0_1, 2, "Instance 2", NULL); -LCDML_add(38, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); -LCDML_add(39, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); -LCDML_add(40, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); -LCDML_add(41, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); -LCDML_add(42, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); -LCDML_add(43, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); -LCDML_add(44, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); -LCDML_add(45, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); -LCDML_add(46, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); -LCDML_add(47, LCDML_0_1_2, 14, "Pitchbend 2", NULL); -LCDML_add(48, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); -LCDML_add(49, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); -LCDML_add(50, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); -LCDML_add(51, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); -LCDML_add(52, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); -LCDML_add(53, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); -LCDML_add(54, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); -LCDML_add(55, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); -LCDML_add(56, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); -LCDML_add(57, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); -LCDML_add(58, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); -LCDML_add(59, LCDML_0_1_2, 18, "Aftertouch 2", NULL); -LCDML_add(60, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); -LCDML_add(61, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); -LCDML_add(62, LCDML_0_1_2, 19, "Portamento 2", NULL); -LCDML_add(63, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); -LCDML_add(64, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); -LCDML_add(65, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); -LCDML_add(66, LCDML_0_1_2, 20, "Operator 2", NULL); -LCDML_add(67, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); -LCDML_add(68, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); -LCDML_add(69, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); -LCDML_add(70, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); -LCDML_add(71, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); -LCDML_add(72, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); -LCDML_add(73, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(74, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(75, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(76, LCDML_0, 4, "System", NULL); -LCDML_add(77, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(78, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(79, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 79 -#define MENU_ID_OF_INSTANCE_2 37 +LCDML_add(17, LCDML_0_1_1_15, 3, "MW Mode 1", UI_func_mw_mode); +LCDML_add(18, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); +LCDML_add(19, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); +LCDML_add(20, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); +LCDML_add(21, LCDML_0_1_1_16, 3, "FC Mode 1", UI_func_fc_mode); +LCDML_add(22, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); +LCDML_add(23, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); +LCDML_add(24, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); +LCDML_add(25, LCDML_0_1_1_17, 3, "BC Mode 1", UI_func_bc_mode); +LCDML_add(26, LCDML_0_1_1, 18, "Aftertouch 1", NULL); +LCDML_add(27, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); +LCDML_add(28, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); +LCDML_add(29, LCDML_0_1_1_18, 3, "AT Mode 1", UI_func_at_mode); +LCDML_add(30, LCDML_0_1_1, 19, "Portamento 1", NULL); +LCDML_add(31, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); +LCDML_add(32, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); +LCDML_add(33, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); +LCDML_add(34, LCDML_0_1_1, 20, "Operator 1", NULL); +LCDML_add(35, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); +LCDML_add(36, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); +LCDML_add(37, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); +LCDML_add(38, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); +LCDML_add(39, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); +LCDML_add(40, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); +LCDML_add(41, LCDML_0_1, 2, "Instance 2", NULL); +LCDML_add(42, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); +LCDML_add(43, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); +LCDML_add(44, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); +LCDML_add(45, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); +LCDML_add(46, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); +LCDML_add(47, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); +LCDML_add(48, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); +LCDML_add(49, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); +LCDML_add(50, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); +LCDML_add(51, LCDML_0_1_2, 14, "Pitchbend 2", NULL); +LCDML_add(52, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); +LCDML_add(53, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); +LCDML_add(54, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); +LCDML_add(55, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); +LCDML_add(56, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); +LCDML_add(57, LCDML_0_1_2_15, 3, "MW Mode 2", UI_func_mw_mode); +LCDML_add(58, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); +LCDML_add(59, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); +LCDML_add(60, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); +LCDML_add(61, LCDML_0_1_2_15, 3, "MW Mode 2", UI_func_fc_mode); +LCDML_add(62, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); +LCDML_add(63, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); +LCDML_add(64, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); +LCDML_add(65, LCDML_0_1_2_15, 3, "MW Mode 2", UI_func_bc_mode); +LCDML_add(66, LCDML_0_1_2, 18, "Aftertouch 2", NULL); +LCDML_add(67, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); +LCDML_add(68, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); +LCDML_add(69, LCDML_0_1_2_15, 3, "MW Mode 2", UI_func_at_mode); +LCDML_add(70, LCDML_0_1_2, 19, "Portamento 2", NULL); +LCDML_add(71, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); +LCDML_add(72, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); +LCDML_add(73, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); +LCDML_add(74, LCDML_0_1_2, 20, "Operator 2", NULL); +LCDML_add(75, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); +LCDML_add(76, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); +LCDML_add(77, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); +LCDML_add(78, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); +LCDML_add(79, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); +LCDML_add(80, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); +LCDML_add(81, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(82, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(83, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(84, LCDML_0, 4, "System", NULL); +LCDML_add(85, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(86, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(87, LCDML_0, 5, "Info", UI_func_information); +#define _LCDML_DISP_cnt 87 +#define MENU_ID_OF_INSTANCE_2 41 #endif diff --git a/UI_2_FX.h b/UI_2_FX.h index 5a23303..ba2bf98 100644 --- a/UI_2_FX.h +++ b/UI_2_FX.h @@ -48,90 +48,98 @@ LCDML_add(19, LCDML_0_1_1_14, 2, "PB Step 1", UI_func_pb_step); LCDML_add(20, LCDML_0_1_1, 15, "Mod Wheel 1", NULL); LCDML_add(21, LCDML_0_1_1_15, 1, "MW Range 1", UI_func_mw_range); LCDML_add(22, LCDML_0_1_1_15, 2, "MW Assign 1", UI_func_mw_assign); -LCDML_add(23, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); -LCDML_add(24, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); -LCDML_add(25, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); -LCDML_add(26, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); -LCDML_add(27, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); -LCDML_add(28, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); -LCDML_add(29, LCDML_0_1_1, 18, "Aftertouch 1", NULL); -LCDML_add(30, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); -LCDML_add(31, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); -LCDML_add(32, LCDML_0_1_1, 19, "Portamento 1", NULL); -LCDML_add(33, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); -LCDML_add(34, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); -LCDML_add(35, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); -LCDML_add(36, LCDML_0_1_1, 20, "Operator 1", NULL); -LCDML_add(37, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); -LCDML_add(38, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); -LCDML_add(39, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); -LCDML_add(40, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); -LCDML_add(41, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); -LCDML_add(42, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); -LCDML_add(43, LCDML_0_1, 2, "Instance 2", NULL); -LCDML_add(44, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); -LCDML_add(45, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); -LCDML_add(46, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); -LCDML_add(47, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); -LCDML_add(48, LCDML_0_1_2, 5, "Reverb Send 2", UI_func_reverb_send); -LCDML_add(49, LCDML_0_1_2, 6, "Chorus Send 2", UI_func_chorus_send); -LCDML_add(50, LCDML_0_1_2, 7, "Delay Send 2", UI_func_delay_send); -LCDML_add(51, LCDML_0_1_2, 8, "Filter 1", NULL); -LCDML_add(52, LCDML_0_1_2_8, 1, "Cutoff 1", UI_func_filter_cutoff); -LCDML_add(53, LCDML_0_1_2_8, 2, "Resonance 1", UI_func_filter_resonance); -LCDML_add(54, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); -LCDML_add(55, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); -LCDML_add(56, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); -LCDML_add(57, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); -LCDML_add(58, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); -LCDML_add(59, LCDML_0_1_2, 14, "Pitchbend 2", NULL); -LCDML_add(60, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); -LCDML_add(61, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); -LCDML_add(62, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); -LCDML_add(63, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); -LCDML_add(64, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); -LCDML_add(65, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); -LCDML_add(66, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); -LCDML_add(67, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); -LCDML_add(68, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); -LCDML_add(69, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); -LCDML_add(70, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); -LCDML_add(71, LCDML_0_1_2, 18, "Aftertouch 2", NULL); -LCDML_add(72, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); -LCDML_add(73, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); -LCDML_add(74, LCDML_0_1_2, 19, "Portamento 2", NULL); -LCDML_add(75, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); -LCDML_add(76, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); -LCDML_add(77, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); -LCDML_add(78, LCDML_0_1_2, 20, "Operator 2", NULL); -LCDML_add(79, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); -LCDML_add(80, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); -LCDML_add(81, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); -LCDML_add(82, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); -LCDML_add(83, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); -LCDML_add(84, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); -LCDML_add(85, LCDML_0, 2, "Effect", NULL); -LCDML_add(86, LCDML_0_2, 1, "Reverb", NULL); -LCDML_add(87, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); -LCDML_add(88, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); -LCDML_add(89, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); -LCDML_add(90, LCDML_0_2, 2, "Chorus", NULL); -LCDML_add(91, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); -LCDML_add(92, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); -LCDML_add(93, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); -LCDML_add(94, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); -LCDML_add(95, LCDML_0_2, 3, "Delay", NULL); -LCDML_add(96, LCDML_0_2_3, 1, "Time", UI_func_delay_time); -LCDML_add(97, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); -LCDML_add(98, LCDML_0_2_3, 3, "Level", UI_func_delay_level); -LCDML_add(99, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(100, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(101, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(102, LCDML_0, 4, "System", NULL); -LCDML_add(103, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(104, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(105, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 105 -#define MENU_ID_OF_INSTANCE_2 43 +LCDML_add(23, LCDML_0_1_1_15, 3, "MW Mode 1", UI_func_mw_mode); +LCDML_add(24, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); +LCDML_add(25, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); +LCDML_add(26, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); +LCDML_add(27, LCDML_0_1_1_16, 3, "FC Mode 1", UI_func_fc_mode); +LCDML_add(28, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); +LCDML_add(29, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); +LCDML_add(30, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); +LCDML_add(31, LCDML_0_1_1_17, 3, "BC Mode 1", UI_func_bc_mode); +LCDML_add(32, LCDML_0_1_1, 18, "Aftertouch 1", NULL); +LCDML_add(33, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); +LCDML_add(34, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); +LCDML_add(35, LCDML_0_1_1_18, 3, "AT Mode 1", UI_func_at_mode); +LCDML_add(36, LCDML_0_1_1, 19, "Portamento 1", NULL); +LCDML_add(37, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); +LCDML_add(38, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); +LCDML_add(39, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); +LCDML_add(40, LCDML_0_1_1, 20, "Operator 1", NULL); +LCDML_add(41, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); +LCDML_add(42, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); +LCDML_add(43, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); +LCDML_add(44, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); +LCDML_add(45, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); +LCDML_add(46, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); +LCDML_add(47, LCDML_0_1, 2, "Instance 2", NULL); +LCDML_add(48, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); +LCDML_add(49, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); +LCDML_add(50, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); +LCDML_add(51, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); +LCDML_add(52, LCDML_0_1_2, 5, "Reverb Send 2", UI_func_reverb_send); +LCDML_add(53, LCDML_0_1_2, 6, "Chorus Send 2", UI_func_chorus_send); +LCDML_add(54, LCDML_0_1_2, 7, "Delay Send 2", UI_func_delay_send); +LCDML_add(55, LCDML_0_1_2, 8, "Filter 1", NULL); +LCDML_add(56, LCDML_0_1_2_8, 1, "Cutoff 1", UI_func_filter_cutoff); +LCDML_add(57, LCDML_0_1_2_8, 2, "Resonance 1", UI_func_filter_resonance); +LCDML_add(58, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); +LCDML_add(59, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); +LCDML_add(60, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); +LCDML_add(61, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); +LCDML_add(62, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); +LCDML_add(63, LCDML_0_1_2, 14, "Pitchbend 2", NULL); +LCDML_add(64, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); +LCDML_add(65, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); +LCDML_add(66, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); +LCDML_add(67, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); +LCDML_add(68, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); +LCDML_add(69, LCDML_0_1_2_15, 3, "MW Mode 2", UI_func_mw_mode); +LCDML_add(70, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); +LCDML_add(72, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); +LCDML_add(73, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); +LCDML_add(74, LCDML_0_1_2_16, 3, "FC Mode 2", UI_func_fc_mode); +LCDML_add(75, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); +LCDML_add(76, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); +LCDML_add(77, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); +LCDML_add(78, LCDML_0_1_2_17, 3, "BC Mode 2", UI_func_bc_mode); +LCDML_add(79, LCDML_0_1_2, 18, "Aftertouch 2", NULL); +LCDML_add(80, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); +LCDML_add(81, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); +LCDML_add(82, LCDML_0_1_2_18, 3, "AT Mode 2", UI_func_at_mode); +LCDML_add(83, LCDML_0_1_2, 19, "Portamento 2", NULL); +LCDML_add(84, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); +LCDML_add(85, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); +LCDML_add(86, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); +LCDML_add(87, LCDML_0_1_2, 20, "Operator 2", NULL); +LCDML_add(88, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); +LCDML_add(89, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); +LCDML_add(90, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); +LCDML_add(91, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); +LCDML_add(92, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); +LCDML_add(93, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); +LCDML_add(94, LCDML_0, 2, "Effect", NULL); +LCDML_add(95, LCDML_0_2, 1, "Reverb", NULL); +LCDML_add(96, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); +LCDML_add(97, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); +LCDML_add(98, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); +LCDML_add(99, LCDML_0_2, 2, "Chorus", NULL); +LCDML_add(100, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); +LCDML_add(101, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); +LCDML_add(102, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); +LCDML_add(103, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); +LCDML_add(104, LCDML_0_2, 3, "Delay", NULL); +LCDML_add(105, LCDML_0_2_3, 1, "Time", UI_func_delay_time); +LCDML_add(106, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); +LCDML_add(107, LCDML_0_2_3, 3, "Level", UI_func_delay_level); +LCDML_add(108, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(109, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(110, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(111, LCDML_0, 4, "System", NULL); +LCDML_add(112, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(113, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(114, LCDML_0, 5, "Info", UI_func_information); +#define _LCDML_DISP_cnt 114 +#define MENU_ID_OF_INSTANCE_2 47 #endif diff --git a/config.h b/config.h index 5f0e51e..4c877f9 100644 --- a/config.h +++ b/config.h @@ -416,6 +416,10 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define MW_ASSIGN_MAX 7 #define MW_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias +#define MW_MODE_MIN 0 +#define MW_MODE_MAX 1 +#define MW_MODE_DEFAULT 0 + #define FC_RANGE_MIN 0 #define FC_RANGE_MAX 99 #define FC_RANGE_DEFAULT 50 @@ -424,6 +428,10 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define FC_ASSIGN_MAX 7 #define FC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias +#define FC_MODE_MIN 0 +#define FC_MODE_MAX 1 +#define FC_MODE_DEFAULT 0 + #define BC_RANGE_MIN 0 #define BC_RANGE_MAX 99 #define BC_RANGE_DEFAULT 50 @@ -432,6 +440,10 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define BC_ASSIGN_MAX 7 #define BC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias +#define BC_MODE_MIN 0 +#define BC_MODE_MAX 1 +#define BC_MODE_DEFAULT 0 + #define AT_RANGE_MIN 0 #define AT_RANGE_MAX 99 #define AT_RANGE_DEFAULT 50 @@ -440,6 +452,10 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define AT_ASSIGN_MAX 7 #define AT_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias +#define AT_MODE_MIN 0 +#define AT_MODE_MAX 1 +#define AT_MODE_DEFAULT 0 + #define OP_ENABLED_MIN 0 #define OP_ENABLED_MAX 0x3f #define OP_ENABLED_DEFAULT OP_ENABLED_MAX @@ -500,12 +516,16 @@ typedef struct { uint8_t pb_step; uint8_t mw_range; uint8_t mw_assign; + uint8_t mw_mode; uint8_t fc_range; uint8_t fc_assign; + uint8_t fc_mode; uint8_t bc_range; uint8_t bc_assign; + uint8_t bc_mode; uint8_t at_range; uint8_t at_assign; + uint8_t at_mode; uint8_t portamento_mode; uint8_t portamento_glissando; uint8_t portamento_time; diff --git a/controllers.h b/controllers.h index a20c930..cd7ffc3 100644 --- a/controllers.h +++ b/controllers.h @@ -30,35 +30,60 @@ const int kControllerPitchStep = 2; class FmCore; -struct FmMod { - uint8_t range; - bool pitch; - bool amp; - bool eg; - - FmMod() { - range = 0; - pitch = false; - amp = false; - eg = false; - } - - void setRange(uint8_t r) { - range = r < 0 && r > 99 ? 0 : r; - } - - void setTarget(uint8_t assign) { - assign = assign < 0 && assign > 7 ? 0 : assign; - pitch = assign & 1; // PITCH - amp = assign & 2; // AMP - eg = assign & 4; // EG - } +class FmMod { + public: + uint8_t range; + bool pitch; + bool amp; + bool eg; + uint8_t ctrl_mode; + uint8_t _dummy_; + + FmMod() + { + range = 0; + ctrl_mode = 0; + pitch = false; + amp = false; + eg = false; + } + + void setRange(uint8_t r) + { + range = r < 0 && r > 99 ? 0 : r; + } + + void setTarget(uint8_t assign) + { + assign = assign < 0 && assign > 7 ? 0 : assign; + pitch = assign & 1; // PITCH + amp = assign & 2; // AMP + eg = assign & 4; // EG + } + + void setMode(uint8_t m) + { + ctrl_mode = m > 1 ? 0 : m; + } }; class Controllers { - void applyMod(int cc, FmMod &mod) { - float range = 0.01 * mod.range; - uint8_t total = (float)cc * range; + void applyMod(int cc, FmMod &mod) + { + float range; + uint8_t total; + range = 0.01 * mod.range; + + switch (mod.ctrl_mode) + { + case 0: + total = (float)cc * range; // NORMAL mode + break; + case 1: + total = (float)(127 - cc) * range; // REVERSE mode + break; + } + if (mod.amp) amp_mod = max(amp_mod, total); diff --git a/dexed.cpp b/dexed.cpp index e764b4b..3078c72 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -628,7 +628,7 @@ void Dexed::setPBController(uint8_t pb_range, uint8_t pb_step) controllers.refresh(); } -void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign) +void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign, uint8_t mw_mode) { #ifdef DEBUG Serial.println(F("Dexed::setMWController")); @@ -636,21 +636,25 @@ void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign) mw_range = constrain(mw_range, MW_RANGE_MIN, MW_RANGE_MAX); mw_assign = constrain(mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); + mw_mode = constrain(mw_mode, MW_MODE_MIN, MW_MODE_MAX); #ifdef DEBUG Serial.print(F("mw_range=")); Serial.println(mw_range, DEC); Serial.print(F("mw_assign=")); Serial.println(mw_assign, DEC); + Serial.print(F("mw_mode=")); + Serial.println(mw_mode, DEC); #endif controllers.wheel.setRange(mw_range); controllers.wheel.setTarget(mw_assign); + controllers.wheel.setMode(mw_mode); controllers.refresh(); } -void Dexed::setFCController(uint8_t fc_range, uint8_t fc_assign) +void Dexed::setFCController(uint8_t fc_range, uint8_t fc_assign, uint8_t fc_mode) { #ifdef DEBUG Serial.println(F("Dexed::setFCController")); @@ -658,21 +662,25 @@ void Dexed::setFCController(uint8_t fc_range, uint8_t fc_assign) fc_range = constrain(fc_range, FC_RANGE_MIN, FC_RANGE_MAX); fc_assign = constrain(fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); + fc_mode = constrain(fc_mode, FC_MODE_MIN, FC_MODE_MAX); #ifdef DEBUG Serial.print(F("fc_range=")); Serial.println(fc_range, DEC); Serial.print(F("fc_assign=")); Serial.println(fc_assign, DEC); + Serial.print(F("fc_mode=")); + Serial.println(fc_mode, DEC); #endif controllers.foot.setRange(fc_range); controllers.foot.setTarget(fc_assign); + controllers.foot.setMode(fc_mode); controllers.refresh(); } -void Dexed::setBCController(uint8_t bc_range, uint8_t bc_assign) +void Dexed::setBCController(uint8_t bc_range, uint8_t bc_assign, uint8_t bc_mode) { #ifdef DEBUG Serial.println(F("Dexed::setBCController")); @@ -680,21 +688,25 @@ void Dexed::setBCController(uint8_t bc_range, uint8_t bc_assign) bc_range = constrain(bc_range, BC_RANGE_MIN, BC_RANGE_MAX); bc_assign = constrain(bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); + bc_mode = constrain(bc_mode, BC_MODE_MIN, BC_MODE_MAX); #ifdef DEBUG Serial.print(F("bc_range=")); Serial.println(bc_range, DEC); Serial.print(F("bc_assign=")); Serial.println(bc_assign, DEC); + Serial.print(F("bc_mode=")); + Serial.println(bc_mode, DEC); #endif controllers.breath.setRange(bc_range); controllers.breath.setTarget(bc_assign); + controllers.breath.setMode(bc_mode); controllers.refresh(); } -void Dexed::setATController(uint8_t at_range, uint8_t at_assign) +void Dexed::setATController(uint8_t at_range, uint8_t at_assign, uint8_t at_mode) { #ifdef DEBUG Serial.println(F("Dexed::setATController")); @@ -702,16 +714,20 @@ void Dexed::setATController(uint8_t at_range, uint8_t at_assign) at_range = constrain(at_range, AT_RANGE_MIN, AT_RANGE_MAX); at_assign = constrain(at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); + at_mode = constrain(at_mode, AT_MODE_MIN, AT_MODE_MAX); #ifdef DEBUG Serial.print(F("at_range=")); Serial.println(at_range, DEC); Serial.print(F("at_assign=")); Serial.println(at_assign, DEC); + Serial.print(F("at_mode=")); + Serial.println(at_mode, DEC); #endif controllers.at.setRange(at_range); controllers.at.setTarget(at_assign); + controllers.at.setMode(at_mode); controllers.refresh(); } diff --git a/dexed.h b/dexed.h index c481635..1f5a372 100644 --- a/dexed.h +++ b/dexed.h @@ -167,10 +167,10 @@ class Dexed bool getSustain(void); uint8_t getNumNotesPlaying(void); void setPBController(uint8_t pb_range, uint8_t pb_step); - void setMWController(uint8_t mw_range, uint8_t mw_assign); - void setFCController(uint8_t fc_range, uint8_t fc_assign); - void setBCController(uint8_t bc_range, uint8_t bc_assign); - void setATController(uint8_t at_range, uint8_t pb_assign); + void setMWController(uint8_t mw_range, uint8_t mw_assign, uint8_t mw_mode); + void setFCController(uint8_t fc_range, uint8_t fc_assign, uint8_t fc_mode); + void setBCController(uint8_t bc_range, uint8_t bc_assign, uint8_t bc_mode); + void setATController(uint8_t at_range, uint8_t at_assign, uint8_t at_mode); void setPortamentoMode(uint8_t portamento_mode, uint8_t portamento_glissando, uint8_t portamento_time); ProcessorVoice voices[MAX_NOTES]; diff --git a/dx7note.h b/dx7note.h index fcd5487..d89f9ef 100644 --- a/dx7note.h +++ b/dx7note.h @@ -42,8 +42,7 @@ class Dx7Note { // Note: this _adds_ to the buffer. Interesting question whether it's // worth it... - void compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, - const Controllers *ctrls); + void compute(int32_t *buf, int32_t lfo_val, int32_t lfo_delay, const Controllers *ctrls); void keyup();