|
|
|
@ -30,6 +30,7 @@ |
|
|
|
|
#include "LiquidCrystalPlus_I2C.h" |
|
|
|
|
#include "SoftenValue.hpp" |
|
|
|
|
#include "effect_modulated_delay.h" |
|
|
|
|
#include "effect_stereo_mono.h" |
|
|
|
|
#include "dexed.h" |
|
|
|
|
|
|
|
|
|
#include <LCDMenuLib2.h> |
|
|
|
@ -42,7 +43,7 @@ |
|
|
|
|
#define _LCDML_DISP_cfg_scrollbar 1 // enable a scrollbar
|
|
|
|
|
|
|
|
|
|
extern config_t configuration; |
|
|
|
|
//void set_volume(float v, float p);
|
|
|
|
|
extern void set_volume(uint8_t v, int8_t p, uint8_t m); |
|
|
|
|
extern char bank_names[MAX_BANKS][BANK_NAME_LEN]; |
|
|
|
|
extern char bank_name[BANK_NAME_LEN]; |
|
|
|
|
extern char voice_name[VOICE_NAME_LEN]; |
|
|
|
@ -65,8 +66,8 @@ extern AudioMixer4 master_mixer_r; |
|
|
|
|
extern AudioMixer4 master_mixer_l; |
|
|
|
|
extern AudioAmplifier volume_r; |
|
|
|
|
extern AudioAmplifier volume_l; |
|
|
|
|
extern AudioEffectStereoMono stereomono1; |
|
|
|
|
extern Dexed* MicroDexed[NUM_DEXED]; |
|
|
|
|
extern void set_volume(uint8_t v, int8_t p); |
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
GLOBAL |
|
|
|
@ -642,7 +643,7 @@ void UI_func_sound(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -675,6 +676,7 @@ void UI_func_reverb_roomsize(uint8_t param) |
|
|
|
|
configuration.reverb_roomsize--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.reverb_roomsize, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -684,6 +686,7 @@ void UI_func_reverb_roomsize(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -716,6 +719,7 @@ void UI_func_reverb_damping(uint8_t param) |
|
|
|
|
configuration.reverb_damping--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.reverb_damping, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -725,6 +729,7 @@ void UI_func_reverb_damping(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -758,6 +763,7 @@ void UI_func_reverb_level(uint8_t param) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.reverb_level, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -768,6 +774,7 @@ void UI_func_reverb_level(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -800,6 +807,7 @@ void UI_func_chorus_frequency(uint8_t param) |
|
|
|
|
configuration.chorus_frequency--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_float(configuration.chorus_frequency / 10.0, 2, 1, false, true, false); |
|
|
|
|
lcd.print(" Hz"); |
|
|
|
@ -810,6 +818,7 @@ void UI_func_chorus_frequency(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -842,6 +851,7 @@ void UI_func_chorus_waveform(uint8_t param) |
|
|
|
|
configuration.chorus_waveform--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
switch (configuration.chorus_waveform) |
|
|
|
|
{ |
|
|
|
@ -863,6 +873,7 @@ void UI_func_chorus_waveform(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -895,6 +906,7 @@ void UI_func_chorus_depth(uint8_t param) |
|
|
|
|
configuration.chorus_depth--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.chorus_depth, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -904,6 +916,7 @@ void UI_func_chorus_depth(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -936,10 +949,10 @@ void UI_func_chorus_level(uint8_t param) |
|
|
|
|
configuration.chorus_level--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.chorus_level, 3, true, true, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(3, configuration.chorus_level / 100.0); |
|
|
|
|
master_mixer_l.gain(3, configuration.chorus_level / 100.0); |
|
|
|
|
} |
|
|
|
@ -947,6 +960,7 @@ void UI_func_chorus_level(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -979,6 +993,7 @@ void UI_func_delay_time(uint8_t param) |
|
|
|
|
configuration.delay_time -= 10; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.delay_time * 10, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -988,6 +1003,7 @@ void UI_func_delay_time(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1020,6 +1036,7 @@ void UI_func_delay_feedback(uint8_t param) |
|
|
|
|
configuration.delay_feedback--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.delay_feedback, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -1030,6 +1047,7 @@ void UI_func_delay_feedback(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1062,6 +1080,7 @@ void UI_func_delay_level(uint8_t param) |
|
|
|
|
configuration.delay_level--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.delay_level, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -1072,6 +1091,7 @@ void UI_func_delay_level(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1104,6 +1124,7 @@ void UI_func_filter_cutoff(uint8_t param) |
|
|
|
|
configuration.filter_cutoff--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.filter_cutoff, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -1116,6 +1137,7 @@ void UI_func_filter_cutoff(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1148,6 +1170,7 @@ void UI_func_filter_resonance(uint8_t param) |
|
|
|
|
configuration.filter_resonance--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.filter_resonance, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -1160,6 +1183,7 @@ void UI_func_filter_resonance(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1207,6 +1231,7 @@ void UI_func_midi_channel(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1239,6 +1264,7 @@ void UI_func_loudness(uint8_t param) |
|
|
|
|
configuration.loudness--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.loudness, 3, true, true, false); |
|
|
|
|
|
|
|
|
@ -1251,6 +1277,7 @@ void UI_func_loudness(uint8_t param) |
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1278,20 +1305,21 @@ void UI_func_panorama(uint8_t param) |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
if (configuration.loudness > PANORAMA_MIN) |
|
|
|
|
if (configuration.pan > PANORAMA_MIN) |
|
|
|
|
{ |
|
|
|
|
configuration.pan--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.pan, 2, false, true, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
set_volume(configuration.vol, configuration.pan); |
|
|
|
|
set_volume(configuration.vol, configuration.pan, configuration.mono); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1329,33 +1357,132 @@ void UI_func_stereo_mono(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
lcd.print(F("[MONO ]")); |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
lcd.print(F("[STEREO]")); |
|
|
|
|
stereomono1.stereo(true); |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
lcd.print(F("[MONO-R]")); |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
lcd.print(F("[MONO-L]")); |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
set_volume(configuration.vol, configuration.pan, configuration.mono); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_polyphony(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
// setup function
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Polyphony")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
if (configuration.polyphony < POLYPHONY_MAX) |
|
|
|
|
{ |
|
|
|
|
configuration.polyphony++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
if (configuration.polyphony > POLYPHONY_MIN) |
|
|
|
|
{ |
|
|
|
|
configuration.polyphony--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd_display_int(configuration.polyphony, 2, false, true, false); |
|
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < NUM_DEXED; i++) |
|
|
|
|
{ |
|
|
|
|
MicroDexed[i]->setMaxNotes(configuration.polyphony); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_engine(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
; |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
// setup function
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Engine")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
if (configuration.engine < ENGINE_MAX) |
|
|
|
|
{ |
|
|
|
|
configuration.engine++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
if (configuration.engine > ENGINE_MIN) |
|
|
|
|
{ |
|
|
|
|
configuration.engine--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
switch (configuration.engine) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
lcd.print(F("[MODERN]")); |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
lcd.print(F("[MARK 1 ]")); |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
lcd.print(F("[OPL ]")); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < NUM_DEXED; i++) |
|
|
|
|
{ |
|
|
|
|
MicroDexed[i]->setEngineType(configuration.engine); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
// you can here reset some global vars or do nothing
|
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_information(uint8_t param) |
|
|
|
@ -1452,6 +1579,7 @@ void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool |
|
|
|
|
{ |
|
|
|
|
int16_t tmp = 0; |
|
|
|
|
uint16_t p; |
|
|
|
|
bool non_zero_found=false; |
|
|
|
|
|
|
|
|
|
if (size < 1) |
|
|
|
|
return; |
|
|
|
@ -1461,6 +1589,7 @@ void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool |
|
|
|
|
|
|
|
|
|
if (sign == true) |
|
|
|
|
{ |
|
|
|
|
size++; |
|
|
|
|
if (var < 0) |
|
|
|
|
{ |
|
|
|
|
lcd.print(F("-")); |
|
|
|
@ -1480,11 +1609,19 @@ void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool |
|
|
|
|
{ |
|
|
|
|
if (zeros == true) |
|
|
|
|
lcd.print(F("0")); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (non_zero_found == true) |
|
|
|
|
lcd.print(F("0")); |
|
|
|
|
else |
|
|
|
|
lcd.print(F(" ")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
non_zero_found = true; |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
var -= (tmp * p); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|