@ -28,16 +28,16 @@
const uint8_t MAX_VARIABLES = 5 ; ///< @note Default: 5
/// Configures the number of available functions per line.
const uint8_t MAX_FUNCTIONS = 43 ; ///< @note Default: 8
const uint8_t MAX_FUNCTIONS = 41 ; ///< @note Default: 8
/// Configures the number of available lines per screen.
const uint8_t MAX_LINES = 22 ; ///< @note Default: 12
const uint8_t MAX_LINES = 20 ; ///< @note Default: 12
/// Configures the number of available screens per menu.
const uint8_t MAX_SCREENS = 2 ; ///< @note Default: 14
/// Configures the number of available menus per menus system.
const uint8_t MAX_MENUS = 46 ; ///< @note Default: 8
const uint8_t MAX_MENUS = 44 ; ///< @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 ) } ;
elapsedMillis back_to_main ;
# define NUM_MENUS 46
# define NUM_MENUS 44
# define MAIN 0
/*************************************/
@ -90,25 +90,23 @@ elapsedMillis back_to_main;
# define REV_DAMPING 26
# define REV_LEVEL 27
# define CHORUS_FREQ 28
# define CHORUS_DELAY 29
# define CHORUS_INTENSITY 30
# define CHORUS_FEEDBACK 31
# define CHORUS_WAVEFORM 32
# define CHORUS_LEVEL 33
# define BASS_LR_LEVEL 34
# define BASS_MONO_LEVEL 35
# define EQ_BASS 36
# define EQ_TREBLE 37
# define CHORUS_INTENSITY 29
# define CHORUS_WAVEFORM 30
# define CHORUS_LEVEL 31
# define BASS_LR_LEVEL 32
# define BASS_MONO_LEVEL 33
# define EQ_BASS 34
# define EQ_TREBLE 35
/*************************************/
# define LOUDNESS 38
# define MIDI_CHANNEL 39
# define MIDI_SOFT_THRU 40
# define MAX_POLY 41
# define MONO 42
# define LOUDNESS 36
# define MIDI_CHANNEL 37
# define MIDI_SOFT_THRU 38
# define MAX_POLY 39
# define MONO 40
/*************************************/
# define STORE_QUESTION 43
# define STORE_QUESTION 41
/*************************************/
# define MASTER_VOLUME 44
# define MASTER_VOLUME 42
/*************************************/
int8_t menu_position [ NUM_MENUS ] ;
@ -127,8 +125,6 @@ extern AudioEffectFreeverb freeverb_l;
extern AudioSynthWaveform modulator ;
extern AudioEffectModulatedDelay modchorus_r ;
extern AudioEffectModulatedDelay modchorus_l ;
extern AudioMixer4 modchorus_fbk_mixer_r ;
extern AudioMixer4 modchorus_fbk_mixer_l ;
extern AudioMixer4 mixer_r ;
extern AudioMixer4 mixer_l ;
extern AudioAmplifier volume_r ;
@ -457,7 +453,7 @@ LiquidMenu velocity_sense_menu(lcd);
/******************************************
EFFECTS MENU
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# define NUM_EFFECTS_MENUS 22
# define NUM_EFFECTS_MENUS 20
const char effects_text1 [ ] PROGMEM = " Pan/Trem Freq. " ;
const char effects_text2 [ ] PROGMEM = " Pan/Trem Level " ;
const char effects_text3 [ ] PROGMEM = " Overdrive " ;
@ -471,15 +467,13 @@ const char effects_text10[] PROGMEM = "Reverb Roomsize";
const char effects_text11 [ ] PROGMEM = " Reverb Damping " ;
const char effects_text12 [ ] PROGMEM = " Reverb Level " ;
const char effects_text13 [ ] PROGMEM = " Chorus Freq. " ;
const char effects_text14 [ ] PROGMEM = " Chorus Delay " ;
const char effects_text15 [ ] PROGMEM = " Chorus Intens. " ;
const char effects_text16 [ ] PROGMEM = " Chorus Feedback " ;
const char effects_text17 [ ] PROGMEM = " Chorus Waveform " ;
const char effects_text18 [ ] PROGMEM = " Chorus Level " ;
const char effects_text19 [ ] PROGMEM = " Bass LR Level " ;
const char effects_text20 [ ] PROGMEM = " Bass M Level " ;
const char effects_text21 [ ] PROGMEM = " EQ Bass " ;
const char effects_text22 [ ] PROGMEM = " EQ Treble " ;
const char effects_text14 [ ] PROGMEM = " Chorus Intens. " ;
const char effects_text15 [ ] PROGMEM = " Chorus Waveform " ;
const char effects_text16 [ ] PROGMEM = " Chorus Level " ;
const char effects_text17 [ ] PROGMEM = " Bass LR Level " ;
const char effects_text18 [ ] PROGMEM = " Bass M Level " ;
const char effects_text19 [ ] PROGMEM = " EQ Bass " ;
const char effects_text20 [ ] PROGMEM = " EQ Treble " ;
LiquidLine effects_line1 ( 1 , 0 , effects_text1 ) ;
LiquidLine effects_line2 ( 1 , 1 , effects_text2 ) ;
LiquidLine effects_line3 ( 1 , 1 , effects_text3 ) ;
@ -500,8 +494,6 @@ LiquidLine effects_line17(1, 1, effects_text17);
LiquidLine effects_line18 ( 1 , 1 , effects_text18 ) ;
LiquidLine effects_line19 ( 1 , 1 , effects_text19 ) ;
LiquidLine effects_line20 ( 1 , 1 , effects_text20 ) ;
LiquidLine effects_line21 ( 1 , 1 , effects_text21 ) ;
LiquidLine effects_line22 ( 1 , 1 , effects_text22 ) ;
LiquidScreen effects_screen ;
LiquidMenu effects_menu ( lcd ) ;
@ -637,16 +629,6 @@ LiquidLine chorus_frequency_line2(1, 1, get_chorus_frequency_value_text);
LiquidScreen chorus_frequency_screen ;
LiquidMenu chorus_frequency_menu ( lcd ) ;
/******************************************
CHORUS_DELAY MENU
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# define NUM_CHORUS_DELAY_MENUS 1
const char chorus_delay_text1 [ ] PROGMEM = " Chorus Delay " ;
LiquidLine chorus_delay_line1 ( 1 , 0 , chorus_delay_text1 ) ;
LiquidLine chorus_delay_line2 ( 1 , 1 , get_chorus_delay_value_text ) ;
LiquidScreen chorus_delay_screen ;
LiquidMenu chorus_delay_menu ( lcd ) ;
/******************************************
CHORUS_INTENSITY MENU
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -657,16 +639,6 @@ LiquidLine chorus_intensity_line2(1, 1, configuration.chorus_intensity);
LiquidScreen chorus_intensity_screen ;
LiquidMenu chorus_intensity_menu ( lcd ) ;
/******************************************
CHORUS_FEEDBACK MENU
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# define NUM_CHORUS_FEEDBACK_MENUS 1
const char chorus_feedback_text1 [ ] PROGMEM = " Chorus Feedback " ;
LiquidLine chorus_feedback_line1 ( 1 , 0 , chorus_feedback_text1 ) ;
LiquidLine chorus_feedback_line2 ( 1 , 1 , configuration . chorus_feedback ) ;
LiquidScreen chorus_feedback_screen ;
LiquidMenu chorus_feedback_menu ( lcd ) ;
/******************************************
CHORUS_WAVEFORM MENU
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -1170,18 +1142,6 @@ void callback_chorus_frequency_function(void)
menu_system . update ( ) ;
}
void callback_chorus_delay_function ( void )
{
# ifdef SHOW_DEBUG
Serial . println ( F ( " callback_chorus_delay_function " ) ) ;
# endif
menu_system . change_menu ( chorus_delay_menu ) ;
menu_position [ EFFECTS ] = encoder_value [ RIGHT_ENCODER ] ;
encoder_value [ RIGHT_ENCODER ] = configuration . chorus_delay ;
enc [ RIGHT_ENCODER ] . write ( configuration . chorus_delay , ENC_CHORUS_DELAY_MIN , ENC_CHORUS_DELAY_MAX ) ;
menu_system . update ( ) ;
}
void callback_chorus_intensity_function ( void )
{
# ifdef SHOW_DEBUG
@ -1194,18 +1154,6 @@ void callback_chorus_intensity_function(void)
menu_system . update ( ) ;
}
void callback_chorus_feedback_function ( void )
{
# ifdef SHOW_DEBUG
Serial . println ( F ( " callback_chorus_feedback_function " ) ) ;
# endif
menu_system . change_menu ( chorus_feedback_menu ) ;
menu_position [ EFFECTS ] = encoder_value [ RIGHT_ENCODER ] ;
encoder_value [ RIGHT_ENCODER ] = configuration . chorus_feedback ;
enc [ RIGHT_ENCODER ] . write ( configuration . chorus_feedback , ENC_CHORUS_FEEDBACK_MIN , ENC_CHORUS_FEEDBACK_MAX ) ;
menu_system . update ( ) ;
}
void callback_chorus_waveform_function ( void )
{
# ifdef SHOW_DEBUG
@ -1615,8 +1563,6 @@ void init_menus(void)
effects_screen . add_line ( effects_line18 ) ;
effects_screen . add_line ( effects_line19 ) ;
effects_screen . add_line ( effects_line20 ) ;
effects_screen . add_line ( effects_line21 ) ;
effects_screen . add_line ( effects_line22 ) ;
effects_screen . set_displayLineCount ( 2 ) ;
effects_menu . add_screen ( effects_screen ) ;
@ -1633,15 +1579,13 @@ void init_menus(void)
effects_line11 . attach_function ( REV_DAMPING , callback_reverb_damping_function ) ;
effects_line12 . attach_function ( REV_LEVEL , callback_reverb_level_function ) ;
effects_line13 . attach_function ( CHORUS_FREQ , callback_chorus_frequency_function ) ;
effects_line14 . attach_function ( CHORUS_DELAY , callback_chorus_delay_function ) ;
effects_line15 . attach_function ( CHORUS_INTENSITY , callback_chorus_intensity_function ) ;
effects_line16 . attach_function ( CHORUS_FEEDBACK , callback_chorus_feedback_function ) ;
effects_line17 . attach_function ( CHORUS_WAVEFORM , callback_chorus_waveform_function ) ;
effects_line18 . attach_function ( CHORUS_LEVEL , callback_chorus_level_function ) ;
effects_line19 . attach_function ( BASS_LR_LEVEL , callback_bass_lr_level_function ) ;
effects_line20 . attach_function ( BASS_MONO_LEVEL , callback_bass_mono_level_function ) ;
effects_line21 . attach_function ( EQ_BASS , callback_eq_bass_function ) ;
effects_line22 . attach_function ( EQ_TREBLE , callback_eq_treble_function ) ;
effects_line14 . attach_function ( CHORUS_INTENSITY , callback_chorus_intensity_function ) ;
effects_line15 . attach_function ( CHORUS_WAVEFORM , callback_chorus_waveform_function ) ;
effects_line16 . attach_function ( CHORUS_LEVEL , callback_chorus_level_function ) ;
effects_line17 . attach_function ( BASS_LR_LEVEL , callback_bass_lr_level_function ) ;
effects_line18 . attach_function ( BASS_MONO_LEVEL , callback_bass_mono_level_function ) ;
effects_line19 . attach_function ( EQ_BASS , callback_eq_bass_function ) ;
effects_line20 . attach_function ( EQ_TREBLE , callback_eq_treble_function ) ;
// setup pan_trem_frequency menu
pan_trem_frequency_screen . add_line ( pan_trem_frequency_line1 ) ;
@ -1721,24 +1665,12 @@ void init_menus(void)
chorus_frequency_screen . set_displayLineCount ( 2 ) ;
chorus_frequency_menu . add_screen ( chorus_frequency_screen ) ;
// setup chorus_delay menu
chorus_delay_screen . add_line ( chorus_delay_line1 ) ;
chorus_delay_screen . add_line ( chorus_delay_line2 ) ;
chorus_delay_screen . set_displayLineCount ( 2 ) ;
chorus_delay_menu . add_screen ( chorus_delay_screen ) ;
// setup chorus_intensity menu
chorus_intensity_screen . add_line ( chorus_intensity_line1 ) ;
chorus_intensity_screen . add_line ( chorus_intensity_line2 ) ;
chorus_intensity_screen . set_displayLineCount ( 2 ) ;
chorus_intensity_menu . add_screen ( chorus_intensity_screen ) ;
// setup chorus_feedback menu
chorus_feedback_screen . add_line ( chorus_feedback_line1 ) ;
chorus_feedback_screen . add_line ( chorus_feedback_line2 ) ;
chorus_feedback_screen . set_displayLineCount ( 2 ) ;
chorus_feedback_menu . add_screen ( chorus_feedback_screen ) ;
// setup chorus_waveform menu
chorus_waveform_screen . add_line ( chorus_waveform_line1 ) ;
chorus_waveform_screen . add_line ( chorus_waveform_line2 ) ;
@ -1874,9 +1806,7 @@ void init_menus(void)
menu_system . add_menu ( reverb_damping_menu ) ;
menu_system . add_menu ( reverb_level_menu ) ;
menu_system . add_menu ( chorus_frequency_menu ) ;
menu_system . add_menu ( chorus_delay_menu ) ;
menu_system . add_menu ( chorus_intensity_menu ) ;
menu_system . add_menu ( chorus_feedback_menu ) ;
menu_system . add_menu ( chorus_waveform_menu ) ;
menu_system . add_menu ( chorus_level_menu ) ;
menu_system . add_menu ( bass_lr_level_menu ) ;
@ -2222,27 +2152,6 @@ void set_chorus_frequency(uint8_t value)
configuration . chorus_frequency = value ;
}
void set_chorus_delay ( uint8_t value )
{
if ( value > ENC_CHORUS_DELAY_MAX )
value = ENC_CHORUS_DELAY_MAX ;
else if ( value < ENC_CHORUS_DELAY_MIN )
value = ENC_CHORUS_DELAY_MIN ;
# ifdef SHOW_DEBUG
Serial . print ( F ( " Set CHORUS_DELAY " ) ) ;
Serial . print ( value ) ;
Serial . print ( F ( " ( " ) ) ;
Serial . print ( float ( value ) / 10 ) ;
Serial . print ( F ( " ms / " ) ) ;
Serial . print ( uint16_t ( TIME_MS2SAMPLES ( float ( value ) / 10 ) ) ) ;
Serial . print ( F ( " samples) " ) ) ;
Serial . println ( ) ;
# endif
modchorus_r . offset ( TIME_MS2SAMPLES ( float ( value ) / 10 ) ) ;
modchorus_l . offset ( TIME_MS2SAMPLES ( float ( value ) / 10 ) ) ;
configuration . chorus_delay = value ;
}
void set_chorus_intensity ( uint8_t value )
{
if ( value > ENC_CHORUS_INTENSITY_MAX )
@ -2255,22 +2164,6 @@ void set_chorus_intensity(uint8_t value)
configuration . chorus_intensity = value ;
}
void set_chorus_feedback ( uint8_t value )
{
if ( value > ENC_CHORUS_FEEDBACK_MAX )
value = ENC_CHORUS_FEEDBACK_MAX ;
# ifdef SHOW_DEBUG
Serial . print ( F ( " Set CHORUS_FEEDBACK " ) ) ;
Serial . println ( value ) ;
# endif
float tmp = mapfloat ( float ( value ) , ENC_CHORUS_FEEDBACK_MIN , ENC_CHORUS_FEEDBACK_MAX , 0.0 , 0.5 ) ;
modchorus_fbk_mixer_r . gain ( 0 , 1.0 - tmp ) ;
modchorus_fbk_mixer_l . gain ( 0 , 1.0 - tmp ) ;
modchorus_fbk_mixer_r . gain ( 1 , tmp ) ;
modchorus_fbk_mixer_l . gain ( 1 , tmp ) ;
configuration . chorus_feedback = value ;
}
void set_chorus_waveform ( uint8_t value )
{
# ifdef SHOW_DEBUG
@ -2457,9 +2350,7 @@ void set_complete_configuration(void)
set_reverb_damping ( configuration . reverb_damping ) ;
set_reverb_level ( configuration . reverb_level ) ;
set_chorus_frequency ( configuration . chorus_frequency ) ;
set_chorus_delay ( configuration . chorus_delay ) ;
set_chorus_intensity ( configuration . chorus_intensity ) ;
set_chorus_feedback ( configuration . chorus_feedback ) ;
set_chorus_waveform ( configuration . chorus_waveform ) ;
set_chorus_level ( configuration . chorus_level ) ;
set_bass_lr_level ( configuration . bass_lr_level ) ;
@ -2706,15 +2597,6 @@ void handle_ui(void)
menu_system . update ( ) ;
}
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_delay_screen )
{
if ( encoder_tmp ! = encoder_value [ RIGHT_ENCODER ] )
{
// value up/down
set_chorus_delay ( encoder_tmp ) ;
menu_system . update ( ) ;
}
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_intensity_screen )
{
if ( encoder_tmp ! = encoder_value [ RIGHT_ENCODER ] )
@ -2724,15 +2606,6 @@ void handle_ui(void)
menu_system . update ( ) ;
}
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_feedback_screen )
{
if ( encoder_tmp ! = encoder_value [ RIGHT_ENCODER ] )
{
// value up/down
set_chorus_feedback ( encoder_tmp ) ;
menu_system . update ( ) ;
}
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_waveform_screen )
{
if ( encoder_tmp ! = encoder_value [ RIGHT_ENCODER ] )
@ -3172,13 +3045,6 @@ void handle_ui(void)
# endif
goto_effects_menu ( CHORUS_FREQ ) ;
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_delay_screen ) // chorus_delay menu
{
# ifdef SHOW_DEBUG
Serial . println ( F ( " from chorus_delay to effects " ) ) ;
# endif
goto_effects_menu ( CHORUS_DELAY ) ;
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_intensity_screen ) // chorus_intensity menu
{
# ifdef SHOW_DEBUG
@ -3186,13 +3052,6 @@ void handle_ui(void)
# endif
goto_effects_menu ( CHORUS_INTENSITY ) ;
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_feedback_screen ) // chorus_feedback menu
{
# ifdef SHOW_DEBUG
Serial . println ( F ( " from chorus_feedback to effects " ) ) ;
# endif
goto_effects_menu ( CHORUS_FEEDBACK ) ;
}
else if ( menu_system . get_currentScreen ( ) = = & chorus_waveform_screen ) // chorus_waveform menu
{
# ifdef SHOW_DEBUG