From 974e8f897e8bd74a55ec3db1724529488ee1964d Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 4 Jul 2024 11:01:04 +0200 Subject: [PATCH] Moving several functions to FLASHMEM. --- MicroDexed.ino | 8 +- UI.hpp | 508 +++++++++++++++++++-------------------- control_sgtl5000plus.cpp | 16 +- control_sgtl5000plus.h | 16 +- 4 files changed, 274 insertions(+), 274 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index f8e676a..8c36612 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1180,7 +1180,7 @@ void handleControlChange(uint8_t inChannel, uint8_t inCtrl, uint8_t inValue) { break; case 103: // CC 103: filter resonance configuration.fx.filter_resonance[instance_id] = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX); - MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); + //MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_resonance)) { LCDML.OTHER_updateFunc(); LCDML.loop_menu(); @@ -1188,7 +1188,7 @@ void handleControlChange(uint8_t inChannel, uint8_t inCtrl, uint8_t inValue) { break; case 104: // CC 104: filter cutoff configuration.fx.filter_cutoff[instance_id] = map(inValue, 0, 0x7f, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX); - MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); + //MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); ; if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_cutoff)) { LCDML.OTHER_updateFunc(); @@ -2046,8 +2046,8 @@ void set_fx_params(void) { reverb_mixer_l.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); // DEXED FILTER - MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); - MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); + //MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); + //MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); MicroDexed[instance_id]->doRefreshVoice(); } diff --git a/UI.hpp b/UI.hpp index 59f9cb4..afe9caa 100644 --- a/UI.hpp +++ b/UI.hpp @@ -223,132 +223,132 @@ enum { MENU_VOICE_BANK, MENU_VOICE_SOUND }; -void lcdml_menu_display(void); -void lcdml_menu_clear(void); -void lcdml_menu_control(void); -void UI_func_reverb_roomsize(uint8_t param); -void UI_func_reverb_damping(uint8_t param); -void UI_func_reverb_lowpass(uint8_t param); -void UI_func_reverb_lodamp(uint8_t param); -void UI_func_reverb_hidamp(uint8_t param); -void UI_func_reverb_diffusion(uint8_t param); -void UI_func_reverb_level(uint8_t param); -void UI_func_chorus_frequency(uint8_t param); -void UI_func_chorus_waveform(uint8_t param); -void UI_func_chorus_depth(uint8_t param); -void UI_func_chorus_level(uint8_t param); -void UI_func_delay_time(uint8_t param); -void UI_func_delay_feedback(uint8_t param); -void UI_func_delay_level(uint8_t param); -void UI_func_reverb_send(uint8_t param); -void UI_func_filter_cutoff(uint8_t param); -void UI_func_filter_resonance(uint8_t param); -void UI_func_drum_reverb_send(uint8_t param); -void UI_func_transpose(uint8_t param); -void UI_func_tune(uint8_t param); -void UI_func_midi_channel(uint8_t param); -void UI_func_lowest_note(uint8_t param); -void UI_func_highest_note(uint8_t param); -void UI_func_sound_intensity(uint8_t param); -void UI_func_panorama(uint8_t param); -void UI_func_stereo_mono(uint8_t param); -void UI_func_note_refresh(uint8_t param); -void UI_func_polyphony(uint8_t param); -void UI_func_mono_poly(uint8_t param); -void UI_func_pb_range(uint8_t param); -void UI_func_pb_step(uint8_t param); -void UI_func_mw_range(uint8_t param); -void UI_func_mw_assign(uint8_t param); -void UI_func_mw_mode(uint8_t param); -void UI_func_fc_range(uint8_t param); -void UI_func_fc_assign(uint8_t param); -void UI_func_fc_mode(uint8_t param); -void UI_func_bc_range(uint8_t param); -void UI_func_bc_assign(uint8_t param); -void UI_func_bc_mode(uint8_t param); -void UI_func_at_range(uint8_t param); -void UI_func_at_assign(uint8_t param); -void UI_func_at_mode(uint8_t param); -void UI_func_portamento_mode(uint8_t param); -void UI_func_portamento_glissando(uint8_t param); -void UI_func_portamento_time(uint8_t param); -void UI_handle_OP(uint8_t param); -void UI_func_information(uint8_t param); -void UI_func_set_performance_name(uint8_t param); -void UI_func_volume(uint8_t param); -void UI_func_smart_filter(uint8_t param); -void UI_func_load_performance(uint8_t param); -void UI_func_save_performance(uint8_t param); -void UI_func_save_voice(uint8_t param); -void UI_func_midi_soft_thru(uint8_t param); -void UI_func_velocity_level(uint8_t param); -void UI_func_engine(uint8_t param); -void UI_func_voice_select(uint8_t param); -void UI_func_sysex_send_voice(uint8_t param); -void UI_func_sysex_receive_bank(uint8_t param); -void UI_func_sysex_send_bank(uint8_t param); -void UI_func_eq_1(uint8_t param); -void UI_func_eq_2(uint8_t param); -void UI_func_eq_3(uint8_t param); -void UI_func_eq_4(uint8_t param); -void UI_func_eq_5(uint8_t param); -void UI_func_eq_6(uint8_t param); -void UI_func_eq_7(uint8_t param); -void UI_func_startup(uint8_t param); -void UI_function_not_enabled(void); -void UI_function_not_implemented(uint8_t param); -void UI_func_favorites(uint8_t param); -void UI_func_epiano_sound_intensity(uint8_t param); -void UI_func_epiano_panorama(uint8_t param); -void UI_func_epiano_decay(uint8_t param); -void UI_func_epiano_release(uint8_t param); -void UI_func_epiano_hardness(uint8_t param); -void UI_func_epiano_treble(uint8_t param); -void UI_func_epiano_stereo(uint8_t param); -void UI_func_epiano_tune(uint8_t param); -void UI_func_epiano_detune(uint8_t param); -void UI_func_epiano_pan_tremolo(uint8_t param); -void UI_func_epiano_pan_lfo(uint8_t param); -void UI_func_epiano_overdrive(uint8_t param); -void UI_func_epiano_reverb_send(uint8_t param); -void UI_func_epiano_midi_channel(uint8_t param); -void UI_func_epiano_lowest_note(uint8_t param); -void UI_func_epiano_highest_note(uint8_t param); -void UI_func_epiano_transpose(uint8_t param); -void UI_func_epiano_polyphony(uint8_t param); -void UI_func_epiano_velocity_sense(uint8_t param); -void UI_func_epiano_chorus_frequency(uint8_t param); -void UI_func_epiano_chorus_waveform(uint8_t param); -void UI_func_epiano_chorus_depth(uint8_t param); -void UI_func_epiano_chorus_level(uint8_t param); -void UI_func_drum_midi_channel(uint8_t param); -void UI_func_drum_main_volume(uint8_t param); -void UI_func_drum_vol_min_max(uint8_t param); -void UI_func_drum_pan(uint8_t param); -void UI_func_drum_pitch(uint8_t param); -void UI_func_drum_midi_note(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 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); -void string_trim(char* s); -void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id); -void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id); -bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id); -bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id); -void locate_previous_non_favorite(); -void locate_previous_favorite(); -void locate_next_favorite(); -void locate_next_non_favorite(); -void locate_random_non_favorite(); +FLASHMEM void lcdml_menu_display(void); +FLASHMEM void lcdml_menu_clear(void); +FLASHMEM void lcdml_menu_control(void); +FLASHMEM void UI_func_reverb_roomsize(uint8_t param); +FLASHMEM void UI_func_reverb_damping(uint8_t param); +FLASHMEM void UI_func_reverb_lowpass(uint8_t param); +FLASHMEM void UI_func_reverb_lodamp(uint8_t param); +FLASHMEM void UI_func_reverb_hidamp(uint8_t param); +FLASHMEM void UI_func_reverb_diffusion(uint8_t param); +FLASHMEM void UI_func_reverb_level(uint8_t param); +FLASHMEM void UI_func_chorus_frequency(uint8_t param); +FLASHMEM void UI_func_chorus_waveform(uint8_t param); +FLASHMEM void UI_func_chorus_depth(uint8_t param); +FLASHMEM void UI_func_chorus_level(uint8_t param); +FLASHMEM void UI_func_delay_time(uint8_t param); +FLASHMEM void UI_func_delay_feedback(uint8_t param); +FLASHMEM void UI_func_delay_level(uint8_t param); +FLASHMEM void UI_func_reverb_send(uint8_t param); +FLASHMEM void UI_func_filter_cutoff(uint8_t param); +FLASHMEM void UI_func_filter_resonance(uint8_t param); +FLASHMEM void UI_func_drum_reverb_send(uint8_t param); +FLASHMEM void UI_func_transpose(uint8_t param); +FLASHMEM void UI_func_tune(uint8_t param); +FLASHMEM void UI_func_midi_channel(uint8_t param); +FLASHMEM void UI_func_lowest_note(uint8_t param); +FLASHMEM void UI_func_highest_note(uint8_t param); +FLASHMEM void UI_func_sound_intensity(uint8_t param); +FLASHMEM void UI_func_panorama(uint8_t param); +FLASHMEM void UI_func_stereo_mono(uint8_t param); +FLASHMEM void UI_func_note_refresh(uint8_t param); +FLASHMEM void UI_func_polyphony(uint8_t param); +FLASHMEM void UI_func_mono_poly(uint8_t param); +FLASHMEM void UI_func_pb_range(uint8_t param); +FLASHMEM void UI_func_pb_step(uint8_t param); +FLASHMEM void UI_func_mw_range(uint8_t param); +FLASHMEM void UI_func_mw_assign(uint8_t param); +FLASHMEM void UI_func_mw_mode(uint8_t param); +FLASHMEM void UI_func_fc_range(uint8_t param); +FLASHMEM void UI_func_fc_assign(uint8_t param); +FLASHMEM void UI_func_fc_mode(uint8_t param); +FLASHMEM void UI_func_bc_range(uint8_t param); +FLASHMEM void UI_func_bc_assign(uint8_t param); +FLASHMEM void UI_func_bc_mode(uint8_t param); +FLASHMEM void UI_func_at_range(uint8_t param); +FLASHMEM void UI_func_at_assign(uint8_t param); +FLASHMEM void UI_func_at_mode(uint8_t param); +FLASHMEM void UI_func_portamento_mode(uint8_t param); +FLASHMEM void UI_func_portamento_glissando(uint8_t param); +FLASHMEM void UI_func_portamento_time(uint8_t param); +FLASHMEM void UI_handle_OP(uint8_t param); +FLASHMEM void UI_func_information(uint8_t param); +FLASHMEM void UI_func_set_performance_name(uint8_t param); +FLASHMEM void UI_func_volume(uint8_t param); +FLASHMEM void UI_func_smart_filter(uint8_t param); +FLASHMEM void UI_func_load_performance(uint8_t param); +FLASHMEM void UI_func_save_performance(uint8_t param); +FLASHMEM void UI_func_save_voice(uint8_t param); +FLASHMEM void UI_func_midi_soft_thru(uint8_t param); +FLASHMEM void UI_func_velocity_level(uint8_t param); +FLASHMEM void UI_func_engine(uint8_t param); +FLASHMEM void UI_func_voice_select(uint8_t param); +FLASHMEM void UI_func_sysex_send_voice(uint8_t param); +FLASHMEM void UI_func_sysex_receive_bank(uint8_t param); +FLASHMEM void UI_func_sysex_send_bank(uint8_t param); +FLASHMEM void UI_func_eq_1(uint8_t param); +FLASHMEM void UI_func_eq_2(uint8_t param); +FLASHMEM void UI_func_eq_3(uint8_t param); +FLASHMEM void UI_func_eq_4(uint8_t param); +FLASHMEM void UI_func_eq_5(uint8_t param); +FLASHMEM void UI_func_eq_6(uint8_t param); +FLASHMEM void UI_func_eq_7(uint8_t param); +FLASHMEM void UI_func_startup(uint8_t param); +FLASHMEM void UI_function_not_enabled(void); +FLASHMEM void UI_function_not_implemented(uint8_t param); +FLASHMEM void UI_func_favorites(uint8_t param); +FLASHMEM void UI_func_epiano_sound_intensity(uint8_t param); +FLASHMEM void UI_func_epiano_panorama(uint8_t param); +FLASHMEM void UI_func_epiano_decay(uint8_t param); +FLASHMEM void UI_func_epiano_release(uint8_t param); +FLASHMEM void UI_func_epiano_hardness(uint8_t param); +FLASHMEM void UI_func_epiano_treble(uint8_t param); +FLASHMEM void UI_func_epiano_stereo(uint8_t param); +FLASHMEM void UI_func_epiano_tune(uint8_t param); +FLASHMEM void UI_func_epiano_detune(uint8_t param); +FLASHMEM void UI_func_epiano_pan_tremolo(uint8_t param); +FLASHMEM void UI_func_epiano_pan_lfo(uint8_t param); +FLASHMEM void UI_func_epiano_overdrive(uint8_t param); +FLASHMEM void UI_func_epiano_reverb_send(uint8_t param); +FLASHMEM void UI_func_epiano_midi_channel(uint8_t param); +FLASHMEM void UI_func_epiano_lowest_note(uint8_t param); +FLASHMEM void UI_func_epiano_highest_note(uint8_t param); +FLASHMEM void UI_func_epiano_transpose(uint8_t param); +FLASHMEM void UI_func_epiano_polyphony(uint8_t param); +FLASHMEM void UI_func_epiano_velocity_sense(uint8_t param); +FLASHMEM void UI_func_epiano_chorus_frequency(uint8_t param); +FLASHMEM void UI_func_epiano_chorus_waveform(uint8_t param); +FLASHMEM void UI_func_epiano_chorus_depth(uint8_t param); +FLASHMEM void UI_func_epiano_chorus_level(uint8_t param); +FLASHMEM void UI_func_drum_midi_channel(uint8_t param); +FLASHMEM void UI_func_drum_main_volume(uint8_t param); +FLASHMEM void UI_func_drum_vol_min_max(uint8_t param); +FLASHMEM void UI_func_drum_pan(uint8_t param); +FLASHMEM void UI_func_drum_pitch(uint8_t param); +FLASHMEM void UI_func_drum_midi_note(uint8_t param); +FLASHMEM void UI_update_instance_icons(); +FLASHMEM bool UI_select_name(uint8_t y, uint8_t x, char* edit_string, uint8_t len, bool init); +FLASHMEM uint8_t search_accepted_char(uint8_t c); +FLASHMEM void display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign); +FLASHMEM void display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign); +FLASHMEM 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); +FLASHMEM 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); +FLASHMEM 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); +FLASHMEM 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); +FLASHMEM void lcd_active_instance_number(uint8_t instance_id); +FLASHMEM void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op); +FLASHMEM void lcd_special_chars(uint8_t mode); +FLASHMEM void string_trim(char* s); +FLASHMEM void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id); +FLASHMEM void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id); +FLASHMEM bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id); +FLASHMEM bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id); +FLASHMEM void locate_previous_non_favorite(); +FLASHMEM void locate_previous_favorite(); +FLASHMEM void locate_next_favorite(); +FLASHMEM void locate_next_non_favorite(); +FLASHMEM void locate_random_non_favorite(); char* basename(const char* filename); char* strip_extension(char* filename); @@ -549,7 +549,7 @@ uint8_t get_current_cursor_id(void) { return (0); } -void lcdml_menu_control(void) { +FLASHMEM void lcdml_menu_control(void) { // If something must init, put in in the setup condition if (LCDML.BT_setup()) { pinMode(BUT_R_PIN, INPUT_PULLUP); @@ -782,12 +782,12 @@ void lcdml_menu_control(void) { /*********************************************************************** MENU DISPLAY ***********************************************************************/ -void lcdml_menu_clear(void) { +FLASHMEM void lcdml_menu_clear(void) { display.clear(); display.setCursor(0, 0); } -void lcdml_menu_display(void) { +FLASHMEM void lcdml_menu_display(void) { // update content // *************** if (LCDML.DISP_checkMenuUpdate()) { @@ -912,7 +912,7 @@ void lcdml_menu_display(void) { MENU ***********************************************************************/ -void UI_func_reverb_roomsize(uint8_t param) { +FLASHMEM void UI_func_reverb_roomsize(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -941,7 +941,7 @@ void UI_func_reverb_roomsize(uint8_t param) { } } -void UI_func_reverb_lowpass(uint8_t param) { +FLASHMEM void UI_func_reverb_lowpass(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -971,7 +971,7 @@ void UI_func_reverb_lowpass(uint8_t param) { } } -void UI_func_reverb_lodamp(uint8_t param) { +FLASHMEM void UI_func_reverb_lodamp(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1001,7 +1001,7 @@ void UI_func_reverb_lodamp(uint8_t param) { } } -void UI_func_reverb_hidamp(uint8_t param) { +FLASHMEM void UI_func_reverb_hidamp(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1031,7 +1031,7 @@ void UI_func_reverb_hidamp(uint8_t param) { } } -void UI_func_reverb_diffusion(uint8_t param) { +FLASHMEM void UI_func_reverb_diffusion(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1061,7 +1061,7 @@ void UI_func_reverb_diffusion(uint8_t param) { } } -void UI_func_reverb_level(uint8_t param) { +FLASHMEM void UI_func_reverb_level(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1094,7 +1094,7 @@ void UI_func_reverb_level(uint8_t param) { } } -void UI_func_chorus_frequency(uint8_t param) { +FLASHMEM void UI_func_chorus_frequency(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1133,7 +1133,7 @@ void UI_func_chorus_frequency(uint8_t param) { } } -void UI_func_chorus_waveform(uint8_t param) { +FLASHMEM void UI_func_chorus_waveform(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1183,7 +1183,7 @@ void UI_func_chorus_waveform(uint8_t param) { } } -void UI_func_chorus_depth(uint8_t param) { +FLASHMEM void UI_func_chorus_depth(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1223,7 +1223,7 @@ void UI_func_chorus_depth(uint8_t param) { } } -void UI_func_chorus_level(uint8_t param) { +FLASHMEM void UI_func_chorus_level(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1269,7 +1269,7 @@ void UI_func_chorus_level(uint8_t param) { } } -void UI_func_delay_time(uint8_t param) { +FLASHMEM void UI_func_delay_time(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1325,7 +1325,7 @@ void UI_func_delay_time(uint8_t param) { } } -void UI_func_delay_feedback(uint8_t param) { +FLASHMEM void UI_func_delay_feedback(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1368,7 +1368,7 @@ void UI_func_delay_feedback(uint8_t param) { } } -void UI_func_delay_level(uint8_t param) { +FLASHMEM void UI_func_delay_level(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1411,7 +1411,7 @@ void UI_func_delay_level(uint8_t param) { } } -void UI_func_reverb_send(uint8_t param) { +FLASHMEM void UI_func_reverb_send(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1455,7 +1455,7 @@ void UI_func_reverb_send(uint8_t param) { } } -void UI_func_filter_cutoff(uint8_t param) { +FLASHMEM void UI_func_filter_cutoff(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1488,7 +1488,7 @@ void UI_func_filter_cutoff(uint8_t param) { 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)); + //MicroDexed[selected_instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[selected_instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0)); } if (LCDML.FUNC_close()) // ****** STABLE END ********* @@ -1498,7 +1498,7 @@ void UI_func_filter_cutoff(uint8_t param) { } } -void UI_func_filter_resonance(uint8_t param) { +FLASHMEM void UI_func_filter_resonance(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1531,7 +1531,7 @@ void UI_func_filter_resonance(uint8_t param) { 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)); + //MicroDexed[selected_instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[selected_instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0)); } if (LCDML.FUNC_close()) // ****** STABLE END ********* @@ -1541,7 +1541,7 @@ void UI_func_filter_resonance(uint8_t param) { } } -void UI_func_transpose(uint8_t param) { +FLASHMEM void UI_func_transpose(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1583,7 +1583,7 @@ void UI_func_transpose(uint8_t param) { } } -void UI_func_tune(uint8_t param) { +FLASHMEM void UI_func_tune(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1627,7 +1627,7 @@ void UI_func_tune(uint8_t param) { } } -void UI_func_midi_channel(uint8_t param) { +FLASHMEM void UI_func_midi_channel(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1668,7 +1668,7 @@ void UI_func_midi_channel(uint8_t param) { } } -void getNoteName(char* noteName, uint8_t noteNumber) { +FLASHMEM void getNoteName(char* noteName, uint8_t noteNumber) { char notes[12][3] = { "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" }; uint8_t oct_index = noteNumber - 12; @@ -1676,7 +1676,7 @@ void getNoteName(char* noteName, uint8_t noteNumber) { snprintf_P(noteName, sizeof(noteName), PSTR("%2S%1d"), notes[noteNumber % 12], oct_index / 12); } -void UI_func_lowest_note(uint8_t param) { +FLASHMEM void UI_func_lowest_note(uint8_t param) { char note_name[4]; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -1726,7 +1726,7 @@ void UI_func_lowest_note(uint8_t param) { } } -void UI_func_highest_note(uint8_t param) { +FLASHMEM void UI_func_highest_note(uint8_t param) { char note_name[4]; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -1775,7 +1775,7 @@ void UI_func_highest_note(uint8_t param) { } } -void UI_func_sound_intensity(uint8_t param) { +FLASHMEM void UI_func_sound_intensity(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1820,7 +1820,7 @@ void UI_func_sound_intensity(uint8_t param) { } } -void UI_func_panorama(uint8_t param) { +FLASHMEM void UI_func_panorama(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1869,7 +1869,7 @@ void UI_func_panorama(uint8_t param) { } } -void UI_func_favorites(uint8_t param) { +FLASHMEM void UI_func_favorites(uint8_t param) { static uint8_t old_favorites; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -1931,7 +1931,7 @@ void UI_func_favorites(uint8_t param) { } } -void UI_func_epiano_midi_channel(uint8_t param) { +FLASHMEM void UI_func_epiano_midi_channel(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -1962,7 +1962,7 @@ void UI_func_epiano_midi_channel(uint8_t param) { } } -void UI_func_epiano_lowest_note(uint8_t param) { +FLASHMEM void UI_func_epiano_lowest_note(uint8_t param) { char note_name[4]; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -2001,7 +2001,7 @@ void UI_func_epiano_lowest_note(uint8_t param) { } } -void UI_func_epiano_highest_note(uint8_t param) { +FLASHMEM void UI_func_epiano_highest_note(uint8_t param) { char note_name[4]; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -2040,7 +2040,7 @@ void UI_func_epiano_highest_note(uint8_t param) { } } -void UI_func_epiano_sound_intensity(uint8_t param) { +FLASHMEM void UI_func_epiano_sound_intensity(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2074,7 +2074,7 @@ void UI_func_epiano_sound_intensity(uint8_t param) { } } -void UI_func_epiano_panorama(uint8_t param) { +FLASHMEM void UI_func_epiano_panorama(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2114,7 +2114,7 @@ void UI_func_epiano_panorama(uint8_t param) { } } -void UI_func_epiano_decay(uint8_t param) { +FLASHMEM void UI_func_epiano_decay(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2146,7 +2146,7 @@ void UI_func_epiano_decay(uint8_t param) { } } -void UI_func_epiano_release(uint8_t param) { +FLASHMEM void UI_func_epiano_release(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2178,7 +2178,7 @@ void UI_func_epiano_release(uint8_t param) { } } -void UI_func_epiano_hardness(uint8_t param) { +FLASHMEM void UI_func_epiano_hardness(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2210,7 +2210,7 @@ void UI_func_epiano_hardness(uint8_t param) { } } -void UI_func_epiano_treble(uint8_t param) { +FLASHMEM void UI_func_epiano_treble(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2242,7 +2242,7 @@ void UI_func_epiano_treble(uint8_t param) { } } -void UI_func_epiano_stereo(uint8_t param) { +FLASHMEM void UI_func_epiano_stereo(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2274,7 +2274,7 @@ void UI_func_epiano_stereo(uint8_t param) { } } -void UI_func_epiano_tune(uint8_t param) { +FLASHMEM void UI_func_epiano_tune(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2306,7 +2306,7 @@ void UI_func_epiano_tune(uint8_t param) { } } -void UI_func_epiano_detune(uint8_t param) { +FLASHMEM void UI_func_epiano_detune(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2338,7 +2338,7 @@ void UI_func_epiano_detune(uint8_t param) { } } -void UI_func_epiano_pan_tremolo(uint8_t param) { +FLASHMEM void UI_func_epiano_pan_tremolo(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2373,7 +2373,7 @@ void UI_func_epiano_pan_tremolo(uint8_t param) { } } -void UI_func_epiano_pan_lfo(uint8_t param) { +FLASHMEM void UI_func_epiano_pan_lfo(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2408,7 +2408,7 @@ void UI_func_epiano_pan_lfo(uint8_t param) { } } -void UI_func_epiano_overdrive(uint8_t param) { +FLASHMEM void UI_func_epiano_overdrive(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2440,7 +2440,7 @@ void UI_func_epiano_overdrive(uint8_t param) { } } -void UI_func_epiano_transpose(uint8_t param) { +FLASHMEM void UI_func_epiano_transpose(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2468,7 +2468,7 @@ void UI_func_epiano_transpose(uint8_t param) { } } -void UI_func_epiano_polyphony(uint8_t param) { +FLASHMEM void UI_func_epiano_polyphony(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2502,7 +2502,7 @@ void UI_func_epiano_polyphony(uint8_t param) { } } -void UI_func_epiano_velocity_sense(uint8_t param) { +FLASHMEM void UI_func_epiano_velocity_sense(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2534,7 +2534,7 @@ void UI_func_epiano_velocity_sense(uint8_t param) { } } -void UI_func_epiano_reverb_send(uint8_t param) { +FLASHMEM void UI_func_epiano_reverb_send(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2568,7 +2568,7 @@ void UI_func_epiano_reverb_send(uint8_t param) { } } -void UI_func_epiano_chorus_frequency(uint8_t param) { +FLASHMEM void UI_func_epiano_chorus_frequency(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2596,7 +2596,7 @@ void UI_func_epiano_chorus_frequency(uint8_t param) { } } -void UI_func_epiano_chorus_waveform(uint8_t param) { +FLASHMEM void UI_func_epiano_chorus_waveform(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2636,7 +2636,7 @@ void UI_func_epiano_chorus_waveform(uint8_t param) { } } -void UI_func_epiano_chorus_depth(uint8_t param) { +FLASHMEM void UI_func_epiano_chorus_depth(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2665,7 +2665,7 @@ void UI_func_epiano_chorus_depth(uint8_t param) { } } -void UI_func_epiano_chorus_level(uint8_t param) { +FLASHMEM void UI_func_epiano_chorus_level(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2698,7 +2698,7 @@ void UI_func_epiano_chorus_level(uint8_t param) { } } -void UI_func_stereo_mono(uint8_t param) { +FLASHMEM void UI_func_stereo_mono(uint8_t param) { static uint8_t old_mono; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -2770,7 +2770,7 @@ void UI_func_stereo_mono(uint8_t param) { } } -void UI_func_polyphony(uint8_t param) { +FLASHMEM void UI_func_polyphony(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2831,7 +2831,7 @@ void UI_func_polyphony(uint8_t param) { } } -void UI_func_mono_poly(uint8_t param) { +FLASHMEM void UI_func_mono_poly(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2881,7 +2881,7 @@ void UI_func_mono_poly(uint8_t param) { } } -void UI_func_note_refresh(uint8_t param) { +FLASHMEM void UI_func_note_refresh(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2932,7 +2932,7 @@ void UI_func_note_refresh(uint8_t param) { } } -void UI_func_pb_range(uint8_t param) { +FLASHMEM void UI_func_pb_range(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -2973,7 +2973,7 @@ void UI_func_pb_range(uint8_t param) { } } -void UI_func_pb_step(uint8_t param) { +FLASHMEM void UI_func_pb_step(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3014,7 +3014,7 @@ void UI_func_pb_step(uint8_t param) { } } -void UI_func_mw_range(uint8_t param) { +FLASHMEM void UI_func_mw_range(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3055,7 +3055,7 @@ void UI_func_mw_range(uint8_t param) { } } -void UI_func_mw_assign(uint8_t param) { +FLASHMEM void UI_func_mw_assign(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3122,7 +3122,7 @@ void UI_func_mw_assign(uint8_t param) { } } -void UI_func_mw_mode(uint8_t param) { +FLASHMEM void UI_func_mw_mode(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3174,7 +3174,7 @@ void UI_func_mw_mode(uint8_t param) { } } -void UI_func_fc_range(uint8_t param) { +FLASHMEM void UI_func_fc_range(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3215,7 +3215,7 @@ void UI_func_fc_range(uint8_t param) { } } -void UI_func_fc_assign(uint8_t param) { +FLASHMEM void UI_func_fc_assign(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3282,7 +3282,7 @@ void UI_func_fc_assign(uint8_t param) { } } -void UI_func_fc_mode(uint8_t param) { +FLASHMEM void UI_func_fc_mode(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3334,7 +3334,7 @@ void UI_func_fc_mode(uint8_t param) { } } -void UI_func_bc_range(uint8_t param) { +FLASHMEM void UI_func_bc_range(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3375,7 +3375,7 @@ void UI_func_bc_range(uint8_t param) { } } -void UI_func_bc_assign(uint8_t param) { +FLASHMEM void UI_func_bc_assign(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3442,7 +3442,7 @@ void UI_func_bc_assign(uint8_t param) { } } -void UI_func_bc_mode(uint8_t param) { +FLASHMEM void UI_func_bc_mode(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3494,7 +3494,7 @@ void UI_func_bc_mode(uint8_t param) { } } -void UI_func_at_range(uint8_t param) { +FLASHMEM void UI_func_at_range(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3535,7 +3535,7 @@ void UI_func_at_range(uint8_t param) { } } -void UI_func_at_assign(uint8_t param) { +FLASHMEM void UI_func_at_assign(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3602,7 +3602,7 @@ void UI_func_at_assign(uint8_t param) { } } -void UI_func_at_mode(uint8_t param) { +FLASHMEM void UI_func_at_mode(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3654,7 +3654,7 @@ void UI_func_at_mode(uint8_t param) { } } -void UI_func_portamento_mode(uint8_t param) { +FLASHMEM void UI_func_portamento_mode(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3709,7 +3709,7 @@ void UI_func_portamento_mode(uint8_t param) { } } -void UI_func_portamento_glissando(uint8_t param) { +FLASHMEM void UI_func_portamento_glissando(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3758,7 +3758,7 @@ void UI_func_portamento_glissando(uint8_t param) { } } -void UI_func_portamento_time(uint8_t param) { +FLASHMEM void UI_func_portamento_time(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -3799,7 +3799,7 @@ void UI_func_portamento_time(uint8_t param) { } } -void UI_handle_OP(uint8_t param) { +FLASHMEM void UI_handle_OP(uint8_t param) { static uint8_t op_selected; lcd_OP_active_instance_number(selected_instance_id, configuration.dexed[selected_instance_id].op_enabled); @@ -3866,7 +3866,7 @@ void UI_handle_OP(uint8_t param) { } #if NUM_DRUMS > 0 -void _check_yes_no_back(uint8_t state) { +FLASHMEM void _check_yes_no_back(uint8_t state) { if (state == 0) { // BACK display.setCursor(0, 1); display.print(F(" ")); @@ -3909,7 +3909,7 @@ void _check_yes_no_back(uint8_t state) { } } -void _check_display_name(bool display_name, uint8_t digits) { +FLASHMEM void _check_display_name(bool display_name, uint8_t digits) { if (display_name == true) { display.setCursor(0, 1); display.print(F("[")); @@ -3931,7 +3931,7 @@ void _check_display_name(bool display_name, uint8_t digits) { } } -void _check_display_name_min_max(uint8_t input_mode, uint8_t input_type, uint8_t digits) { +FLASHMEM void _check_display_name_min_max(uint8_t input_mode, uint8_t input_type, uint8_t digits) { switch (input_mode) { case 0: display.setCursor(7, 0); @@ -3982,7 +3982,7 @@ void _check_display_name_min_max(uint8_t input_mode, uint8_t input_type, uint8_t } #endif -void UI_func_drum_midi_channel(uint8_t param) { +FLASHMEM void UI_func_drum_midi_channel(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4035,7 +4035,7 @@ void UI_func_drum_midi_channel(uint8_t param) { } } -void UI_func_drum_main_volume(uint8_t param) { +FLASHMEM void UI_func_drum_main_volume(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4075,7 +4075,7 @@ void UI_func_drum_main_volume(uint8_t param) { } } -void UI_func_drum_pitch(uint8_t param) { +FLASHMEM void UI_func_drum_pitch(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4152,7 +4152,7 @@ void UI_func_drum_pitch(uint8_t param) { } } -void UI_func_drum_vol_min_max(uint8_t param) { +FLASHMEM void UI_func_drum_vol_min_max(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4261,7 +4261,7 @@ void UI_func_drum_vol_min_max(uint8_t param) { } } -void UI_func_drum_pan(uint8_t param) { +FLASHMEM void UI_func_drum_pan(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4339,7 +4339,7 @@ void UI_func_drum_pan(uint8_t param) { } } -void UI_func_drum_reverb_send(uint8_t param) { +FLASHMEM void UI_func_drum_reverb_send(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4417,7 +4417,7 @@ void UI_func_drum_reverb_send(uint8_t param) { } } -void UI_func_drum_midi_note(uint8_t param) { +FLASHMEM void UI_func_drum_midi_note(uint8_t param) { #if NUM_DRUMS == 0 if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -4570,7 +4570,7 @@ void UI_func_drum_midi_note(uint8_t param) { } } -void UI_func_save_performance(uint8_t param) { +FLASHMEM void UI_func_save_performance(uint8_t param) { static bool overwrite; static bool yesno; static uint8_t mode; @@ -4681,7 +4681,7 @@ void UI_func_save_performance(uint8_t param) { } } -void UI_func_load_performance(uint8_t param) { +FLASHMEM void UI_func_load_performance(uint8_t param) { static uint8_t mode; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -4751,7 +4751,7 @@ void UI_func_load_performance(uint8_t param) { } } -void UI_func_information(uint8_t param) { +FLASHMEM void UI_func_information(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { char version_string[LCD_cols + 1]; @@ -4778,7 +4778,7 @@ void UI_func_information(uint8_t param) { } } -void UI_func_midi_soft_thru(uint8_t param) { +FLASHMEM void UI_func_midi_soft_thru(uint8_t param) { static uint8_t old_soft_midi_thru; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -4820,7 +4820,7 @@ void UI_func_midi_soft_thru(uint8_t param) { } } -void UI_func_velocity_level(uint8_t param) { +FLASHMEM void UI_func_velocity_level(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -4858,7 +4858,7 @@ void UI_func_velocity_level(uint8_t param) { } } -void UI_func_engine(uint8_t param) { +FLASHMEM void UI_func_engine(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -4918,14 +4918,14 @@ void UI_func_engine(uint8_t param) { } } -void UI_update_instance_icons() { +FLASHMEM void UI_update_instance_icons() { display.setCursor(14, 0); display.write(0); //Icon for first instance display.setCursor(15, 0); display.write(1); //Icon for second instance } -void UI_func_voice_select(uint8_t param) { +FLASHMEM void UI_func_voice_select(uint8_t param) { static uint8_t menu_voice_select = MENU_VOICE_SOUND; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -5113,7 +5113,7 @@ void UI_func_voice_select(uint8_t param) { } } -void UI_func_volume(uint8_t param) { +FLASHMEM void UI_func_volume(uint8_t param) { char tmp[6]; static uint8_t old_volume; @@ -5269,7 +5269,7 @@ void UI_func_volume(uint8_t param) { } } -void UI_func_save_voice(uint8_t param) { +FLASHMEM void UI_func_save_voice(uint8_t param) { static bool yesno; static uint8_t mode; @@ -5426,7 +5426,7 @@ void UI_func_save_voice(uint8_t param) { } } -void UI_func_sysex_receive_bank(uint8_t param) { +FLASHMEM void UI_func_sysex_receive_bank(uint8_t param) { static bool yesno; static uint8_t mode; static uint8_t bank_number; @@ -5573,7 +5573,7 @@ void UI_func_sysex_receive_bank(uint8_t param) { } } -void UI_func_set_performance_name(uint8_t param) { +FLASHMEM void UI_func_set_performance_name(uint8_t param) { static uint8_t mode; static uint8_t ui_select_name_state; if (LCDML.FUNC_setup()) // ****** SETUP ********* @@ -5635,7 +5635,7 @@ void UI_func_set_performance_name(uint8_t param) { } } -void UI_func_sysex_send_bank(uint8_t param) { +FLASHMEM void UI_func_sysex_send_bank(uint8_t param) { char bank_name[BANK_NAME_LEN]; static uint8_t bank_number; @@ -5723,7 +5723,7 @@ void UI_func_sysex_send_bank(uint8_t param) { } } -void UI_func_sysex_send_voice(uint8_t param) { +FLASHMEM void UI_func_sysex_send_voice(uint8_t param) { static uint8_t mode; static uint8_t bank_number; static uint8_t voice_number; @@ -5861,7 +5861,7 @@ void UI_func_sysex_send_voice(uint8_t param) { } } -void UI_func_eq_1(uint8_t param) { +FLASHMEM void UI_func_eq_1(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -5904,7 +5904,7 @@ void UI_func_eq_1(uint8_t param) { #endif } -void UI_func_eq_2(uint8_t param) { +FLASHMEM void UI_func_eq_2(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -5946,7 +5946,7 @@ void UI_func_eq_2(uint8_t param) { #endif } -void UI_func_eq_3(uint8_t param) { +FLASHMEM void UI_func_eq_3(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -5988,7 +5988,7 @@ void UI_func_eq_3(uint8_t param) { #endif } -void UI_func_eq_4(uint8_t param) { +FLASHMEM void UI_func_eq_4(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -6030,7 +6030,7 @@ void UI_func_eq_4(uint8_t param) { #endif } -void UI_func_eq_5(uint8_t param) { +FLASHMEM void UI_func_eq_5(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -6072,7 +6072,7 @@ void UI_func_eq_5(uint8_t param) { #endif } -void UI_func_eq_6(uint8_t param) { +FLASHMEM void UI_func_eq_6(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -6114,7 +6114,7 @@ void UI_func_eq_6(uint8_t param) { #endif } -void UI_func_eq_7(uint8_t param) { +FLASHMEM void UI_func_eq_7(uint8_t param) { #ifndef SGTL5000_AUDIO_ENHANCE if (LCDML.FUNC_setup()) // ****** SETUP ********* { @@ -6156,7 +6156,7 @@ void UI_func_eq_7(uint8_t param) { #endif } -void UI_func_startup(uint8_t param) { +FLASHMEM void UI_func_startup(uint8_t param) { bool stored = false; static uint8_t old_load_at_startup; @@ -6224,7 +6224,7 @@ void UI_func_startup(uint8_t param) { } } -void UI_function_not_enabled(void) { +FLASHMEM void UI_function_not_enabled(void) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -6246,7 +6246,7 @@ void UI_function_not_enabled(void) { } } -void UI_function_not_implemented(uint8_t param) { +FLASHMEM void UI_function_not_implemented(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { encoderDir[ENC_R].reset(); @@ -6268,7 +6268,7 @@ void UI_function_not_implemented(uint8_t param) { } } -bool UI_select_name(uint8_t y, uint8_t x, char* edit_string, uint8_t len, bool init) { +FLASHMEM bool UI_select_name(uint8_t y, uint8_t x, char* edit_string, uint8_t len, bool init) { static int8_t edit_pos; static bool edit_mode; static uint8_t edit_value; @@ -6349,7 +6349,7 @@ bool UI_select_name(uint8_t y, uint8_t x, char* edit_string, uint8_t len, bool i return (false); } -uint8_t search_accepted_char(uint8_t c) { +FLASHMEM uint8_t search_accepted_char(uint8_t c) { //if (c == 0) // c = 32; @@ -6365,11 +6365,11 @@ uint8_t search_accepted_char(uint8_t c) { return (0); } -void display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) { +FLASHMEM void display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) { display_float(float(var), size, 0, zeros, brackets, sign); } -void display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign) { +FLASHMEM void display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign) { char s[LCD_cols + 1]; if (size_fraction > 0) { @@ -6409,7 +6409,7 @@ inline void display_bar_int(const char* title, uint32_t value, float factor, int display_bar_float(title, float(value), factor, min_value, max_value, size, 0, zeros, sign, 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) { +FLASHMEM 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; float _vi = 0.0; @@ -6462,7 +6462,7 @@ inline void display_meter_int(const char* title, uint32_t value, float factor, f display_meter_float(title, float(value), factor, offset, min_value, max_value, size, 0, zeros, sign, 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) { +FLASHMEM 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; float _vi = 0.0; @@ -6521,7 +6521,7 @@ uint8_t bit_reverse8(uint8_t v) { return (result); } -void lcd_active_instance_number(uint8_t instance_id) { +FLASHMEM void lcd_active_instance_number(uint8_t instance_id) { for (uint8_t i = 0; i < 8; i++) { if (instance_id == 0) { if (configuration.dexed[instance_id].polyphony == 0) @@ -6557,7 +6557,7 @@ void lcd_active_instance_number(uint8_t instance_id) { #endif } -void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op) { +FLASHMEM void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op) { uint8_t i, n; for (n = 2; n < 8; n++) { @@ -6604,7 +6604,7 @@ void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op) { #endif } -void lcd_special_chars(uint8_t mode) { +FLASHMEM void lcd_special_chars(uint8_t mode) { switch (mode) { case SCROLLBAR: // set special chars for scrollbar @@ -6639,7 +6639,7 @@ void lcd_special_chars(uint8_t mode) { } } -void string_trim(char* s) { +FLASHMEM void string_trim(char* s) { int i; while (isspace(*s)) s++; // skip left side white spaces @@ -6648,7 +6648,7 @@ void string_trim(char* s) { s[i + 1] = '\0'; } -void locate_previous_non_favorite() { +FLASHMEM void locate_previous_non_favorite() { //find prev. non fav in current bank display.setCursor(3, 0); display.print("SEARCHING"); @@ -6832,7 +6832,7 @@ void locate_next_non_favorite() { favsearcher = 0; } -void locate_random_non_favorite() { +FLASHMEM void locate_random_non_favorite() { //find random non-fav do { configuration.dexed[selected_instance_id].voice = random(32); @@ -6845,7 +6845,7 @@ void locate_random_non_favorite() { favsearcher = 0; } -bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { +FLASHMEM bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { b = constrain(b, 0, MAX_BANKS - 1); v = constrain(v, 0, MAX_VOICES - 1); char tmp[18]; @@ -6873,7 +6873,7 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { return false; } -void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) { +FLASHMEM void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) { b = constrain(b, 0, MAX_BANKS - 1); v = constrain(v, 0, MAX_VOICES - 1); char tmp[18]; @@ -6890,7 +6890,7 @@ void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) { } } -bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) { +FLASHMEM bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) { b = constrain(b, 0, MAX_BANKS - 1); char tmp[18]; @@ -6916,7 +6916,7 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) { return false; } -void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { +FLASHMEM void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { #ifdef DEBUG Serial.println(F("Starting saving Favorite.")); #endif diff --git a/control_sgtl5000plus.cpp b/control_sgtl5000plus.cpp index aba516a..7774cd1 100644 --- a/control_sgtl5000plus.cpp +++ b/control_sgtl5000plus.cpp @@ -27,7 +27,7 @@ #include #include "control_sgtl5000plus.h" -void AudioControlSGTL5000Plus::init_parametric_eq(uint8_t n) +FLASHMEM void AudioControlSGTL5000Plus::init_parametric_eq(uint8_t n) { num_bands = constrain(n, 1, 7); @@ -102,7 +102,7 @@ void AudioControlSGTL5000Plus::init_parametric_eq(uint8_t n) } } -void AudioControlSGTL5000Plus::setEQType(uint8_t band, uint8_t ft) +FLASHMEM void AudioControlSGTL5000Plus::setEQType(uint8_t band, uint8_t ft) { if (filter_type && _enabled != false) { @@ -111,7 +111,7 @@ void AudioControlSGTL5000Plus::setEQType(uint8_t band, uint8_t ft) } } -void AudioControlSGTL5000Plus::setEQFc(uint8_t band, float frq) +FLASHMEM void AudioControlSGTL5000Plus::setEQFc(uint8_t band, float frq) { if (Fc && _enabled != false) { @@ -120,7 +120,7 @@ void AudioControlSGTL5000Plus::setEQFc(uint8_t band, float frq) } } -void AudioControlSGTL5000Plus::setEQQ(uint8_t band, float q) +FLASHMEM void AudioControlSGTL5000Plus::setEQQ(uint8_t band, float q) { if (Q && _enabled != false) { @@ -131,7 +131,7 @@ void AudioControlSGTL5000Plus::setEQQ(uint8_t band, float q) // Calculate Q: http://www.sengpielaudio.com/calculator-bandwidth.htm // http://jdm12.ch/Audio/EQ_BPF-Q-bandwidth.asp -void AudioControlSGTL5000Plus::setEQBandwidth(uint8_t band, float bw) +FLASHMEM void AudioControlSGTL5000Plus::setEQBandwidth(uint8_t band, float bw) { if (Q && Fc && _enabled != false) { @@ -140,7 +140,7 @@ void AudioControlSGTL5000Plus::setEQBandwidth(uint8_t band, float bw) } } -void AudioControlSGTL5000Plus::setEQGain(uint8_t band, float gain) +FLASHMEM void AudioControlSGTL5000Plus::setEQGain(uint8_t band, float gain) { if (peakGainDB && _enabled != false) { @@ -149,7 +149,7 @@ void AudioControlSGTL5000Plus::setEQGain(uint8_t band, float gain) } } -void AudioControlSGTL5000Plus::commitFilter(uint8_t band) +FLASHMEM void AudioControlSGTL5000Plus::commitFilter(uint8_t band) { int filter[5] = {0, 0, 0, 0, 0}; @@ -162,7 +162,7 @@ void AudioControlSGTL5000Plus::commitFilter(uint8_t band) eqFilter(band, filter); } -void AudioControlSGTL5000Plus::show_params(uint8_t band) +FLASHMEM void AudioControlSGTL5000Plus::show_params(uint8_t band) { if (_enabled == false) { diff --git a/control_sgtl5000plus.h b/control_sgtl5000plus.h index fe3992e..ecac378 100644 --- a/control_sgtl5000plus.h +++ b/control_sgtl5000plus.h @@ -63,14 +63,14 @@ class AudioControlSGTL5000Plus : public AudioControlSGTL5000 _enabled = false; num_bands = constrain(n, 1, 7); }; - void setEQType(uint8_t band, uint8_t ft); - void setEQFc(uint8_t band, float frq); - void setEQQ(uint8_t band, float q); - void setEQBandwidth(uint8_t band, float bw); - void setEQGain(uint8_t band, float gain); - void commitFilter(uint8_t band); - void show_params(uint8_t band); - void init_parametric_eq(uint8_t n = 7); + FLASHMEM void setEQType(uint8_t band, uint8_t ft); + FLASHMEM void setEQFc(uint8_t band, float frq); + FLASHMEM void setEQQ(uint8_t band, float q); + FLASHMEM void setEQBandwidth(uint8_t band, float bw); + FLASHMEM void setEQGain(uint8_t band, float gain); + FLASHMEM void commitFilter(uint8_t band); + FLASHMEM void show_params(uint8_t band); + FLASHMEM void init_parametric_eq(uint8_t n = 7); private: bool _enabled;