Added block-bar for more menus.

Optimized menu handling.
pull/32/head
Holger Wirtz 5 years ago
parent 5335837f57
commit 2e6d8ace0d
  1. 288
      UI.hpp
  2. 2
      config.h

288
UI.hpp

@ -210,7 +210,7 @@ void UI_function_not_enabled(void);
void UI_function_not_implemented(uint8_t param);
void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign);
void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign);
void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init);
void lcd_display_bar_int(const char* title, uint32_t value, float factor, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init);
void lcd_special_chars(uint8_t mode);
// normal menu
@ -817,8 +817,8 @@ void UI_func_reverb_roomsize(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Reverb Roomsize"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Room", configuration.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -834,16 +834,16 @@ void UI_func_reverb_roomsize(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.reverb_roomsize = constrain(configuration.reverb_roomsize - ENCODER[ENC_R].speed(), REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX);
lcd_display_bar_int("Reverb Room", configuration.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, false, false);
freeverb_r.roomsize(mapfloat(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0));
freeverb_l.roomsize(mapfloat(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0));
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.reverb_roomsize, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -853,8 +853,8 @@ void UI_func_reverb_damping(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Reverb Damping"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Damp.", configuration.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -870,16 +870,16 @@ void UI_func_reverb_damping(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.reverb_damping = constrain(configuration.reverb_damping - ENCODER[ENC_R].speed(), REVERB_DAMPING_MIN, REVERB_DAMPING_MAX);
lcd_display_bar_int("Reverb Damp.", configuration.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false, false);
freeverb_r.damping(mapfloat(configuration.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0));
freeverb_l.damping(mapfloat(configuration.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0));
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.reverb_damping, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -894,8 +894,8 @@ void UI_func_reverb_send(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Reverb Send"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Send", configuration.dexed[instance_id].reverb_send, 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -911,16 +911,16 @@ void UI_func_reverb_send(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].reverb_send = constrain(configuration.dexed[instance_id].reverb_send - ENCODER[ENC_R].speed(), REVERB_SEND_MIN, REVERB_SEND_MAX);
lcd_display_bar_int("Reverb Send", configuration.dexed[instance_id].reverb_send, 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false, false);
reverb_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].reverb_send / 100.0);
reverb_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].reverb_send / 100.0);
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.dexed[instance_id].reverb_send, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -930,8 +930,8 @@ void UI_func_reverb_level(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Reverb Level"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Level", configuration.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -947,16 +947,16 @@ void UI_func_reverb_level(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.reverb_level = constrain(configuration.reverb_level - ENCODER[ENC_R].speed(), REVERB_LEVEL_MIN, REVERB_LEVEL_MAX);
lcd_display_bar_int("Reverb Level", configuration.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, false, true);
master_mixer_r.gain(REVERB, mapfloat(configuration.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0));
master_mixer_l.gain(REVERB, mapfloat(configuration.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0));
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.reverb_level, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -966,6 +966,8 @@ void UI_func_chorus_frequency(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
//lcd_special_chars(BLOCKBAR);
//lcd_display_bar_float("Chorus Frq.", configuration.chorus_frequency, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 3, false, false, false, true);
lcd.setCursor(0, 0);
lcd.print(F("Chorus Frequency"));
}
@ -984,15 +986,17 @@ void UI_func_chorus_frequency(uint8_t param)
configuration.chorus_frequency = constrain(configuration.chorus_frequency - ENCODER[ENC_R].speed(), CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX);
chorus_modulator.frequency(configuration.chorus_frequency / 10.0);
}
//lcd_display_bar_float("Chorus Frq.", configuration.chorus_frequency, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 3, false, false, false, true);
lcd.setCursor(0, 1);
lcd_display_float(configuration.chorus_frequency / 10.0, 2, 1, false, true, false);
lcd.print(F(" Hz"));
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
//lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1045,8 +1049,8 @@ void UI_func_chorus_depth(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Chorus Depth"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Chorus Dpt.", configuration.chorus_depth, 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1062,16 +1066,15 @@ void UI_func_chorus_depth(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.chorus_depth = constrain(configuration.chorus_depth - ENCODER[ENC_R].speed(), CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX);
lcd_display_bar_int("Chorus Dpt.", configuration.chorus_depth, 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, false, false);
chorus_modulator.amplitude(configuration.chorus_depth / 100.0);
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.chorus_depth, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1086,8 +1089,8 @@ void UI_func_chorus_send(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Chorus Send"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Chorus Send", configuration.dexed[instance_id].chorus_send, 1.0, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1103,17 +1106,16 @@ void UI_func_chorus_send(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].chorus_send = constrain(configuration.dexed[instance_id].chorus_send - ENCODER[ENC_R].speed(), CHORUS_SEND_MIN, CHORUS_SEND_MAX);
lcd_display_bar_int("Chorus Send", configuration.dexed[instance_id].chorus_send, 1.0, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 3, false, false, false, false);
chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
chorus_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.dexed[instance_id].chorus_send, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1123,8 +1125,8 @@ void UI_func_chorus_level(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Chorus Level"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Chorus Lvl.", configuration.chorus_level, 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1140,27 +1142,28 @@ void UI_func_chorus_level(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.chorus_level = constrain(configuration.chorus_level - ENCODER[ENC_R].speed(), CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX);
lcd_display_bar_int("Chorus Lvl.", configuration.chorus_level, 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, false, false);
master_mixer_r.gain(CHORUS, mapfloat(configuration.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0));
master_mixer_l.gain(CHORUS, mapfloat(configuration.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0));
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.chorus_level, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
/* HIER */
void UI_func_delay_time(uint8_t param)
{
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Delay Time"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Time", configuration.delay_time, 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1176,18 +1179,16 @@ void UI_func_delay_time(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.delay_time = constrain(configuration.delay_time - ENCODER[ENC_R].speed(), DELAY_TIME_MIN, DELAY_TIME_MAX);
lcd_display_bar_int("Delay Time", configuration.delay_time, 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, false, true);
delay_r.delay(0, configuration.delay_time * 10);
delay_l.delay(0, configuration.delay_time * 10);
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.delay_time * 10, 3, true, true, false);
lcd.print(F(" ms"));
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1197,8 +1198,8 @@ void UI_func_delay_feedback(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Delay Feedback"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Feedb.", configuration.delay_feedback, 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1214,18 +1215,17 @@ void UI_func_delay_feedback(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.delay_feedback = constrain(configuration.delay_feedback - ENCODER[ENC_R].speed(), DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX);
lcd_display_bar_int("Delay Feedb.", configuration.delay_feedback, 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, false, false);
delay_fb_mixer_r.gain(1, configuration.delay_feedback / 100.0); // amount of feedback
delay_fb_mixer_l.gain(1, configuration.delay_feedback / 100.0); // amount of feedback
//delay_fb_mixer.gain(0, 1.0 - configuration.delay_feedback / 200.0); // original signal
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.delay_feedback, 3, true, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1240,8 +1240,8 @@ void UI_func_delay_send(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Delay Send"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Send", configuration.dexed[instance_id].delay_send, 1.0, DELAY_SEND_MIN, DELAY_SEND_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1257,17 +1257,16 @@ void UI_func_delay_send(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send - ENCODER[ENC_R].speed(), DELAY_SEND_MIN, DELAY_SEND_MAX);
lcd_display_bar_int("Delay Send", configuration.dexed[instance_id].delay_send, 1.0, DELAY_SEND_MIN, DELAY_SEND_MAX, 3, false, false, false, false);
delay_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].delay_send / 100.0);
delay_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].delay_send / 100.0);
}
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.dexed[instance_id].delay_send, 3, true, true, false);
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1277,8 +1276,8 @@ void UI_func_delay_level(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Delay Level"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Lvl.", configuration.delay_level, 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1294,6 +1293,8 @@ void UI_func_delay_level(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.delay_level = constrain(configuration.delay_level - ENCODER[ENC_R].speed(), DELAY_LEVEL_MIN, DELAY_LEVEL_MAX);
lcd_display_bar_int("Delay Lvl.", configuration.delay_level, 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, false, false);
master_mixer_r.gain(DELAY, mapfloat(configuration.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0));
master_mixer_l.gain(DELAY, mapfloat(configuration.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0));
}
@ -1304,6 +1305,7 @@ void UI_func_delay_level(uint8_t param)
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1318,8 +1320,8 @@ void UI_func_filter_cutoff(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Filter Cut-Off"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Filter Cut", configuration.dexed[instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1335,6 +1337,8 @@ void UI_func_filter_cutoff(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].filter_cutoff = constrain(configuration.dexed[instance_id].filter_cutoff - ENCODER[ENC_R].speed(), FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX);
lcd_display_bar_int("Filter Cut", configuration.dexed[instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false, false);
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0);
}
@ -1344,7 +1348,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
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1359,8 +1363,8 @@ void UI_func_filter_resonance(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Filter Resonance"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Filter Res", configuration.dexed[instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1376,6 +1380,8 @@ void UI_func_filter_resonance(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].filter_resonance = constrain(configuration.dexed[instance_id].filter_resonance - ENCODER[ENC_R].speed(), FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX);
lcd_display_bar_int("Filter Res", configuration.dexed[instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false, false);
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0);
}
@ -1385,7 +1391,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
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1532,7 +1538,7 @@ void UI_func_sound_intensity(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Sound Intens.", configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false, true);
lcd_display_bar_int("Sound Intens.", configuration.dexed[instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1548,10 +1554,11 @@ void UI_func_sound_intensity(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].sound_intensity = constrain(configuration.dexed[instance_id].sound_intensity - ENCODER[ENC_R].speed(), SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX);
lcd_display_bar_int("Sound Intens.", configuration.dexed[instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false, false);
dexed_level[instance_id]->gain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX));
}
lcd_display_bar_int("Sound Intens.", configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -1666,8 +1673,8 @@ void UI_func_polyphony(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Polyphony"));
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Polyphony", configuration.dexed[instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1683,16 +1690,15 @@ void UI_func_polyphony(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony - ENCODER[ENC_R].speed(), POLYPHONY_MIN, POLYPHONY_MAX);
lcd_display_bar_int("Polyphony", configuration.dexed[instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 3, false, false, false, false);
MicroDexed[instance_id]->setMaxNotes(configuration.dexed[instance_id].polyphony);
}
lcd.setCursor(0, 1);
lcd_display_int(configuration.dexed[instance_id].polyphony, 2, false, true, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR);
eeprom_write();
}
}
@ -1858,7 +1864,7 @@ void UI_func_pb_range(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, true);
lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1874,10 +1880,10 @@ void UI_func_pb_range(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].pb_range = constrain(configuration.dexed[instance_id].pb_range - ENCODER[ENC_R].speed(), PB_RANGE_MIN, PB_RANGE_MAX);
lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, false);
MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step);
}
lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -1898,7 +1904,7 @@ void UI_func_pb_step(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, true);
lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1914,10 +1920,10 @@ void UI_func_pb_step(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].pb_step = constrain(configuration.dexed[instance_id].pb_step - ENCODER[ENC_R].speed(), PB_STEP_MIN, PB_STEP_MAX);
lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, false);
MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step);
}
lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -1939,7 +1945,7 @@ void UI_func_mw_range(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, true);
lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1955,10 +1961,10 @@ void UI_func_mw_range(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].mw_range = constrain(configuration.dexed[instance_id].mw_range - ENCODER[ENC_R].speed(), MW_RANGE_MIN, MW_RANGE_MAX);
lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, false);
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);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -1996,9 +2002,6 @@ void UI_func_mw_assign(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].mw_assign = constrain(configuration.dexed[instance_id].mw_assign - 1, MW_ASSIGN_MIN, MW_ASSIGN_MAX);
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_assign)
{
@ -2027,6 +2030,9 @@ void UI_func_mw_assign(uint8_t param)
lcd.print(F("[PTCH AMP EG-BS]"));
break;
}
MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2063,9 +2069,6 @@ void UI_func_mw_mode(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].mw_mode = constrain(configuration.dexed[instance_id].mw_mode - 1, MW_MODE_MIN, MW_MODE_MAX);
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)
{
@ -2076,6 +2079,9 @@ void UI_func_mw_mode(uint8_t param)
lcd.print(F("[REVERSE]"));
break;
}
MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign, configuration.dexed[instance_id].mw_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2096,7 +2102,7 @@ void UI_func_fc_range(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, true);
lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2112,10 +2118,10 @@ void UI_func_fc_range(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].fc_range = constrain(configuration.dexed[instance_id].fc_range - ENCODER[ENC_R].speed(), FC_RANGE_MIN, FC_RANGE_MAX);
lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, false);
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);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2153,9 +2159,6 @@ void UI_func_fc_assign(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].fc_assign = constrain(configuration.dexed[instance_id].fc_assign - 1, FC_ASSIGN_MIN, FC_ASSIGN_MAX);
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_assign)
{
@ -2184,6 +2187,9 @@ void UI_func_fc_assign(uint8_t param)
lcd.print(F("[PTCH AMP EG-BS]"));
break;
}
MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2220,9 +2226,6 @@ void UI_func_fc_mode(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].fc_mode = constrain(configuration.dexed[instance_id].fc_mode - 1, FC_MODE_MIN, FC_MODE_MAX);
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)
{
@ -2233,6 +2236,9 @@ void UI_func_fc_mode(uint8_t param)
lcd.print(F("[REVERSE]"));
break;
}
MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2253,7 +2259,7 @@ void UI_func_bc_range(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, true);
lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2269,10 +2275,10 @@ void UI_func_bc_range(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].bc_range = constrain(configuration.dexed[instance_id].bc_range - ENCODER[ENC_R].speed(), BC_RANGE_MIN, BC_RANGE_MAX);
lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, false);
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);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2310,9 +2316,6 @@ void UI_func_bc_assign(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].bc_assign = constrain(configuration.dexed[instance_id].bc_assign - 1, BC_ASSIGN_MIN, BC_ASSIGN_MAX);
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);
switch (configuration.dexed[instance_id].bc_assign)
{
@ -2341,6 +2344,9 @@ void UI_func_bc_assign(uint8_t param)
lcd.print(F("[PTCH AMP EG-BS]"));
break;
}
MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2377,9 +2383,6 @@ void UI_func_bc_mode(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].bc_mode = constrain(configuration.dexed[instance_id].bc_mode - 1, BC_MODE_MIN, BC_MODE_MAX);
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);
switch (configuration.dexed[instance_id].bc_mode)
{
@ -2390,6 +2393,9 @@ void UI_func_bc_mode(uint8_t param)
lcd.print(F("[REVERSE]"));
break;
}
MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2410,7 +2416,7 @@ void UI_func_at_range(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, true);
lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2426,10 +2432,10 @@ void UI_func_at_range(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].at_range = constrain(configuration.dexed[instance_id].at_range - ENCODER[ENC_R].speed(), AT_RANGE_MIN, AT_RANGE_MAX);
lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, false);
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);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2467,9 +2473,6 @@ void UI_func_at_assign(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].at_assign = constrain(configuration.dexed[instance_id].at_assign - 1, AT_ASSIGN_MIN, AT_ASSIGN_MAX);
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);
switch (configuration.dexed[instance_id].at_assign)
{
@ -2498,6 +2501,9 @@ void UI_func_at_assign(uint8_t param)
lcd.print(F("[PTCH AMP EG-BS]"));
break;
}
MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2534,9 +2540,6 @@ void UI_func_at_mode(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].at_mode = constrain(configuration.dexed[instance_id].at_mode - 1, AT_MODE_MIN, AT_MODE_MAX);
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);
switch (configuration.dexed[instance_id].at_mode)
{
@ -2547,6 +2550,9 @@ void UI_func_at_mode(uint8_t param)
lcd.print(F("[REVERSE]"));
break;
}
MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2583,9 +2589,6 @@ void UI_func_portamento_mode(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].portamento_mode = constrain(configuration.dexed[instance_id].portamento_mode - 1, PORTAMENTO_MODE_MIN, PORTAMENTO_MODE_MAX);
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
}
lcd.setCursor(0, 1);
switch (configuration.dexed[instance_id].portamento_mode)
{
@ -2602,6 +2605,9 @@ void UI_func_portamento_mode(uint8_t param)
lcd.print(F("[FULL ]"));
break;
}
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2638,9 +2644,6 @@ void UI_func_portamento_glissando(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].portamento_glissando = constrain(configuration.dexed[instance_id].portamento_glissando - 1, PORTAMENTO_GLISSANDO_MIN, PORTAMENTO_GLISSANDO_MAX);
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
}
lcd.setCursor(0, 1);
switch (configuration.dexed[instance_id].portamento_glissando)
{
@ -2651,6 +2654,9 @@ void UI_func_portamento_glissando(uint8_t param)
lcd.print(F("[ON ]"));
break;
}
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2670,7 +2676,7 @@ void UI_func_portamento_time(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, true);
lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2686,10 +2692,10 @@ void UI_func_portamento_time(uint8_t param)
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].portamento_time = constrain(configuration.dexed[instance_id].portamento_time - ENCODER[ENC_R].speed(), PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX);
lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, false);
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
}
lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, false);
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2770,6 +2776,15 @@ void UI_handle_OP(uint8_t param, uint8_t op, uint8_t instance_id)
lcd.setCursor(0, 0);
lcd.print(F("Operator "));
lcd.print(op + 1);
lcd.setCursor(0, 1);
if (state == true)
{
lcd.print(F("[ENABLED ]"));
}
else
{
lcd.print(F("[DISABLED]"));
}
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2788,8 +2803,9 @@ void UI_handle_OP(uint8_t param, uint8_t op, uint8_t instance_id)
bitSet(configuration.dexed[instance_id].op_enabled, op);
state = true;
}
}
if (LCDML.BT_checkDown() || LCDML.BT_checkUp())
{
lcd.setCursor(0, 1);
if (state == true)
{
@ -2801,6 +2817,8 @@ void UI_handle_OP(uint8_t param, uint8_t op, uint8_t instance_id)
}
MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled);
MicroDexed[instance_id]->doRefreshVoice();
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
@ -2861,7 +2879,6 @@ void UI_func_midi_soft_thru(uint8_t param)
configuration.soft_midi_thru = constrain(configuration.soft_midi_thru + 1, SOFT_MIDI_THRU_MIN, SOFT_MIDI_THRU_MAX);
else if (LCDML.BT_checkUp())
configuration.soft_midi_thru = constrain(configuration.soft_midi_thru - 1, SOFT_MIDI_THRU_MIN, SOFT_MIDI_THRU_MAX);
}
lcd.setCursor(0, 1);
switch (configuration.soft_midi_thru)
@ -2874,6 +2891,7 @@ void UI_func_midi_soft_thru(uint8_t param)
break;
}
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
@ -2893,7 +2911,7 @@ void UI_func_velocity_level(uint8_t param)
{
// setup function
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, true);
lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, true);
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2908,9 +2926,9 @@ void UI_func_velocity_level(uint8_t param)
configuration.dexed[instance_id].velocity_level = constrain(configuration.dexed[instance_id].velocity_level + ENCODER[ENC_R].speed(), VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX);
else if (LCDML.BT_checkUp())
configuration.dexed[instance_id].velocity_level = constrain(configuration.dexed[instance_id].velocity_level - ENCODER[ENC_R].speed(), VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX);
}
lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, false);
lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, false);
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2997,11 +3015,11 @@ void UI_func_volume(uint8_t param)
if (menu_state != MENU_VOLUME)
{
lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, true);
lcd_display_bar_int("Volume", configuration.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, true);
menu_state = MENU_VOLUME;
}
else
lcd_display_bar_int("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, false);
lcd_display_bar_int("Volume", configuration.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, false);
set_volume(configuration.vol, configuration.mono);
eeprom_write();
@ -3242,7 +3260,7 @@ void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bo
lcd.print(F("]"));
}
void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init)
void lcd_display_bar_int(const char* title, uint32_t value, float factor, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init)
{
float _v = float((value - min_value) * LCD_cols) / (max_value - min_value);
float _vi = 0.0;
@ -3255,7 +3273,7 @@ void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value,
LCDML.DISP_clear();
lcd.show(0, 0, LCD_cols - 1, title);
lcd.setCursor(LCD_cols - (size + 1) + 1, 0);
lcd_display_int(value, size, zeros, brackets, sign);
lcd_display_int(uint16_t(float(value)*factor + 0.5), size, zeros, brackets, sign);
lcd.setCursor(0, 1);
if (vi == 0 && uint8_t(vf / 2) == 0)
@ -3286,7 +3304,7 @@ void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value,
uint8_t ca = uint8_t (float(LCD_cols - 1) / float(max_value)) + 1;
lcd.setCursor(LCD_cols - (size + 1) + 1, 0);
lcd_display_int(value, size, zeros, brackets, sign);
lcd_display_int(uint16_t(float(value)*factor + 0.5), size, zeros, brackets, sign);
if (vi == 0 && uint8_t(vf / 2) == 0)
{

@ -352,7 +352,7 @@ enum { DEXED, CHORUS, DELAY, REVERB};
#define CHORUS_LEVEL_DEFAULT 0
#define DELAY_TIME_MIN 0
#define DELAY_TIME_MAX DELAY_MAX_TIME
#define DELAY_TIME_MAX DELAY_MAX_TIME/10
#define DELAY_TIME_DEFAULT 0
#define DELAY_FEEDBACK_MIN 0

Loading…
Cancel
Save