|
|
@ -28,16 +28,16 @@ |
|
|
|
const uint8_t MAX_VARIABLES = 5; ///< @note Default: 5
|
|
|
|
const uint8_t MAX_VARIABLES = 5; ///< @note Default: 5
|
|
|
|
|
|
|
|
|
|
|
|
/// Configures the number of available functions per line.
|
|
|
|
/// Configures the number of available functions per line.
|
|
|
|
const uint8_t MAX_FUNCTIONS = 42; ///< @note Default: 8
|
|
|
|
const uint8_t MAX_FUNCTIONS = 43; ///< @note Default: 8
|
|
|
|
|
|
|
|
|
|
|
|
/// Configures the number of available lines per screen.
|
|
|
|
/// Configures the number of available lines per screen.
|
|
|
|
const uint8_t MAX_LINES = 20; ///< @note Default: 12
|
|
|
|
const uint8_t MAX_LINES = 22; ///< @note Default: 12
|
|
|
|
|
|
|
|
|
|
|
|
/// Configures the number of available screens per menu.
|
|
|
|
/// Configures the number of available screens per menu.
|
|
|
|
const uint8_t MAX_SCREENS = 2; ///< @note Default: 14
|
|
|
|
const uint8_t MAX_SCREENS = 2; ///< @note Default: 14
|
|
|
|
|
|
|
|
|
|
|
|
/// Configures the number of available menus per menus system.
|
|
|
|
/// Configures the number of available menus per menus system.
|
|
|
|
const uint8_t MAX_MENUS = 45; ///< @note Default: 8
|
|
|
|
const uint8_t MAX_MENUS = 46; ///< @note Default: 8
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ int32_t encoder_value[NUM_ENCODER]; |
|
|
|
Bounce but[NUM_ENCODER] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)}; |
|
|
|
Bounce but[NUM_ENCODER] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)}; |
|
|
|
elapsedMillis back_to_main; |
|
|
|
elapsedMillis back_to_main; |
|
|
|
|
|
|
|
|
|
|
|
#define NUM_MENUS 45 |
|
|
|
#define NUM_MENUS 46 |
|
|
|
|
|
|
|
|
|
|
|
#define MAIN 0 |
|
|
|
#define MAIN 0 |
|
|
|
/*************************************/ |
|
|
|
/*************************************/ |
|
|
@ -104,10 +104,11 @@ elapsedMillis back_to_main; |
|
|
|
#define MIDI_CHANNEL 39 |
|
|
|
#define MIDI_CHANNEL 39 |
|
|
|
#define MIDI_SOFT_THRU 40 |
|
|
|
#define MIDI_SOFT_THRU 40 |
|
|
|
#define MAX_POLY 41 |
|
|
|
#define MAX_POLY 41 |
|
|
|
|
|
|
|
#define MONO 42 |
|
|
|
/*************************************/ |
|
|
|
/*************************************/ |
|
|
|
#define STORE_QUESTION 42 |
|
|
|
#define STORE_QUESTION 43 |
|
|
|
/*************************************/ |
|
|
|
/*************************************/ |
|
|
|
#define MASTER_VOLUME 43 |
|
|
|
#define MASTER_VOLUME 44 |
|
|
|
/*************************************/ |
|
|
|
/*************************************/ |
|
|
|
|
|
|
|
|
|
|
|
int8_t menu_position[NUM_MENUS]; |
|
|
|
int8_t menu_position[NUM_MENUS]; |
|
|
@ -132,6 +133,7 @@ extern AudioMixer4 mixer_r; |
|
|
|
extern AudioMixer4 mixer_l; |
|
|
|
extern AudioMixer4 mixer_l; |
|
|
|
extern AudioAmplifier volume_r; |
|
|
|
extern AudioAmplifier volume_r; |
|
|
|
extern AudioAmplifier volume_l; |
|
|
|
extern AudioAmplifier volume_l; |
|
|
|
|
|
|
|
extern AudioAmplifier inverter; |
|
|
|
extern mdaEPiano* ep; |
|
|
|
extern mdaEPiano* ep; |
|
|
|
extern config_t configuration; |
|
|
|
extern config_t configuration; |
|
|
|
extern uint8_t sound; |
|
|
|
extern uint8_t sound; |
|
|
@ -285,6 +287,17 @@ char* get_midi_soft_thru_value_text(void) |
|
|
|
return (midi_soft_thru_value_text1); |
|
|
|
return (midi_soft_thru_value_text1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char mono_value_text1[] = " "; |
|
|
|
|
|
|
|
char* get_mono_value_text(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (configuration.mono == 0) |
|
|
|
|
|
|
|
sprintf(mono_value_text1, "Stereo"); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
sprintf(mono_value_text1, "Mono "); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (mono_value_text1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char yes_no_value_text1[] = " "; |
|
|
|
char yes_no_value_text1[] = " "; |
|
|
|
char* get_yes_no_value_text(void) |
|
|
|
char* get_yes_no_value_text(void) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -727,15 +740,17 @@ LiquidMenu save_sound_menu(lcd); |
|
|
|
/******************************************
|
|
|
|
/******************************************
|
|
|
|
SYSTEM MENU |
|
|
|
SYSTEM MENU |
|
|
|
******************************************/ |
|
|
|
******************************************/ |
|
|
|
#define NUM_SYSTEM_MENUS 4 |
|
|
|
#define NUM_SYSTEM_MENUS 5 |
|
|
|
const char system_text1[] PROGMEM = "Loudness"; |
|
|
|
const char system_text1[] PROGMEM = "Loudness"; |
|
|
|
const char system_text2[] PROGMEM = "MIDI Channel"; |
|
|
|
const char system_text2[] PROGMEM = "MIDI Channel"; |
|
|
|
const char system_text3[] PROGMEM = "MIDI Soft-Thru"; |
|
|
|
const char system_text3[] PROGMEM = "MIDI Soft-Thru"; |
|
|
|
const char system_text4[] PROGMEM = "Max. Polyphony"; |
|
|
|
const char system_text4[] PROGMEM = "Max. Polyphony"; |
|
|
|
|
|
|
|
const char system_text5[] PROGMEM = "Mono/Stereo"; |
|
|
|
LiquidLine system_line1(1, 0, system_text1); |
|
|
|
LiquidLine system_line1(1, 0, system_text1); |
|
|
|
LiquidLine system_line2(1, 1, system_text2); |
|
|
|
LiquidLine system_line2(1, 1, system_text2); |
|
|
|
LiquidLine system_line3(1, 1, system_text3); |
|
|
|
LiquidLine system_line3(1, 1, system_text3); |
|
|
|
LiquidLine system_line4(1, 1, system_text4); |
|
|
|
LiquidLine system_line4(1, 1, system_text4); |
|
|
|
|
|
|
|
LiquidLine system_line5(1, 1, system_text5); |
|
|
|
LiquidScreen system_screen; |
|
|
|
LiquidScreen system_screen; |
|
|
|
LiquidMenu system_menu(lcd); |
|
|
|
LiquidMenu system_menu(lcd); |
|
|
|
|
|
|
|
|
|
|
@ -779,6 +794,16 @@ LiquidLine max_poly_line2(1, 1, configuration.max_poly); |
|
|
|
LiquidScreen max_poly_screen; |
|
|
|
LiquidScreen max_poly_screen; |
|
|
|
LiquidMenu max_poly_menu(lcd); |
|
|
|
LiquidMenu max_poly_menu(lcd); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************
|
|
|
|
|
|
|
|
MONO/STEREO MENU |
|
|
|
|
|
|
|
******************************************/ |
|
|
|
|
|
|
|
#define NUM_MONO_MENUS 1 |
|
|
|
|
|
|
|
const char mono_text1[] PROGMEM = "Mono/Stereo"; |
|
|
|
|
|
|
|
LiquidLine mono_line1(1, 0, mono_text1); |
|
|
|
|
|
|
|
LiquidLine mono_line2(1, 1, get_mono_value_text); |
|
|
|
|
|
|
|
LiquidScreen mono_screen; |
|
|
|
|
|
|
|
LiquidMenu mono_menu(lcd); |
|
|
|
|
|
|
|
|
|
|
|
/******************************************
|
|
|
|
/******************************************
|
|
|
|
INFO MENU |
|
|
|
INFO MENU |
|
|
|
******************************************/ |
|
|
|
******************************************/ |
|
|
@ -1354,6 +1379,18 @@ void callback_max_poly_function(void) |
|
|
|
menu_system.update(); |
|
|
|
menu_system.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void callback_mono_function(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef SHOW_DEBUG |
|
|
|
|
|
|
|
Serial.println(F("callback_mono_function")); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
menu_system.change_menu(mono_menu); |
|
|
|
|
|
|
|
menu_position[SYSTEM] = encoder_value[RIGHT_ENCODER]; |
|
|
|
|
|
|
|
encoder_value[RIGHT_ENCODER] = configuration.mono; |
|
|
|
|
|
|
|
enc[RIGHT_ENCODER].write(configuration.mono, ENC_MONO_MIN, ENC_MONO_MAX); |
|
|
|
|
|
|
|
menu_system.update(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/******************************************
|
|
|
|
/******************************************
|
|
|
|
INFO MENU CALLBACKS |
|
|
|
INFO MENU CALLBACKS |
|
|
|
******************************************/ |
|
|
|
******************************************/ |
|
|
@ -1757,6 +1794,7 @@ void init_menus(void) |
|
|
|
system_screen.add_line(system_line2); |
|
|
|
system_screen.add_line(system_line2); |
|
|
|
system_screen.add_line(system_line3); |
|
|
|
system_screen.add_line(system_line3); |
|
|
|
system_screen.add_line(system_line4); |
|
|
|
system_screen.add_line(system_line4); |
|
|
|
|
|
|
|
system_screen.add_line(system_line5); |
|
|
|
system_screen.set_displayLineCount(2); |
|
|
|
system_screen.set_displayLineCount(2); |
|
|
|
system_menu.add_screen(system_screen); |
|
|
|
system_menu.add_screen(system_screen); |
|
|
|
|
|
|
|
|
|
|
@ -1764,6 +1802,7 @@ void init_menus(void) |
|
|
|
system_line2.attach_function(MIDI_CHANNEL, callback_midi_channel_function); |
|
|
|
system_line2.attach_function(MIDI_CHANNEL, callback_midi_channel_function); |
|
|
|
system_line3.attach_function(MIDI_SOFT_THRU, callback_midi_soft_thru_function); |
|
|
|
system_line3.attach_function(MIDI_SOFT_THRU, callback_midi_soft_thru_function); |
|
|
|
system_line4.attach_function(MAX_POLY, callback_max_poly_function); |
|
|
|
system_line4.attach_function(MAX_POLY, callback_max_poly_function); |
|
|
|
|
|
|
|
system_line5.attach_function(MONO, callback_mono_function); |
|
|
|
|
|
|
|
|
|
|
|
// setup loudness
|
|
|
|
// setup loudness
|
|
|
|
loudness_screen.add_line(loudness_line1); |
|
|
|
loudness_screen.add_line(loudness_line1); |
|
|
@ -1789,6 +1828,12 @@ void init_menus(void) |
|
|
|
max_poly_screen.set_displayLineCount(2); |
|
|
|
max_poly_screen.set_displayLineCount(2); |
|
|
|
max_poly_menu.add_screen(max_poly_screen); |
|
|
|
max_poly_menu.add_screen(max_poly_screen); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setup mono
|
|
|
|
|
|
|
|
mono_screen.add_line(mono_line1); |
|
|
|
|
|
|
|
mono_screen.add_line(mono_line2); |
|
|
|
|
|
|
|
mono_screen.set_displayLineCount(2); |
|
|
|
|
|
|
|
mono_menu.add_screen(mono_screen); |
|
|
|
|
|
|
|
|
|
|
|
// setup info menu
|
|
|
|
// setup info menu
|
|
|
|
info_screen.add_line(info_line1); |
|
|
|
info_screen.add_line(info_line1); |
|
|
|
info_screen.add_line(info_line2); |
|
|
|
info_screen.add_line(info_line2); |
|
|
@ -1845,6 +1890,7 @@ void init_menus(void) |
|
|
|
menu_system.add_menu(midi_channel_menu); |
|
|
|
menu_system.add_menu(midi_channel_menu); |
|
|
|
menu_system.add_menu(midi_soft_thru_menu); |
|
|
|
menu_system.add_menu(midi_soft_thru_menu); |
|
|
|
menu_system.add_menu(max_poly_menu); |
|
|
|
menu_system.add_menu(max_poly_menu); |
|
|
|
|
|
|
|
menu_system.add_menu(mono_menu); |
|
|
|
menu_system.add_menu(info_menu); |
|
|
|
menu_system.add_menu(info_menu); |
|
|
|
menu_system.add_menu(master_volume_menu); |
|
|
|
menu_system.add_menu(master_volume_menu); |
|
|
|
|
|
|
|
|
|
|
@ -2359,6 +2405,24 @@ void set_max_poly(uint8_t value) |
|
|
|
ep->reset_voices(); |
|
|
|
ep->reset_voices(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void set_mono(uint8_t mode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef SHOW_DEBUG |
|
|
|
|
|
|
|
Serial.print(F("Set MONO ")); |
|
|
|
|
|
|
|
Serial.println(mode); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
set_stereo(configuration.stereo); |
|
|
|
|
|
|
|
inverter.gain(-1.0); // change phase for second modulated delay (faked stereo mode)
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
set_stereo(ENC_STEREO_MIN); |
|
|
|
|
|
|
|
inverter.gain(1.0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void set_complete_configuration(void) |
|
|
|
void set_complete_configuration(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
set_decay(configuration.decay); |
|
|
|
set_decay(configuration.decay); |
|
|
@ -2395,6 +2459,7 @@ void set_complete_configuration(void) |
|
|
|
set_midi_channel(configuration.midi_channel); |
|
|
|
set_midi_channel(configuration.midi_channel); |
|
|
|
set_midi_soft_thru(configuration.midi_soft_thru); |
|
|
|
set_midi_soft_thru(configuration.midi_soft_thru); |
|
|
|
set_max_poly(configuration.max_poly); |
|
|
|
set_max_poly(configuration.max_poly); |
|
|
|
|
|
|
|
set_mono(configuration.mono); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//********************************************************************************************+
|
|
|
|
//********************************************************************************************+
|
|
|
@ -2765,6 +2830,15 @@ void handle_ui(void) |
|
|
|
menu_system.update(); |
|
|
|
menu_system.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (menu_system.get_currentScreen() == &mono_screen) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (encoder_tmp != encoder_value[RIGHT_ENCODER]) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// value up/down
|
|
|
|
|
|
|
|
set_mono(encoder_tmp); |
|
|
|
|
|
|
|
menu_system.update(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Move menu focus
|
|
|
|
// Move menu focus
|
|
|
@ -3199,6 +3273,13 @@ void handle_ui(void) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
goto_system_menu(MAX_POLY); |
|
|
|
goto_system_menu(MAX_POLY); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (menu_system.get_currentScreen() == &mono_screen) // mono menu
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef SHOW_DEBUG |
|
|
|
|
|
|
|
Serial.println(F("from mono to system")); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
goto_system_menu(MONO); |
|
|
|
|
|
|
|
} |
|
|
|
else if (menu_system.get_currentScreen() == &info_screen) // info menu
|
|
|
|
else if (menu_system.get_currentScreen() == &info_screen) // info menu
|
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef SHOW_DEBUG |
|
|
|
#ifdef SHOW_DEBUG |
|
|
|