diff --git a/MicroDexed.ino b/MicroDexed.ino index a4ab68a..6487917 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -506,8 +506,10 @@ void setup() drum_mixer_r.gain(instance_id, 1.0); drum_mixer_l.gain(instance_id, 1.0); +#ifdef USE_FX drum_reverb_send_mixer_r.gain(instance_id, 0.0); drum_reverb_send_mixer_l.gain(instance_id, 0.0); +#endif } #endif @@ -832,9 +834,10 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) drum_mixer_r.gain(slot, (1.0 - pan) * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); drum_mixer_l.gain(slot, (pan) * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); +#ifdef USE_FX drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * pseudo_log_curve(drum_config[d].reverb_send)); drum_reverb_send_mixer_l.gain(slot, pan * pseudo_log_curve(drum_config[d].reverb_send)); - +#endif if (drum_config[d].drum_data != NULL) Drum[slot]->play(drum_config[d].drum_data); diff --git a/UI.hpp b/UI.hpp index 1a40a90..3a7b6a6 100644 --- a/UI.hpp +++ b/UI.hpp @@ -257,7 +257,6 @@ 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_drum_midi_channel(uint8_t param); #endif void UI_func_transpose(uint8_t param); void UI_func_tune(uint8_t param); @@ -304,6 +303,7 @@ void UI_func_seq_display_style(uint8_t param); void UI_func_seq_state_load(uint8_t param); void UI_func_seq_state_save(uint8_t param); void UI_func_volume(uint8_t param); +void UI_func_drum_midi_channel(uint8_t param); void UI_func_load_performance(uint8_t param); void UI_func_save_performance(uint8_t param); void UI_func_load_voiceconfig(uint8_t param); @@ -4307,6 +4307,7 @@ void UI_func_seq_tempo(uint8_t param) lcd.setCursor(11, 1); sprintf(tmp, "%3d", seq_tempo_ms / 1000); lcd.print(tmp); +#ifdef USE_FX for (uint8_t i = 0; i < MAX_DEXED; i++) { if (configuration.fx.delay_sync[i] > 0) @@ -4315,6 +4316,7 @@ void UI_func_seq_tempo(uint8_t param) delay_fx[i]->delay(0, constrain(midi_sync_delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX * 10)); } } +#endif //timer1.stop(); timer1.begin(sequencer, seq_tempo_ms / 2); } @@ -6635,6 +6637,7 @@ void UI_func_load_voiceconfig(uint8_t param) #if NUM_DEXED > 1 static int8_t selected_instance_id; #else + char tmp[4]; uint8_t selected_instance_id = 0; #endif @@ -6739,6 +6742,7 @@ void UI_func_save_voiceconfig(uint8_t param) #if NUM_DEXED > 1 static int8_t selected_instance_id; #else + char tmp[5]; uint8_t selected_instance_id = 0; #endif @@ -8541,6 +8545,7 @@ void lcd_special_chars(uint8_t mode) } } +#ifdef USE_FX void lcd_display_delay_sync(uint8_t sync) { lcd.show(0, 0, LCD_cols - 2, "Delay Sync"); @@ -8596,6 +8601,7 @@ void lcd_display_delay_sync(uint8_t sync) } lcd.show(1, 15, 1, "!"); } +#endif void eeprom_update_var(uint16_t pos, uint8_t val, const char* val_string) { diff --git a/UI_FX.h b/UI_FX.h index 51751c8..bd3cef8 100644 --- a/UI_FX.h +++ b/UI_FX.h @@ -90,58 +90,58 @@ LCDML_add(56, LCDML_0_1, 5, "Setup", NULL); LCDML_add(57, LCDML_0_1_5, 1, "Portamento", NULL); LCDML_add(58, LCDML_0_1_5_1, 1, "Port. Mode", UI_func_portamento_mode); LCDML_add(59, LCDML_0_1_5_1, 2, "Port. Gliss", UI_func_portamento_glissando); -LCDML_add(50, LCDML_0_1_5_1, 3, "Port. Time", UI_func_portamento_time); -LCDML_add(60, LCDML_0_1_5, 2, "Polyphony", UI_func_polyphony); -LCDML_add(61, LCDML_0_1_5, 3, "Transpose", UI_func_transpose); -LCDML_add(62, LCDML_0_1_5, 4, "Fine Tune", UI_func_tune); -LCDML_add(63, LCDML_0_1_5, 5, "Mono/Poly", UI_func_mono_poly); -LCDML_add(64, LCDML_0_1, 6, "Internal", NULL); -LCDML_add(65, LCDML_0_1_6, 1, "Note Refresh", UI_func_note_refresh); -LCDML_add(66, LCDML_0_1_6, 2, "Velocity Lvl", UI_func_velocity_level); -LCDML_add(67, LCDML_0_1, 7, "Operator", UI_handle_OP); -LCDML_add(68, LCDML_0_1, 8, "Save Voice", UI_func_save_voice); -LCDML_add(69, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(70, LCDML_0_3, 1, "Performance", NULL); -LCDML_add(71, LCDML_0_3_1, 1, "Load Perf.", UI_func_load_performance); -LCDML_add(72, LCDML_0_3_1, 2, "Save Perf.", UI_func_save_performance); -LCDML_add(73, LCDML_0_3, 2, "Voice Config", NULL); -LCDML_add(74, LCDML_0_3_2, 1, "Load Voice Cfg", UI_func_load_voiceconfig); -LCDML_add(75, LCDML_0_3_2, 2, "Save Voice Cfg", UI_func_save_voiceconfig); -LCDML_add(76, LCDML_0_3, 3, "Effects", NULL); -LCDML_add(77, LCDML_0_3_3, 1, "Load Effects", UI_func_load_fx); -LCDML_add(78, LCDML_0_3_3, 2, "Save Effects", UI_func_save_fx); -LCDML_add(79, LCDML_0_3, 5, "MIDI", NULL); -LCDML_add(80, LCDML_0_3_5, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank); -LCDML_add(81, LCDML_0_3_5, 2, "MIDI Snd Bank", UI_func_sysex_send_bank); -LCDML_add(82, LCDML_0_3_5, 3, "MIDI Snd Voice", UI_func_sysex_send_voice); -LCDML_add(83, LCDML_0, 4, "Drums", NULL); -LCDML_add(84, LCDML_0_4, 1, "Drums Main Vol", UI_func_drum_main_volume); -LCDML_add(85, LCDML_0_4, 2, "Drum Volumes", UI_func_drum_volume); -LCDML_add(86, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan); -LCDML_add(87, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send); -LCDML_add(88, LCDML_0_4, 5, "MIDI Channel", UI_func_drum_midi_channel); -LCDML_add(89, LCDML_0, 5, "Sequencer", NULL); -LCDML_add(90, LCDML_0_5, 1, "Sequencer", UI_func_sequencer); -LCDML_add(91, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor); -LCDML_add(92, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain); -LCDML_add(93, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio); -LCDML_add(94, LCDML_0_5, 5, "Seq. Settings", NULL); -LCDML_add(95, LCDML_0_5_5, 1, "Tempo", UI_func_seq_tempo); -LCDML_add(96, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght); -LCDML_add(97, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); -LCDML_add(98, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); -LCDML_add(99, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); -LCDML_add(100, LCDML_0_5_5, 6, "shift&transp.", UI_func_arp_shift); -LCDML_add(101, LCDML_0_5_5, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount); -LCDML_add(102, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct); -LCDML_add(103, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load); -LCDML_add(104, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save); -LCDML_add(105, LCDML_0, 6, "System", NULL); -LCDML_add(106, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(107, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(108, LCDML_0_6, 3, "Favorites", UI_func_favorites); -LCDML_add(109, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset); -LCDML_add(110, LCDML_0, 7, "Info", UI_func_information); -LCDML_addAdvanced(111, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); -#define _LCDML_DISP_cnt 111 +LCDML_add(60, LCDML_0_1_5_1, 3, "Port. Time", UI_func_portamento_time); +LCDML_add(61, LCDML_0_1_5, 2, "Polyphony", UI_func_polyphony); +LCDML_add(62, LCDML_0_1_5, 3, "Transpose", UI_func_transpose); +LCDML_add(63, LCDML_0_1_5, 4, "Fine Tune", UI_func_tune); +LCDML_add(64, LCDML_0_1_5, 5, "Mono/Poly", UI_func_mono_poly); +LCDML_add(65, LCDML_0_1, 6, "Internal", NULL); +LCDML_add(66, LCDML_0_1_6, 1, "Note Refresh", UI_func_note_refresh); +LCDML_add(67, LCDML_0_1_6, 2, "Velocity Lvl", UI_func_velocity_level); +LCDML_add(68, LCDML_0_1, 7, "Operator", UI_handle_OP); +LCDML_add(69, LCDML_0_1, 8, "Save Voice", UI_func_save_voice); +LCDML_add(70, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(71, LCDML_0_3, 1, "Performance", NULL); +LCDML_add(72, LCDML_0_3_1, 1, "Load Perf.", UI_func_load_performance); +LCDML_add(73, LCDML_0_3_1, 2, "Save Perf.", UI_func_save_performance); +LCDML_add(74, LCDML_0_3, 2, "Voice Config", NULL); +LCDML_add(75, LCDML_0_3_2, 1, "Load Voice Cfg", UI_func_load_voiceconfig); +LCDML_add(76, LCDML_0_3_2, 2, "Save Voice Cfg", UI_func_save_voiceconfig); +LCDML_add(77, LCDML_0_3, 3, "Effects", NULL); +LCDML_add(78, LCDML_0_3_3, 1, "Load Effects", UI_func_load_fx); +LCDML_add(79, LCDML_0_3_3, 2, "Save Effects", UI_func_save_fx); +LCDML_add(80, LCDML_0_3, 5, "MIDI", NULL); +LCDML_add(81, LCDML_0_3_5, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank); +LCDML_add(82, LCDML_0_3_5, 2, "MIDI Snd Bank", UI_func_sysex_send_bank); +LCDML_add(83, LCDML_0_3_5, 3, "MIDI Snd Voice", UI_func_sysex_send_voice); +LCDML_add(84, LCDML_0, 4, "Drums", NULL); +LCDML_add(85, LCDML_0_4, 1, "Drums Main Vol", UI_func_drums_main_volume); +LCDML_add(86, LCDML_0_4, 2, "Drum Volumes", UI_func_drum_volume); +LCDML_add(87, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan); +LCDML_add(88, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send); +LCDML_add(89, LCDML_0_4, 5, "MIDI Channel", UI_func_drum_midi_channel); +LCDML_add(90, LCDML_0, 5, "Sequencer", NULL); +LCDML_add(91, LCDML_0_5, 1, "Sequencer", UI_func_sequencer); +LCDML_add(92, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor); +LCDML_add(93, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain); +LCDML_add(94, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio); +LCDML_add(95, LCDML_0_5, 5, "Seq. Settings", NULL); +LCDML_add(96, LCDML_0_5_5, 1, "Tempo", UI_func_seq_tempo); +LCDML_add(97, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght); +LCDML_add(98, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); +LCDML_add(99, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); +LCDML_add(100, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); +LCDML_add(101, LCDML_0_5_5, 6, "shift&transp.", UI_func_arp_shift); +LCDML_add(102, LCDML_0_5_5, 7, "ChordTrack Keys", UI_func_seq_chord_keys_ammount); +LCDML_add(103, LCDML_0_5_5, 8, "L.Transp.Key", UI_func_seq_live_transpose_oct); +LCDML_add(104, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load); +LCDML_add(105, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save); +LCDML_add(106, LCDML_0, 6, "System", NULL); +LCDML_add(107, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(108, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(109, LCDML_0_6, 3, "Favorites", UI_func_favorites); +LCDML_add(110, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset); +LCDML_add(111, LCDML_0, 7, "Info", UI_func_information); +LCDML_addAdvanced(112, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); +#define _LCDML_DISP_cnt 112 #endif diff --git a/UI_NO_FX.h b/UI_NO_FX.h index fa20f11..3773492 100644 --- a/UI_NO_FX.h +++ b/UI_NO_FX.h @@ -89,30 +89,29 @@ LCDML_add(55, LCDML_0, 4, "Drums", NULL); LCDML_add(56, LCDML_0_4, 1, "Drums Main Vol", UI_func_drums_main_volume); LCDML_add(57, LCDML_0_4, 2, "Drum Volumes", UI_func_drum_volume); LCDML_add(58, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan); -LCDML_add(59, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send); -LCDML_add(60, LCDML_0_4, 5, "MIDI Channel", UI_func_drum_midi_channel); -LCDML_add(61, LCDML_0, 5, "Sequencer", NULL); -LCDML_add(62, LCDML_0_5, 1, "Sequencer", UI_func_sequencer); -LCDML_add(63, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor); -LCDML_add(64, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain); -LCDML_add(65, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio); -LCDML_add(66, LCDML_0_5, 5, "Seq. Settings", NULL); -LCDML_add(67, LCDML_0_5_5, 1, "Tempo", UI_func_seq_tempo); -LCDML_add(68, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght); -LCDML_add(69, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); -LCDML_add(70, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); -LCDML_add(71, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); -LCDML_add(72, LCDML_0_5_5, 6, "L.Transp.Key", UI_func_seq_live_transpose_oct); +LCDML_add(59, LCDML_0_4, 4, "MIDI Channel", UI_func_drum_midi_channel); +LCDML_add(60, LCDML_0, 5, "Sequencer", NULL); +LCDML_add(61, LCDML_0_5, 1, "Sequencer", UI_func_sequencer); +LCDML_add(62, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor); +LCDML_add(63, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain); +LCDML_add(64, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio); +LCDML_add(65, LCDML_0_5, 5, "Seq. Settings", NULL); +LCDML_add(66, LCDML_0_5_5, 1, "Tempo", UI_func_seq_tempo); +LCDML_add(67, LCDML_0_5_5, 2, "Seq. Length", UI_func_seq_lenght); +LCDML_add(68, LCDML_0_5_5, 3, "Track Setup", UI_func_seq_track_setup); +LCDML_add(69, LCDML_0_5_5, 4, "Seq.Disp.Style", UI_func_seq_display_style); +LCDML_add(70, LCDML_0_5_5, 5, "dexed assign", UI_func_dexed_assign); +LCDML_add(71, LCDML_0_5_5, 6, "shift&transp.", UI_func_arp_shift); +LCDML_add(72, LCDML_0_5_5, 7, "L.Transp.Key", UI_func_seq_live_transpose_oct); LCDML_add(73, LCDML_0_5_5, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount); LCDML_add(74, LCDML_0_5, 6, "LOAD Seq.Data", UI_func_seq_state_load); LCDML_add(75, LCDML_0_5, 7, "SAVE Seq.Data", UI_func_seq_state_save); -LCDML_add(76, LCDML_0, 5, "System", NULL); -LCDML_add(77, LCDML_0_5, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(78, LCDML_0_5, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -LCDML_add(79, LCDML_0_5, 3, "Favorites", UI_func_favorites); -LCDML_add(80, LCDML_0_5, 4, "EEPROM Reset", UI_func_eeprom_reset); -LCDML_add(81, LCDML_0, 6, "Info", UI_func_information); -LCDML_addAdvanced(82, LCDML_0, 5, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); +LCDML_add(76, LCDML_0, 6, "System", NULL); +LCDML_add(77, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(78, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(79, LCDML_0_6, 3, "Favorites", UI_func_favorites); +LCDML_add(80, LCDML_0_6, 4, "EEPROM Reset", UI_func_eeprom_reset); +LCDML_add(81, LCDML_0, 7, "Info", UI_func_information); +LCDML_addAdvanced(82, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default); #define _LCDML_DISP_cnt 82 - #endif diff --git a/dexed_sd.cpp b/dexed_sd.cpp index eae3c84..fd0ac60 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -1165,7 +1165,7 @@ bool load_sd_seq_json(uint8_t seq_number) AudioNoInterrupts(); - for (uint8_t i = 0; i < MAX_DEXED; i++) + for (uint8_t i = 0; i < NUM_DEXED; i++) { configuration.performance.bank[i] = data_json["bank"][i]; configuration.performance.voice[i] = data_json["voice"][i]; load_sd_voice(configuration.performance.bank[i], configuration.performance.voice[i], i);