From 4c9f5c4d9be3eaf23dd1484a5dcbf3a6ada1456f Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Mon, 3 Jan 2022 09:56:30 +0100 Subject: [PATCH] Several changes in naming function calls for better matching with MD_next. Fixes for seq.data[] -> seq.note_data[] --- MicroDexed.ino | 5 - UI.hpp | 354 ++++++++++++++++++++++++------------------------- dexed_sd.cpp | 12 +- sequencer.cpp | 30 ++--- sequencer.h | 2 +- 5 files changed, 199 insertions(+), 204 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 4ecc1e8..81fefeb 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -439,11 +439,6 @@ void setup() delay(50); // seems to be needed when no serial debugging is enabled #endif -#ifdef DISPLAY_LCD_SPI - pinMode(SDCARD_CS_PIN, OUTPUT); - pinMode(U8X8_CS_PIN, OUTPUT); -#endif - #ifdef ENABLE_LCD_UI setup_ui(); #endif diff --git a/UI.hpp b/UI.hpp index ef8b0cf..899bc83 100644 --- a/UI.hpp +++ b/UI.hpp @@ -365,12 +365,12 @@ void UI_func_epiano_chorus_level(uint8_t param); void UI_update_instance_icons(); bool UI_select_name(uint8_t y, uint8_t x, char* edit_string, uint8_t len, bool init); uint8_t search_accepted_char(uint8_t c); -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, float factor, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init); -void lcd_display_bar_float(const char* title, float value, float factor, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init); -void lcd_display_meter_int(const char* title, uint32_t value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init); -void lcd_display_meter_float(const char* title, float value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init); +void display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign); +void display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign); +void display_bar_int(const char* title, uint32_t value, float factor, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init); +void display_bar_float(const char* title, float value, float factor, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init); +void display_meter_int(const char* title, uint32_t value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init); +void display_meter_float(const char* title, float value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init); void lcd_active_instance_number(uint8_t instance_id); void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op); void lcd_special_chars(uint8_t mode); @@ -587,7 +587,7 @@ void smart_filter(uint8_t dir) if (seq.content_type[d] == 0) { for (uint8_t y = 0; y < 16; y++) { - if (drum_config[activesample].midinote == seq.data[d][y] || drum_config[activesample].midinote == seq.vel[d][y]) + if (drum_config[activesample].midinote == seq.note_data[d][y] || drum_config[activesample].midinote == seq.vel[d][y]) { found = true; break; @@ -611,7 +611,7 @@ void smart_filter(uint8_t dir) for (uint8_t y = 0; y < 16; y++) { - if (drum_config[activesample].midinote == seq.data[d][y] || drum_config[activesample].midinote == seq.vel[d][y]) + if (drum_config[activesample].midinote == seq.note_data[d][y] || drum_config[activesample].midinote == seq.vel[d][y]) { found = true; break; @@ -1121,7 +1121,7 @@ void UI_func_reverb_roomsize(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, true); + display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1133,7 +1133,7 @@ void UI_func_reverb_roomsize(uint8_t param) else if (LCDML.BT_checkUp()) configuration.fx.reverb_roomsize = constrain(configuration.fx.reverb_roomsize - ENCODER[ENC_R].speed(), REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX); } - lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, false); + display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, false); #ifdef USE_PLATEREVERB reverb.size(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); @@ -1157,7 +1157,7 @@ void UI_func_reverb_damping(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, true); + display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1170,7 +1170,7 @@ void UI_func_reverb_damping(uint8_t param) configuration.fx.reverb_damping = constrain(configuration.fx.reverb_damping - ENCODER[ENC_R].speed(), REVERB_DAMPING_MIN, REVERB_DAMPING_MAX); } - lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false); + display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false); freeverb.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); } @@ -1189,7 +1189,7 @@ void UI_func_reverb_lowpass(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, true); + display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1202,7 +1202,7 @@ void UI_func_reverb_lowpass(uint8_t param) configuration.fx.reverb_lowpass = constrain(configuration.fx.reverb_lowpass - ENCODER[ENC_R].speed(), REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX); } - lcd_display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, false); + display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, false); reverb.lowpass(mapfloat(configuration.fx.reverb_lowpass, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 0.0, 1.0)); } @@ -1221,7 +1221,7 @@ void UI_func_reverb_lodamp(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, true); + display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1234,7 +1234,7 @@ void UI_func_reverb_lodamp(uint8_t param) configuration.fx.reverb_lodamp = constrain(configuration.fx.reverb_lodamp - ENCODER[ENC_R].speed(), REVERB_LODAMP_MIN, REVERB_LODAMP_MAX); } - lcd_display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, false); + display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, false); reverb.lodamp(mapfloat(configuration.fx.reverb_lodamp, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 0.0, 1.0)); } @@ -1253,7 +1253,7 @@ void UI_func_reverb_hidamp(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, true); + display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1266,7 +1266,7 @@ void UI_func_reverb_hidamp(uint8_t param) configuration.fx.reverb_hidamp = constrain(configuration.fx.reverb_hidamp - ENCODER[ENC_R].speed(), REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX); } - lcd_display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, false); + display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, false); reverb.hidamp(mapfloat(configuration.fx.reverb_hidamp, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 0.0, 1.0)); } @@ -1285,7 +1285,7 @@ void UI_func_reverb_diffusion(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, true); + display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1298,7 +1298,7 @@ void UI_func_reverb_diffusion(uint8_t param) configuration.fx.reverb_diffusion = constrain(configuration.fx.reverb_diffusion - ENCODER[ENC_R].speed(), REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX); } - lcd_display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, false); + display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, false); reverb.diffusion(mapfloat(configuration.fx.reverb_diffusion, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 0.0, 1.0)); } @@ -1318,7 +1318,7 @@ void UI_func_reverb_level(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); + display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -1331,7 +1331,7 @@ void UI_func_reverb_level(uint8_t param) configuration.fx.reverb_level = constrain(configuration.fx.reverb_level - ENCODER[ENC_R].speed(), REVERB_LEVEL_MIN, REVERB_LEVEL_MAX); } - lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); + display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); //master_mixer_r.gain(MASTER_MIX_CH_REVERB, pseudo_log_curve(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0))); //master_mixer_l.gain(MASTER_MIX_CH_REVERB, pseudo_log_curve(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0))); @@ -1353,7 +1353,7 @@ void UI_func_chorus_frequency(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, true); + display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1376,7 +1376,7 @@ void UI_func_chorus_frequency(uint8_t param) } #endif } - lcd_display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, false); + display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, false); chorus_modulator[selected_instance_id]->frequency(configuration.fx.chorus_frequency[selected_instance_id] / 10.0); } @@ -1448,7 +1448,7 @@ void UI_func_chorus_depth(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, true); + display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1472,7 +1472,7 @@ void UI_func_chorus_depth(uint8_t param) #endif } - lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, false); + display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, false); chorus_modulator[selected_instance_id]->amplitude(configuration.fx.chorus_depth[selected_instance_id] / 100.0); } @@ -1491,7 +1491,7 @@ void UI_func_chorus_level(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, true); + display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1521,7 +1521,7 @@ void UI_func_chorus_level(uint8_t param) #endif } - lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, false); + display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, false); //chorus_mixer[selected_instance_id]->gain(0, pseudo_log_curve(1.0 - mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); //chorus_mixer[selected_instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5))); @@ -1550,9 +1550,9 @@ void UI_func_delay_time(uint8_t param) else { #if DELAY_TIME_MAX >= 100 - lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); + display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); #else - lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); + display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); #endif } lcd_active_instance_number(selected_instance_id); @@ -1611,9 +1611,9 @@ void UI_func_delay_time(uint8_t param) else { #if DELAY_TIME_MAX >= 100 - lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); + display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); #else - lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); + display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); #endif if (configuration.fx.delay_time[selected_instance_id] <= DELAY_TIME_MIN) delay_fx[selected_instance_id]->disable(0); @@ -1636,7 +1636,7 @@ void UI_func_delay_feedback(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, true); + display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1666,7 +1666,7 @@ void UI_func_delay_feedback(uint8_t param) #endif } - lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, false); + display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, false); delay_fb_mixer[selected_instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_feedback[selected_instance_id], DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0, 127))); // amount of feedback } @@ -1685,7 +1685,7 @@ void UI_func_delay_level(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, true); + display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1715,7 +1715,7 @@ void UI_func_delay_level(uint8_t param) #endif } - lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, false); + display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, false); delay_mixer[selected_instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_level[selected_instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0, 127))); } @@ -1734,7 +1734,7 @@ void UI_func_reverb_send(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, true); + display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1764,7 +1764,7 @@ void UI_func_reverb_send(uint8_t param) #endif } - lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false); + display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false); reverb_mixer_r.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); reverb_mixer_l.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); @@ -1784,7 +1784,7 @@ void UI_func_filter_cutoff(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, true); + display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1814,7 +1814,7 @@ void UI_func_filter_cutoff(uint8_t param) #endif } - lcd_display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false); + display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false); MicroDexed[selected_instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[selected_instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); } @@ -1833,7 +1833,7 @@ void UI_func_filter_resonance(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, true); + display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1863,7 +1863,7 @@ void UI_func_filter_resonance(uint8_t param) #endif } - lcd_display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false); + display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false); MicroDexed[selected_instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[selected_instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); } @@ -1883,7 +1883,7 @@ void UI_func_transpose(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(METERBAR); - lcd_display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true); + display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1907,7 +1907,7 @@ void UI_func_transpose(uint8_t param) #endif } - lcd_display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true); + display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true); MicroDexed[selected_instance_id]->setTranspose(configuration.dexed[selected_instance_id].transpose); MicroDexed[selected_instance_id]->notesOff(); @@ -1928,7 +1928,7 @@ void UI_func_tune(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(METERBAR); - lcd_display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 3, false, true, true); + display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 3, false, true, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -1958,7 +1958,7 @@ void UI_func_tune(uint8_t param) #endif } - lcd_display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 3, false, true, false); + display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 3, false, true, false); MicroDexed[selected_instance_id]->setMasterTune((int((configuration.dexed[selected_instance_id].tune - 100) / 100.0 * 0x4000) << 11) * (1.0 / 12)); MicroDexed[selected_instance_id]->doRefreshVoice(); @@ -2006,7 +2006,7 @@ void UI_func_midi_channel(uint8_t param) } else { - lcd_display_int(configuration.dexed[selected_instance_id].midi_channel, 4, false, true, false); + display_int(configuration.dexed[selected_instance_id].midi_channel, 4, false, true, false); } } @@ -2133,7 +2133,7 @@ void UI_func_sound_intensity(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, true); + display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -2166,7 +2166,7 @@ void UI_func_sound_intensity(uint8_t param) #endif } - lcd_display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false); + display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, false); MicroDexed[selected_instance_id]->setGain(midi_volume_transform(map(configuration.dexed[selected_instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0, 127))); } @@ -2192,7 +2192,7 @@ void UI_func_panorama(uint8_t param) return; } lcd_special_chars(METERBAR); - lcd_display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, true); + display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -2221,7 +2221,7 @@ void UI_func_panorama(uint8_t param) if (configuration.sys.mono == 0) { - lcd_display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, false); + display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, false); mono2stereo[selected_instance_id]->panorama(mapfloat(configuration.dexed[selected_instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0)); } } @@ -2323,7 +2323,7 @@ void UI_func_epiano_midi_channel(uint8_t param) } else { - lcd_display_int(configuration.epiano.midi_channel, 4, false, true, false); + display_int(configuration.epiano.midi_channel, 4, false, true, false); } } @@ -2420,7 +2420,7 @@ void UI_func_epiano_sound_intensity(uint8_t param) lcd_special_chars(BLOCKBAR); #if defined(USE_EPIANO) - lcd_display_bar_int("EP Level", configuration.epiano.sound_intensity, 1.0, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX, 3, false, false, true); + display_bar_int("EP Level", configuration.epiano.sound_intensity, 1.0, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX, 3, false, false, true); #else display.clear(); display.print("EP Disabled"); @@ -2445,7 +2445,7 @@ void UI_func_epiano_sound_intensity(uint8_t param) } } - lcd_display_bar_int("EP Level", configuration.epiano.sound_intensity, 1.0, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX, 3, false, false, false); + display_bar_int("EP Level", configuration.epiano.sound_intensity, 1.0, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setVolume(mapfloat(configuration.epiano.sound_intensity, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX, 0, 1.0)); #endif @@ -2474,7 +2474,7 @@ void UI_func_epiano_panorama(uint8_t param) } lcd_special_chars(METERBAR); - lcd_display_meter_float("EP Panorama", configuration.epiano.pan, 0.05, -20.0, EP_PANORAMA_MIN, EP_PANORAMA_MAX, 1, 1, false, true, true); + display_meter_float("EP Panorama", configuration.epiano.pan, 0.05, -20.0, EP_PANORAMA_MIN, EP_PANORAMA_MAX, 1, 1, false, true, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2492,7 +2492,7 @@ void UI_func_epiano_panorama(uint8_t param) if (configuration.sys.mono == 0) { - lcd_display_meter_float("EP Panorama", configuration.epiano.pan, 0.05, -20.0, EP_PANORAMA_MIN, EP_PANORAMA_MAX, 1, 1, false, true, false); + display_meter_float("EP Panorama", configuration.epiano.pan, 0.05, -20.0, EP_PANORAMA_MIN, EP_PANORAMA_MAX, 1, 1, false, true, false); #if defined(USE_EPIANO) ep_stereo_panorama.panorama(mapfloat(configuration.epiano.pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0)); #endif @@ -2513,7 +2513,7 @@ void UI_func_epiano_decay(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Decay", configuration.epiano.decay, 1.0, EP_DECAY_MIN, EP_DECAY_MAX, 3, false, false, true); + display_bar_int("EP Decay", configuration.epiano.decay, 1.0, EP_DECAY_MIN, EP_DECAY_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2532,7 +2532,7 @@ void UI_func_epiano_decay(uint8_t param) } } - lcd_display_bar_int("EP Decay", configuration.epiano.decay, 1.0, EP_DECAY_MIN, EP_DECAY_MAX, 3, false, false, false); + display_bar_int("EP Decay", configuration.epiano.decay, 1.0, EP_DECAY_MIN, EP_DECAY_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setDecay(mapfloat(configuration.epiano.decay, EP_DECAY_MIN, EP_DECAY_MAX, 0, 1.0)); #endif @@ -2552,7 +2552,7 @@ void UI_func_epiano_release(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Release", configuration.epiano.release, 1.0, EP_RELEASE_MIN, EP_RELEASE_MAX, 3, false, false, true); + display_bar_int("EP Release", configuration.epiano.release, 1.0, EP_RELEASE_MIN, EP_RELEASE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2571,7 +2571,7 @@ void UI_func_epiano_release(uint8_t param) } } - lcd_display_bar_int("EP Release", configuration.epiano.release, 1.0, EP_RELEASE_MIN, EP_RELEASE_MAX, 3, false, false, false); + display_bar_int("EP Release", configuration.epiano.release, 1.0, EP_RELEASE_MIN, EP_RELEASE_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setRelease(mapfloat(configuration.epiano.release, EP_RELEASE_MIN, EP_RELEASE_MAX, 0, 1.0)); #endif @@ -2591,7 +2591,7 @@ void UI_func_epiano_hardness(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Hardness", configuration.epiano.hardness, 1.0, EP_HARDNESS_MIN, EP_HARDNESS_MAX, 3, false, false, true); + display_bar_int("EP Hardness", configuration.epiano.hardness, 1.0, EP_HARDNESS_MIN, EP_HARDNESS_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2610,7 +2610,7 @@ void UI_func_epiano_hardness(uint8_t param) } } - lcd_display_bar_int("EP Hardness", configuration.epiano.hardness, 1.0, EP_HARDNESS_MIN, EP_HARDNESS_MAX, 3, false, false, false); + display_bar_int("EP Hardness", configuration.epiano.hardness, 1.0, EP_HARDNESS_MIN, EP_HARDNESS_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setHardness(mapfloat(configuration.epiano.hardness, EP_HARDNESS_MIN, EP_HARDNESS_MAX, 0, 1.0)); #endif @@ -2630,7 +2630,7 @@ void UI_func_epiano_treble(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Treble", configuration.epiano.treble, 1.0, EP_TREBLE_MIN, EP_TREBLE_MAX, 3, false, false, true); + display_bar_int("EP Treble", configuration.epiano.treble, 1.0, EP_TREBLE_MIN, EP_TREBLE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2649,7 +2649,7 @@ void UI_func_epiano_treble(uint8_t param) } } - lcd_display_bar_int("EP Treble", configuration.epiano.treble, 1.0, EP_TREBLE_MIN, EP_TREBLE_MAX, 3, false, false, false); + display_bar_int("EP Treble", configuration.epiano.treble, 1.0, EP_TREBLE_MIN, EP_TREBLE_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setTreble(mapfloat(configuration.epiano.treble, EP_TREBLE_MIN, EP_TREBLE_MAX, 0, 1.0)); #endif @@ -2669,7 +2669,7 @@ void UI_func_epiano_stereo(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Stereo", configuration.epiano.stereo, 1.0, EP_STEREO_MIN, EP_STEREO_MAX, 3, false, false, true); + display_bar_int("EP Stereo", configuration.epiano.stereo, 1.0, EP_STEREO_MIN, EP_STEREO_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2688,7 +2688,7 @@ void UI_func_epiano_stereo(uint8_t param) } } - lcd_display_bar_int("EP Stereo", configuration.epiano.stereo, 1.0, EP_STEREO_MIN, EP_STEREO_MAX, 3, false, false, false); + display_bar_int("EP Stereo", configuration.epiano.stereo, 1.0, EP_STEREO_MIN, EP_STEREO_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setStereo(mapfloat(configuration.epiano.stereo, EP_STEREO_MIN, EP_STEREO_MAX, 0, 1.0)); #endif @@ -2708,7 +2708,7 @@ void UI_func_epiano_tune(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(METERBAR); - lcd_display_meter_int("EP Tune", configuration.epiano.tune, 1.0, -100.0, EP_TUNE_MIN, EP_TUNE_MAX, 3, false, true, true); + display_meter_int("EP Tune", configuration.epiano.tune, 1.0, -100.0, EP_TUNE_MIN, EP_TUNE_MAX, 3, false, true, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2727,7 +2727,7 @@ void UI_func_epiano_tune(uint8_t param) } } - lcd_display_meter_int("EP Tune", configuration.epiano.tune, 1.0, -100.0, EP_TUNE_MIN, EP_TUNE_MAX, 3, false, true, false); + display_meter_int("EP Tune", configuration.epiano.tune, 1.0, -100.0, EP_TUNE_MIN, EP_TUNE_MAX, 3, false, true, false); #if defined(USE_EPIANO) ep.setTune(mapfloat(configuration.epiano.tune, EP_TUNE_MIN, EP_TUNE_MAX, 0.0, 1.0)); #endif @@ -2747,7 +2747,7 @@ void UI_func_epiano_detune(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Detune", configuration.epiano.detune, 1.0, EP_DETUNE_MIN, EP_DETUNE_MAX, 3, false, false, true); + display_bar_int("EP Detune", configuration.epiano.detune, 1.0, EP_DETUNE_MIN, EP_DETUNE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2766,7 +2766,7 @@ void UI_func_epiano_detune(uint8_t param) } } - lcd_display_bar_int("EP Detune", configuration.epiano.detune, 1.0, EP_DETUNE_MIN, EP_DETUNE_MAX, 3, false, false, false); + display_bar_int("EP Detune", configuration.epiano.detune, 1.0, EP_DETUNE_MIN, EP_DETUNE_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setDetune(mapfloat(configuration.epiano.detune, EP_DETUNE_MIN, EP_DETUNE_MAX, 0, 1.0)); #endif @@ -2786,7 +2786,7 @@ void UI_func_epiano_pan_tremolo(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Trem. Width", configuration.epiano.pan_tremolo, 1.0, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 3, false, false, true); + display_bar_int("EP Trem. Width", configuration.epiano.pan_tremolo, 1.0, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2805,7 +2805,7 @@ void UI_func_epiano_pan_tremolo(uint8_t param) } } - lcd_display_bar_int("EP Trem. Width", configuration.epiano.pan_tremolo, 1.0, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 3, false, false, false); + display_bar_int("EP Trem. Width", configuration.epiano.pan_tremolo, 1.0, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 3, false, false, false); #if defined(USE_EPIANO) if (configuration.epiano.pan_tremolo == 0) ep.setPanTremolo(0.0); @@ -2828,7 +2828,7 @@ void UI_func_epiano_pan_lfo(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP LFO", configuration.epiano.pan_lfo, 1.0, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 3, false, false, true); + display_bar_int("EP LFO", configuration.epiano.pan_lfo, 1.0, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2847,7 +2847,7 @@ void UI_func_epiano_pan_lfo(uint8_t param) } } - lcd_display_bar_int("EP LFO", configuration.epiano.pan_lfo, 1.0, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 3, false, false, false); + display_bar_int("EP LFO", configuration.epiano.pan_lfo, 1.0, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 3, false, false, false); #if defined(USE_EPIANO) if (configuration.epiano.pan_lfo == 0) ep.setPanLFO(0.0); @@ -2870,7 +2870,7 @@ void UI_func_epiano_overdrive(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Overdrive", configuration.epiano.overdrive, 1.0, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX, 3, false, false, true); + display_bar_int("EP Overdrive", configuration.epiano.overdrive, 1.0, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2889,7 +2889,7 @@ void UI_func_epiano_overdrive(uint8_t param) } } - lcd_display_bar_int("EP Overdrive", configuration.epiano.overdrive, 1.0, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX, 3, false, false, false); + display_bar_int("EP Overdrive", configuration.epiano.overdrive, 1.0, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setOverdrive(mapfloat(configuration.epiano.overdrive, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX, 0, 1.0)); #endif @@ -2909,7 +2909,7 @@ void UI_func_epiano_transpose(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(METERBAR); - lcd_display_meter_int("EP Transpose", configuration.epiano.transpose, 1.0, -24.0, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX, 2, false, true, true); + display_meter_int("EP Transpose", configuration.epiano.transpose, 1.0, -24.0, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX, 2, false, true, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2922,7 +2922,7 @@ void UI_func_epiano_transpose(uint8_t param) configuration.epiano.transpose = constrain(configuration.epiano.transpose - ENCODER[ENC_R].speed(), EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX); } - lcd_display_meter_int("EP Transpose", configuration.epiano.transpose, 1.0, -24.0, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX, 2, false, true, true); + display_meter_int("EP Transpose", configuration.epiano.transpose, 1.0, -24.0, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX, 2, false, true, true); } if (LCDML.FUNC_close()) // ****** STABLE END ********* @@ -2939,7 +2939,7 @@ void UI_func_epiano_polyphony(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Polyphony", configuration.epiano.polyphony, 1.0, EP_POLYPHONY_MIN, EP_POLYPHONY_MAX, 2, false, false, true); + display_bar_int("EP Polyphony", configuration.epiano.polyphony, 1.0, EP_POLYPHONY_MIN, EP_POLYPHONY_MAX, 2, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -2961,7 +2961,7 @@ void UI_func_epiano_polyphony(uint8_t param) } } - lcd_display_bar_int("EP Polyphony", configuration.epiano.polyphony, 1.0, EP_POLYPHONY_MIN, EP_POLYPHONY_MAX, 2, false, false, false); + display_bar_int("EP Polyphony", configuration.epiano.polyphony, 1.0, EP_POLYPHONY_MIN, EP_POLYPHONY_MAX, 2, false, false, false); #if defined(USE_EPIANO) ep.setPolyphony(configuration.epiano.polyphony); #endif @@ -2981,7 +2981,7 @@ void UI_func_epiano_velocity_sense(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Vel. Sense", configuration.epiano.velocity_sense, 1.0, EP_VELOCITY_SENSE_MIN, EP_VELOCITY_SENSE_MAX, 3, false, false, true); + display_bar_int("EP Vel. Sense", configuration.epiano.velocity_sense, 1.0, EP_VELOCITY_SENSE_MIN, EP_VELOCITY_SENSE_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3000,7 +3000,7 @@ void UI_func_epiano_velocity_sense(uint8_t param) } } - lcd_display_bar_int("EP Vel. Sense", configuration.epiano.velocity_sense, 1.0, EP_VELOCITY_SENSE_MIN, EP_VELOCITY_SENSE_MAX, 3, false, false, false); + display_bar_int("EP Vel. Sense", configuration.epiano.velocity_sense, 1.0, EP_VELOCITY_SENSE_MIN, EP_VELOCITY_SENSE_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep.setVelocitySense(mapfloat(configuration.epiano.velocity_sense, EP_VELOCITY_SENSE_MIN, EP_VELOCITY_SENSE_MAX, 0, 1.0)); #endif @@ -3020,7 +3020,7 @@ void UI_func_epiano_reverb_send(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Reverb Send", configuration.fx.ep_reverb_send, 1.0, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 3, false, false, true); + display_bar_int("EP Reverb Send", configuration.fx.ep_reverb_send, 1.0, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3039,7 +3039,7 @@ void UI_func_epiano_reverb_send(uint8_t param) } } - lcd_display_bar_int("EP Reverb Send", configuration.fx.ep_reverb_send, 1.0, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 3, false, false, false); + display_bar_int("EP Reverb Send", configuration.fx.ep_reverb_send, 1.0, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 3, false, false, false); reverb_mixer_r.gain(REVERB_MIX_CH_EPIANO, volume_transform(mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); reverb_mixer_l.gain(REVERB_MIX_CH_EPIANO, volume_transform(mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); @@ -3059,7 +3059,7 @@ void UI_func_epiano_chorus_frequency(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_float("EP Chorus Frq.", configuration.fx.ep_chorus_frequency, 0.1, EP_CHORUS_FREQUENCY_MIN, EP_CHORUS_FREQUENCY_MAX, 2, 1, false, false, true); + display_bar_float("EP Chorus Frq.", configuration.fx.ep_chorus_frequency, 0.1, EP_CHORUS_FREQUENCY_MIN, EP_CHORUS_FREQUENCY_MAX, 2, 1, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3071,7 +3071,7 @@ void UI_func_epiano_chorus_frequency(uint8_t param) else if (LCDML.BT_checkUp()) configuration.fx.ep_chorus_frequency = constrain(configuration.fx.ep_chorus_frequency - ENCODER[ENC_R].speed(), EP_CHORUS_FREQUENCY_MIN, EP_CHORUS_FREQUENCY_MAX); } - lcd_display_bar_float("EP Chorus Frq.", configuration.fx.ep_chorus_frequency, 0.1, EP_CHORUS_FREQUENCY_MIN, EP_CHORUS_FREQUENCY_MAX, 2, 1, false, false, false); + display_bar_float("EP Chorus Frq.", configuration.fx.ep_chorus_frequency, 0.1, EP_CHORUS_FREQUENCY_MIN, EP_CHORUS_FREQUENCY_MAX, 2, 1, false, false, false); #if defined(USE_EPIANO) ep_chorus_modulator.frequency(configuration.fx.ep_chorus_frequency / 10.0); #endif @@ -3139,7 +3139,7 @@ void UI_func_epiano_chorus_depth(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Ch. Depth", configuration.fx.ep_chorus_depth, 1.0, EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX, 3, false, false, true); + display_bar_int("EP Ch. Depth", configuration.fx.ep_chorus_depth, 1.0, EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3152,7 +3152,7 @@ void UI_func_epiano_chorus_depth(uint8_t param) configuration.fx.ep_chorus_depth = constrain(configuration.fx.ep_chorus_depth - ENCODER[ENC_R].speed(), EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX); } - lcd_display_bar_int("EP Ch. Depth", configuration.fx.ep_chorus_depth, 1.0, EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX, 3, false, false, false); + display_bar_int("EP Ch. Depth", configuration.fx.ep_chorus_depth, 1.0, EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep_chorus_modulator.amplitude(mapfloat(configuration.fx.ep_chorus_depth, EP_CHORUS_DEPTH_MIN, EP_CHORUS_DEPTH_MAX, 0.0, 1.0)); #endif @@ -3172,7 +3172,7 @@ void UI_func_epiano_chorus_level(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("EP Ch. Level", configuration.fx.ep_chorus_level, 1.0, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 3, false, false, true); + display_bar_int("EP Ch. Level", configuration.fx.ep_chorus_level, 1.0, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 3, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3191,7 +3191,7 @@ void UI_func_epiano_chorus_level(uint8_t param) } } - lcd_display_bar_int("EP Ch. Level", configuration.fx.ep_chorus_level, 1.0, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 3, false, false, false); + display_bar_int("EP Ch. Level", configuration.fx.ep_chorus_level, 1.0, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 3, false, false, false); #if defined(USE_EPIANO) ep_chorus_mixer_r.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); ep_chorus_mixer_l.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); @@ -3289,9 +3289,9 @@ void UI_func_polyphony(uint8_t param) lcd_special_chars(BLOCKBAR); #if NUM_DEXED>1 - lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony, 2, false, false, true); + display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony, 2, false, false, true); #else - lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, true); + display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, true); #endif lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3335,9 +3335,9 @@ void UI_func_polyphony(uint8_t param) } #if NUM_DEXED>1 - lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony, 2, false, false, false); + display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony, 2, false, false, false); #else - lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, false); + display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, false); #endif MicroDexed[selected_instance_id]->setMaxNotes(configuration.dexed[selected_instance_id].polyphony); } @@ -3462,7 +3462,7 @@ void UI_func_pb_range(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, true); + display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3486,7 +3486,7 @@ void UI_func_pb_range(uint8_t param) #endif } - lcd_display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false); + display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setPBController(configuration.dexed[selected_instance_id].pb_range, configuration.dexed[selected_instance_id].pb_step); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 65, configuration.dexed[selected_instance_id].pb_range, 2); @@ -3506,7 +3506,7 @@ void UI_func_pb_step(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, true); + display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3530,7 +3530,7 @@ void UI_func_pb_step(uint8_t param) #endif } - lcd_display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false); + display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setPBController(configuration.dexed[selected_instance_id].pb_range, configuration.dexed[selected_instance_id].pb_step); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 66, configuration.dexed[selected_instance_id].pb_step, 2); @@ -3550,7 +3550,7 @@ void UI_func_mw_range(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, true); + display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3574,7 +3574,7 @@ void UI_func_mw_range(uint8_t param) #endif } - lcd_display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false); + display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setMWController(configuration.dexed[selected_instance_id].mw_range, configuration.dexed[selected_instance_id].mw_assign, configuration.dexed[selected_instance_id].mw_mode); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 70, configuration.dexed[selected_instance_id].mw_range, 2); @@ -3721,7 +3721,7 @@ void UI_func_fc_range(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, true); + display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3745,7 +3745,7 @@ void UI_func_fc_range(uint8_t param) #endif } - lcd_display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false); + display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setFCController(configuration.dexed[selected_instance_id].fc_range, configuration.dexed[selected_instance_id].fc_assign, configuration.dexed[selected_instance_id].fc_mode); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 72, configuration.dexed[selected_instance_id].fc_range, 2); @@ -3892,7 +3892,7 @@ void UI_func_bc_range(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, true); + display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -3916,7 +3916,7 @@ void UI_func_bc_range(uint8_t param) #endif } - lcd_display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false); + display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setBCController(configuration.dexed[selected_instance_id].bc_range, configuration.dexed[selected_instance_id].bc_assign, configuration.dexed[selected_instance_id].bc_mode); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 74, configuration.dexed[selected_instance_id].bc_range, 2); @@ -4063,7 +4063,7 @@ void UI_func_at_range(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, true); + display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -4087,7 +4087,7 @@ void UI_func_at_range(uint8_t param) #endif } - lcd_display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false); + display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setATController(configuration.dexed[selected_instance_id].at_range, configuration.dexed[selected_instance_id].at_assign, configuration.dexed[selected_instance_id].at_mode); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 76, configuration.dexed[selected_instance_id].at_range, 2); @@ -4346,7 +4346,7 @@ void UI_func_portamento_time(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Port. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true); + display_bar_int("Port. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -4370,7 +4370,7 @@ void UI_func_portamento_time(uint8_t param) #endif } - lcd_display_bar_int("Portam. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false); + display_bar_int("Portam. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false); MicroDexed[selected_instance_id]->setPortamentoMode(configuration.dexed[selected_instance_id].portamento_mode, configuration.dexed[selected_instance_id].portamento_glissando, configuration.dexed[selected_instance_id].portamento_time); send_sysex_param(configuration.dexed[selected_instance_id].midi_channel, 69, configuration.dexed[selected_instance_id].portamento_time, 2); @@ -4570,7 +4570,7 @@ void UI_func_drum_midi_channel(uint8_t param) } else { - lcd_display_int(drum_midi_channel, 4, false, true, false); + display_int(drum_midi_channel, 4, false, true, false); } } @@ -5088,7 +5088,7 @@ const char* seq_find_shortname(uint8_t sstep) { for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG - 1; d++) { - if (seq.data[seq.active_track][sstep] == drum_config[d].midinote) + if (seq.note_data[seq.active_track][sstep] == drum_config[d].midinote) { shortname = drum_config[d].shortname; found = true; @@ -5098,9 +5098,9 @@ const char* seq_find_shortname(uint8_t sstep) if (found == false) shortname = "-"; } else { - if (seq.data[seq.active_track][sstep] > 0 && seq.data[seq.active_track][sstep] != 130) - shortname = noteNames[seq.data[seq.active_track][sstep] % 12]; - else if (seq.data[seq.active_track][sstep] == 130) shortname = "~"; // note has tie/latch + if (seq.note_data[seq.active_track][sstep] > 0 && seq.note_data[seq.active_track][sstep] != 130) + shortname = noteNames[seq.note_data[seq.active_track][sstep] % 12]; + else if (seq.note_data[seq.active_track][sstep] == 130) shortname = "~"; // note has tie/latch else shortname = "-"; } @@ -5423,7 +5423,7 @@ void UI_func_seq_vel_editor(uint8_t param) seq.active_track = constrain(seq.active_track - 1, 0, NUM_SEQ_PATTERN - 1); } } - if ( seq.data[seq.active_track][seq.menu - 1] > 0 ) + if ( seq.note_data[seq.active_track][seq.menu - 1] > 0 ) { if (seq.vel[seq.active_track][seq.menu - 1] < 210) //it is a normal sample { @@ -5545,7 +5545,7 @@ void UI_func_seq_vel_editor(uint8_t param) } if (seq.menu > 0) { display.setCursor(4, 0); - if (seq.data[seq.active_track][seq.menu - 1] > 0) + if (seq.note_data[seq.active_track][seq.menu - 1] > 0) { if (seq.content_type[seq.active_track] == 0) //is Drumtrack { @@ -5557,7 +5557,7 @@ void UI_func_seq_vel_editor(uint8_t param) display.print(tmp); //display.setCursor(7, 0); //display.print(" "); - display.show(0, 6, 5, seq_find_drum_name_from_note( seq.data[seq.active_track][seq.menu - 1]) ); + display.show(0, 6, 5, seq_find_drum_name_from_note( seq.note_data[seq.active_track][seq.menu - 1]) ); } else { // else it is a live-pitched sample @@ -5570,7 +5570,7 @@ void UI_func_seq_vel_editor(uint8_t param) } } else { - if ( seq.data[seq.active_track][seq.menu - 1] != 130 ) //note not latched + if ( seq.note_data[seq.active_track][seq.menu - 1] != 130 ) //note not latched { if (seq.content_type[seq.active_track] < 2) { @@ -5582,11 +5582,11 @@ void UI_func_seq_vel_editor(uint8_t param) display.print(" "); } display.setCursor(8, 0); - display.print(noteNames[seq.data[seq.active_track][seq.menu - 1] % 12 ][0] ); - if (noteNames[seq.data[seq.active_track][seq.menu - 1] % 12 ][1] != '\0' ) { - display.print(noteNames[seq.data[seq.active_track][seq.menu - 1] % 12 ][1] ); + display.print(noteNames[seq.note_data[seq.active_track][seq.menu - 1] % 12 ][0] ); + if (noteNames[seq.note_data[seq.active_track][seq.menu - 1] % 12 ][1] != '\0' ) { + display.print(noteNames[seq.note_data[seq.active_track][seq.menu - 1] % 12 ][1] ); } - display.print( (seq.data[seq.active_track][seq.menu - 1] / 12) - 1); + display.print( (seq.note_data[seq.active_track][seq.menu - 1] / 12) - 1); display.print(" "); } else @@ -5621,14 +5621,14 @@ void UI_func_seq_vel_editor(uint8_t param) void seq_clear_active_pattern() { - memset(seq.data[seq.active_track], 0, sizeof(seq.data[seq.active_track])); + memset(seq.note_data[seq.active_track], 0, sizeof(seq.note_data[seq.active_track])); memset(seq.vel[seq.active_track], 0, sizeof(seq.vel[seq.active_track])); } void seq_clear_all_patterns() { for (uint8_t i = 0; i < NUM_SEQ_PATTERN - 1; i++) { - memset(seq.data[i], 0, sizeof(seq.data[i])); + memset(seq.note_data[i], 0, sizeof(seq.note_data[i])); memset(seq.vel[i], 0, sizeof(seq.vel[i])); } } @@ -5684,12 +5684,12 @@ void arp_refresh_display_play_status() } void seq_print_current_note() { - display.print(noteNames[seq.data[seq.active_track][seq.menu - 3] % 12 ][0] ); - if (noteNames[seq.data[seq.active_track][seq.menu - 3] % 12 ][1] != '\0' ) + display.print(noteNames[seq.note_data[seq.active_track][seq.menu - 3] % 12 ][0] ); + if (noteNames[seq.note_data[seq.active_track][seq.menu - 3] % 12 ][1] != '\0' ) { - display.print(noteNames[seq.data[seq.active_track][seq.menu - 3] % 12 ][1] ); + display.print(noteNames[seq.note_data[seq.active_track][seq.menu - 3] % 12 ][1] ); } - display.print( (seq.data[seq.active_track][seq.menu - 3] / 12) - 1); + display.print( (seq.note_data[seq.active_track][seq.menu - 3] / 12) - 1); display.print(" "); } void check_variable_samples_basespeed() @@ -5715,7 +5715,7 @@ void UI_func_seq_pattern_editor(uint8_t param) display.createChar(6, (uint8_t*)special_chars[14]); //bar graph display.createChar(7, (uint8_t*)special_chars[15]); //bar graph #endif - temp_int = seq.data[seq.active_track][0]; + temp_int = seq.note_data[seq.active_track][0]; encoderDir[ENC_R].reset(); seq.note_in = 0; // setup function @@ -5738,10 +5738,10 @@ void UI_func_seq_pattern_editor(uint8_t param) if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) { if (LCDML.BT_checkDown()) { - seq.data[seq.active_track][seq.menu - 3] = constrain(seq.data[seq.active_track][seq.menu - 3] + 1, 1, 108); + seq.note_data[seq.active_track][seq.menu - 3] = constrain(seq.note_data[seq.active_track][seq.menu - 3] + 1, 1, 108); } else if (LCDML.BT_checkUp()) { - seq.data[seq.active_track][seq.menu - 3] = constrain(seq.data[seq.active_track][seq.menu - 3] - 1, 1, 108); + seq.note_data[seq.active_track][seq.menu - 3] = constrain(seq.note_data[seq.active_track][seq.menu - 3] - 1, 1, 108); } } } @@ -5874,7 +5874,7 @@ void UI_func_seq_pattern_editor(uint8_t param) seq.menu = 0; seq_active_function = 0; activesample = 0; - temp_int = seq.data[seq.active_track][0]; + temp_int = seq.note_data[seq.active_track][0]; display.setCursor(8, 0); display.print(" "); display.setCursor(12, 0); @@ -5894,7 +5894,7 @@ void UI_func_seq_pattern_editor(uint8_t param) if (seq.content_type[seq.active_track] == 0) { //Drumtrack for (uint8_t i = 0; i < 16; i++) { - seq.data[seq.active_track][i] = drum_config[seq.temp_select_menu].midinote; + seq.note_data[seq.active_track][i] = drum_config[seq.temp_select_menu].midinote; seq.vel[seq.active_track][i] = 120; if (seq.temp_active_menu == 0) i = i + 3; else if (seq.temp_active_menu == 1) i = i + 1; } @@ -5903,7 +5903,7 @@ void UI_func_seq_pattern_editor(uint8_t param) { //Inst. Track for (uint8_t i = 0; i < 16; i++) { - seq.data[seq.active_track][i] = seq.temp_select_menu; + seq.note_data[seq.active_track][i] = seq.temp_select_menu; seq.vel[seq.active_track][i] = 120; if (seq.temp_active_menu == 0) i = i + 3; else if (seq.temp_active_menu == 1) i = i + 1; } @@ -5911,20 +5911,20 @@ void UI_func_seq_pattern_editor(uint8_t param) seq.menu = 0; seq_active_function = 0; activesample = 0; - temp_int = seq.data[seq.active_track][0]; + temp_int = seq.note_data[seq.active_track][0]; display.setCursor(8, 0); display.print(" "); seq_refresh_display_play_status(); seq_printAllSeqSteps(); } else if (seq.menu == 31 && seq_active_function != 40) //copy patterns { - memcpy( seq.data[temp_int], seq.data[seq.active_track], sizeof(seq.data[0])); + memcpy( seq.note_data[temp_int], seq.note_data[seq.active_track], sizeof(seq.note_data[0])); memcpy( seq.vel[temp_int], seq.vel[seq.active_track], sizeof(seq.vel[0])); seq.content_type[temp_int] = seq.content_type[seq.active_track]; seq.menu = 0; seq_active_function = 0; activesample = 0; - temp_int = seq.data[seq.active_track][0]; + temp_int = seq.note_data[seq.active_track][0]; display.setCursor(8, 0); display.print(" "); seq_refresh_display_play_status(); @@ -5934,13 +5934,13 @@ void UI_func_seq_pattern_editor(uint8_t param) uint8_t data_temp[1][16]; uint8_t vel_temp[1][16]; uint8_t content_type_temp; - memcpy( data_temp[0], seq.data[seq.active_track], sizeof(data_temp[0])); + memcpy( data_temp[0], seq.note_data[seq.active_track], sizeof(data_temp[0])); memcpy( vel_temp[0], seq.vel[seq.active_track], sizeof(vel_temp[0])); content_type_temp = seq.content_type[seq.active_track]; - memcpy( seq.data[seq.active_track], seq.data[temp_int], sizeof(data_temp[0])); + memcpy( seq.note_data[seq.active_track], seq.note_data[temp_int], sizeof(data_temp[0])); memcpy( seq.vel[seq.active_track], seq.vel[temp_int], sizeof(vel_temp[0])); seq.content_type[seq.active_track] = seq.content_type[temp_int]; - memcpy( seq.data[temp_int], data_temp[0], sizeof(data_temp[0])); + memcpy( seq.note_data[temp_int], data_temp[0], sizeof(data_temp[0])); memcpy( seq.vel[temp_int], vel_temp[0], sizeof(vel_temp[0])); seq.content_type[temp_int] = content_type_temp; seq.menu = 0; @@ -5948,7 +5948,7 @@ void UI_func_seq_pattern_editor(uint8_t param) activesample = 0; display.setCursor(8, 0); display.print(" "); - temp_int = seq.data[seq.active_track][0]; + temp_int = seq.note_data[seq.active_track][0]; seq_refresh_display_play_status(); seq_printAllSeqSteps(); } @@ -5963,7 +5963,7 @@ void UI_func_seq_pattern_editor(uint8_t param) display.print("Transpose:[ 00]"); for (uint8_t i = 0; i < 16; i++) { - seq.data_buffer[i] = seq.data[seq.active_track][i]; + seq.data_buffer[i] = seq.note_data[seq.active_track][i]; } seq.menu = 34; temp_int = 0; @@ -6047,38 +6047,38 @@ void UI_func_seq_pattern_editor(uint8_t param) if ( drum_config[activesample].midinote > 209 ) //it is a pitched sample { seq.vel[seq.active_track][seq.menu - 3] = drum_config[activesample].midinote; - //seq.data[seq.active_track][seq.menu - 3] = MIDI_C4; + //seq.note_data[seq.active_track][seq.menu - 3] = MIDI_C4; } else // if (activesample == NUM_DRUMSET_CONFIG - 1) //user selected EMPTY note for pitched sample // { - // seq.data[seq.active_track][seq.menu - 3] = 0; + // seq.note_data[seq.active_track][seq.menu - 3] = 0; // seq.vel[seq.active_track][seq.menu - 3] = 0; // } // else //check if note is already there, if not -> insert it, else remove it from grid. - if (seq.data[seq.active_track][seq.menu - 3] == drum_config[activesample].midinote) + if (seq.note_data[seq.active_track][seq.menu - 3] == drum_config[activesample].midinote) { - seq.data[seq.active_track][seq.menu - 3] = 0; + seq.note_data[seq.active_track][seq.menu - 3] = 0; seq.vel[seq.active_track][seq.menu - 3] = 0; } else { - seq.data[seq.active_track][seq.menu - 3] = drum_config[activesample].midinote; + seq.note_data[seq.active_track][seq.menu - 3] = drum_config[activesample].midinote; seq.vel[seq.active_track][seq.menu - 3] = 120; } } else { //Inst. Track - if (temp_int == 109 || seq.data[seq.active_track][seq.menu - 3] == temp_int ) + if (temp_int == 109 || seq.note_data[seq.active_track][seq.menu - 3] == temp_int ) { //clear note - seq.data[seq.active_track][seq.menu - 3] = 0; + seq.note_data[seq.active_track][seq.menu - 3] = 0; seq.vel[seq.active_track][seq.menu - 3] = 0; } else if (temp_int == 110) { //latch note - seq.data[seq.active_track][seq.menu - 3] = 130; + seq.note_data[seq.active_track][seq.menu - 3] = 130; //seq.vel[seq.active_track][seq.menu - 3] = 0; } else { - seq.data[seq.active_track][seq.menu - 3] = temp_int; + seq.note_data[seq.active_track][seq.menu - 3] = temp_int; seq.vel[seq.active_track][seq.menu - 3] = 120; } } @@ -6112,13 +6112,13 @@ void UI_func_seq_pattern_editor(uint8_t param) if (seq.content_type[seq.active_track] == 0) { //drums if (seq.data_buffer[i] != 0 && seq.data_buffer[i] + temp_int >= 0 && seq.data_buffer[i] + temp_int < 254 && seq.vel[seq.active_track][i] >= 210 ) // pitched drums only - seq.data[seq.active_track][i] = seq.data_buffer[i] + temp_int; + seq.note_data[seq.active_track][i] = seq.data_buffer[i] + temp_int; } else //instruments if (seq.content_type[seq.active_track] > 0) { if (seq.data_buffer[i] != 0 && seq.data_buffer[i] != 130 && seq.data_buffer[i] + temp_int > 0 && seq.data_buffer[i] + temp_int < 254) - seq.data[seq.active_track][i] = seq.data_buffer[i] + temp_int; + seq.note_data[seq.active_track][i] = seq.data_buffer[i] + temp_int; } } seq_printAllSeqSteps(); @@ -6385,16 +6385,16 @@ void UI_func_seq_pattern_editor(uint8_t param) } else //print current sample name on active step if not empty - if (seq.data[seq.active_track][seq.menu - 3] > 0) + if (seq.note_data[seq.active_track][seq.menu - 3] > 0) { display.setCursor(0, 0); display.print(" "); - display.show(0, 1, 6, seq_find_drum_name_from_note( seq.data[seq.active_track][seq.menu - 3]) ); + display.show(0, 1, 6, seq_find_drum_name_from_note( seq.note_data[seq.active_track][seq.menu - 3]) ); display.print(" "); } else { //if step empty, print selected, active sample - if (seq.data[seq.active_track][seq.menu - 3] == 0) + if (seq.note_data[seq.active_track][seq.menu - 3] == 0) display.setCursor(0, 0); display.print(" "); display.show(0, 1, 6, basename(drum_config[activesample].name)); @@ -7453,7 +7453,7 @@ void UI_func_velocity_level(uint8_t param) encoderDir[ENC_R].reset(); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, true); + display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, true); lcd_active_instance_number(selected_instance_id); UI_update_instance_icons(); @@ -7477,7 +7477,7 @@ void UI_func_velocity_level(uint8_t param) } #endif - lcd_display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false); + display_bar_int("Velocity Lvl", configuration.dexed[selected_instance_id].velocity_level, 1.0, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false); } if (LCDML.FUNC_close()) // ****** STABLE END ********* @@ -7828,7 +7828,7 @@ void UI_func_volume(uint8_t param) if (active_perform_page == 1) { //Master Volume lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Master Vol.", configuration.sys.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, true); + display_bar_int("Master Vol.", configuration.sys.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, true); back_from_volume = 0; } @@ -7955,7 +7955,7 @@ void UI_func_volume(uint8_t param) display.setCursor(0, 0); display.print("Master Vol. "); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Master Vol.", configuration.sys.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, false); + display_bar_int("Master Vol.", configuration.sys.vol, 1.0, VOLUME_MIN, VOLUME_MAX, 3, false, false, false); set_volume(configuration.sys.vol, configuration.sys.mono); } else if (active_perform_page == 2) { //Attack @@ -8688,7 +8688,7 @@ void UI_func_eq_1(uint8_t param) configuration.fx.eq_1 = constrain(configuration.fx.eq_1 - ENCODER[ENC_R].speed(), EQ_1_MIN, EQ_1_MAX); } } - lcd_display_meter_int("EQ Low-Cut [Hz]", configuration.fx.eq_1, 1.0, 0.0, EQ_1_MIN, EQ_1_MAX, 3, false, false, true); + display_meter_int("EQ Low-Cut [Hz]", configuration.fx.eq_1, 1.0, 0.0, EQ_1_MIN, EQ_1_MAX, 3, false, false, true); sgtl5000.setEQFc(1, float(configuration.fx.eq_1)); sgtl5000.setEQGain(1, 6.0); sgtl5000.commitFilter(1); @@ -8736,7 +8736,7 @@ void UI_func_eq_2(uint8_t param) configuration.fx.eq_2 = constrain(configuration.fx.eq_2 - ENCODER[ENC_R].speed(), EQ_2_MIN, EQ_2_MAX); } } - lcd_display_meter_float("EQ 120Hz [dB]", configuration.fx.eq_2, 0.1, 0.0, EQ_2_MIN, EQ_2_MAX, 1, 1, false, true, true); + display_meter_float("EQ 120Hz [dB]", configuration.fx.eq_2, 0.1, 0.0, EQ_2_MIN, EQ_2_MAX, 1, 1, false, true, true); sgtl5000.setEQGain(2, mapfloat(configuration.fx.eq_2, EQ_2_MIN, EQ_2_MAX, -9.9, 9.9)); sgtl5000.commitFilter(2); #ifdef DEBUG @@ -8783,7 +8783,7 @@ void UI_func_eq_3(uint8_t param) configuration.fx.eq_3 = constrain(configuration.fx.eq_3 - ENCODER[ENC_R].speed(), EQ_3_MIN, EQ_3_MAX); } } - lcd_display_meter_float("EQ 220Hz [dB]", configuration.fx.eq_3, 0.1, 0.0, EQ_3_MIN, EQ_3_MAX, 1, 1, false, true, true); + display_meter_float("EQ 220Hz [dB]", configuration.fx.eq_3, 0.1, 0.0, EQ_3_MIN, EQ_3_MAX, 1, 1, false, true, true); sgtl5000.setEQGain(3, mapfloat(configuration.fx.eq_3, EQ_3_MIN, EQ_3_MAX, -9.9, 9.9)); sgtl5000.commitFilter(3); #ifdef DEBUG @@ -8830,7 +8830,7 @@ void UI_func_eq_4(uint8_t param) configuration.fx.eq_4 = constrain(configuration.fx.eq_4 - ENCODER[ENC_R].speed(), EQ_4_MIN, EQ_4_MAX); } } - lcd_display_meter_float("EQ 1000Hz [dB]", configuration.fx.eq_4, 0.1, 0.0, EQ_4_MIN, EQ_4_MAX, 1, 1, false, true, true); + display_meter_float("EQ 1000Hz [dB]", configuration.fx.eq_4, 0.1, 0.0, EQ_4_MIN, EQ_4_MAX, 1, 1, false, true, true); sgtl5000.setEQGain(4, mapfloat(configuration.fx.eq_4, EQ_4_MIN, EQ_4_MAX, -9.9, 9.9)); sgtl5000.commitFilter(4); #ifdef DEBUG @@ -8877,7 +8877,7 @@ void UI_func_eq_5(uint8_t param) configuration.fx.eq_5 = constrain(configuration.fx.eq_5 - ENCODER[ENC_R].speed(), EQ_5_MIN, EQ_5_MAX); } } - lcd_display_meter_float("EQ 2000Hz [dB]", configuration.fx.eq_5, 0.1, 0.0, EQ_5_MIN, EQ_5_MAX, 1, 1, false, true, true); + display_meter_float("EQ 2000Hz [dB]", configuration.fx.eq_5, 0.1, 0.0, EQ_5_MIN, EQ_5_MAX, 1, 1, false, true, true); sgtl5000.setEQGain(5, mapfloat(configuration.fx.eq_5, EQ_5_MIN, EQ_5_MAX, -9.9, 9.9)); sgtl5000.commitFilter(5); #ifdef DEBUG @@ -8924,7 +8924,7 @@ void UI_func_eq_6(uint8_t param) configuration.fx.eq_6 = constrain(configuration.fx.eq_6 - ENCODER[ENC_R].speed(), EQ_6_MIN, EQ_6_MAX); } } - lcd_display_meter_float("EQ 7000Hz [dB]", configuration.fx.eq_6, 0.1, 0.0, EQ_6_MIN, EQ_6_MAX, 1, 1, false, true, true); + display_meter_float("EQ 7000Hz [dB]", configuration.fx.eq_6, 0.1, 0.0, EQ_6_MIN, EQ_6_MAX, 1, 1, false, true, true); sgtl5000.setEQGain(6, mapfloat(configuration.fx.eq_6, EQ_6_MIN, EQ_6_MAX, -9.9, 9.9)); sgtl5000.commitFilter(6); #ifdef DEBUG @@ -8971,7 +8971,7 @@ void UI_func_eq_7(uint8_t param) configuration.fx.eq_7 = constrain(configuration.fx.eq_7 - ENCODER[ENC_R].speed(), EQ_7_MIN, EQ_7_MAX); } } - lcd_display_meter_float("EQ High-Cut[kHz]", configuration.fx.eq_7, 1.0, 0.0, EQ_7_MIN, EQ_7_MAX, 3, 1, false, false, true); + display_meter_float("EQ High-Cut[kHz]", configuration.fx.eq_7, 1.0, 0.0, EQ_7_MIN, EQ_7_MAX, 3, 1, false, false, true); sgtl5000.setEQFc(7, float(configuration.fx.eq_7) * 1000.0); sgtl5000.commitFilter(7); #ifdef DEBUG @@ -9262,12 +9262,12 @@ uint8_t search_accepted_char(uint8_t c) return (0); } -void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) +void display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) { - lcd_display_float(float(var), size, 0, zeros, brackets, sign); + display_float(float(var), size, 0, zeros, brackets, sign); } -void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign) +void display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign) { char s[LCD_cols + 1]; char f[LCD_cols + 1]; @@ -9314,12 +9314,12 @@ void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bo display.print(s); } -inline void lcd_display_bar_int(const char* title, uint32_t value, float factor, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init) +inline void display_bar_int(const char* title, uint32_t value, float factor, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init) { - lcd_display_bar_float(title, float(value), factor, min_value, max_value, size, 0, zeros, sign, init); + display_bar_float(title, float(value), factor, min_value, max_value, size, 0, zeros, sign, init); } -void lcd_display_bar_float(const char* title, float value, float factor, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init) +void display_bar_float(const char* title, float value, float factor, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init) { uint8_t size; float v; @@ -9348,7 +9348,7 @@ void lcd_display_bar_float(const char* title, float value, float factor, int32_t // Value display.setCursor(LCD_cols - size, 1); - lcd_display_float(value * factor, size_number, size_fraction, zeros, false, sign); // TBD + display_float(value * factor, size_number, size_fraction, zeros, false, sign); // TBD // Bar display.setCursor(0, 1); @@ -9370,12 +9370,12 @@ void lcd_display_bar_float(const char* title, float value, float factor, int32_t } } -inline void lcd_display_meter_int(const char* title, uint32_t value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init) +inline void display_meter_int(const char* title, uint32_t value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size, bool zeros, bool sign, bool init) { - lcd_display_meter_float(title, float(value), factor, offset, min_value, max_value, size, 0, zeros, sign, init); + display_meter_float(title, float(value), factor, offset, min_value, max_value, size, 0, zeros, sign, init); } -void lcd_display_meter_float(const char* title, float value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init) +void display_meter_float(const char* title, float value, float factor, float offset, int32_t min_value, int32_t max_value, uint8_t size_number, uint8_t size_fraction, bool zeros, bool sign, bool init) { uint8_t size = 0; float v; @@ -9403,7 +9403,7 @@ void lcd_display_meter_float(const char* title, float value, float factor, float // Value display.setCursor(LCD_cols - size, 1); - lcd_display_float((value + offset) * factor, size_number, size_fraction, zeros, false, sign); + display_float((value + offset) * factor, size_number, size_fraction, zeros, false, sign); // Bar display.setCursor(0, 1); diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 357280f..b1fdf5e 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -1307,8 +1307,8 @@ bool save_sd_seq_sub_patterns_json(uint8_t number) Serial.print(F(" to ")); Serial.println(filename); #endif - int total = sizeof(seq.data); - int columns = sizeof(seq.data[0]); + int total = sizeof(seq.note_data); + int columns = sizeof(seq.note_data[0]); int rows = total / columns; AudioNoInterrupts(); SD.begin(); @@ -1319,7 +1319,7 @@ bool save_sd_seq_sub_patterns_json(uint8_t number) for (uint8_t i = 0; i < rows; i++) { for (uint8_t j = 0; j < columns; j++) { - data_json["seq_data"][count] = seq.data[i][j]; + data_json["seq_data"][count] = seq.note_data[i][j]; count++; } } @@ -1665,15 +1665,15 @@ bool load_sd_seq_sub_patterns_json(uint8_t number) serializeJsonPretty(data_json, Serial); Serial.println(); #endif - int total = sizeof(seq.data); - int columns = sizeof(seq.data[0]); + int total = sizeof(seq.note_data); + int columns = sizeof(seq.note_data[0]); int rows = total / columns; int count = 0; for (uint8_t i = 0; i < rows; i++) { for (uint8_t j = 0; j < columns; j++) { - seq.data[i][j] = data_json["seq_data"][count]; + seq.note_data[i][j] = data_json["seq_data"][count]; count++; } } diff --git a/sequencer.cpp b/sequencer.cpp index 8a45b2e..0087399 100644 --- a/sequencer.cpp +++ b/sequencer.cpp @@ -50,7 +50,7 @@ void seq_live_recording(void) //record to sequencer if sequencer menu is active and recording is active if (seq.note_in > 0 && seq.recording == true && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor)) { - seq.data[seq.active_track][seq.step] = seq.note_in; + seq.note_data[seq.active_track][seq.step] = seq.note_in; if ( get_sample_note(activesample) > 209 ) // pitched sample { seq.vel[seq.active_track][seq.step] = get_sample_note(activesample); @@ -65,8 +65,8 @@ void seq_live_recording(void) void sequencer_part1(void) { //if (seq.note_in > 0 && seq.note_in < 62 && seq.recording == false ) { - //handleNoteOff(configuration.dexed[0].midi_channel, seq.data[3][seq.step] + seq.transpose , 0); - //handleNoteOff(configuration.dexed[0].midi_channel, seq.data[3][seq.step - 1] + seq.transpose , 0); + //handleNoteOff(configuration.dexed[0].midi_channel, seq.note_data[3][seq.step] + seq.transpose , 0); + //handleNoteOff(configuration.dexed[0].midi_channel, seq.note_data[3][seq.step - 1] + seq.transpose , 0); //if (seq.note_in>65)seq.note_in=seq.note_in-12; //seq.transpose = seq.note_in % 12 ; //seq.transpose=seq.transpose-12; @@ -80,27 +80,27 @@ void sequencer_part1(void) { if ( seq.track_type[d] == 0) { // drum track (drum samples and pitched one-shot samples) - if (seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] > 0 ) + if (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] > 0 ) { if (seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] > 209) // it is a pitched sample { // Drum[slot]->setPlaybackRate( pow (2, (inNote - 72) / 12.00) * drum_config[sample].pitch ); get_sample_vol_max(sample) - set_sample_pitch(seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 , (float)pow (2, (seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 72) / 12.00) * get_sample_p_offset( seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 ) ); + set_sample_pitch(seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 , (float)pow (2, (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 72) / 12.00) * get_sample_p_offset( seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 ) ); handleNoteOn(drum_midi_channel, seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , 90 ); } else // else play normal drum sample - handleNoteOn(drum_midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); + handleNoteOn(drum_midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); } } else { - if (seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] > 0 ) // instrument track + if (seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] > 0 ) // instrument track { if (seq.track_type[d] == 1 || (seq.track_type[d] == 3 && seq.arp_play_basenote) ) { - if (seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] != 130 ) + if (seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] != 130 ) { - handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); - seq.prev_note[d] = seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; + handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); + seq.prev_note[d] = seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; seq.prev_vel[d] = seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; } } @@ -109,20 +109,20 @@ void sequencer_part1(void) if (seq.vel[ seq.patternchain[seq.chain_active_step][d]][seq.step] > 199) { - //handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.chord_velocity); // basenote + //handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.chord_velocity); // basenote for (uint8_t x = seq.element_shift; x < seq.element_shift + seq.chord_key_ammount; x++) //play chord notes { - handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12) + seq.arps[seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200][x], seq.chord_velocity); + handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12) + seq.arps[seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200][x], seq.chord_velocity); } - seq.prev_note[d] = seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] + (seq.oct_shift * 12); + seq.prev_note[d] = seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] + (seq.oct_shift * 12); seq.prev_vel[d] = seq.vel[seq.patternchain[seq.chain_active_step][d]][seq.step]; } } if (seq.track_type[d] == 3) { //Arp seq.arp_step = 0; seq.arp_counter = 0; - seq.arp_note = seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12); + seq.arp_note = seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12); seq.arp_chord = seq.vel[seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200; } } @@ -218,7 +218,7 @@ void sequencer_part2(void) if (seq.noteoffsent[d] == false) { if ( seq.prev_note[d] > 0 && seq.track_type[d] > 0) { - if (seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] != 130) + if (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] != 130) { handleNoteOff(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.prev_note[d] , 0); seq.noteoffsent[d] = true; diff --git a/sequencer.h b/sequencer.h index 351fbdd..1287471 100644 --- a/sequencer.h +++ b/sequencer.h @@ -95,7 +95,7 @@ typedef struct sequencer_s uint8_t arp_counter = 0; uint8_t arp_lenght = 8; uint8_t data_buffer[16] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }; - uint8_t data[NUM_SEQ_PATTERN][16] = { + uint8_t note_data[NUM_SEQ_PATTERN][16] = { { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },