diff --git a/MicroDexed.ino b/MicroDexed.ino index 3b68448..208a266 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -591,7 +591,7 @@ void setup() Serial.println(F("]")); Serial.print(F("Polyphony: ")); Serial.println(configuration.dexed[instance_id].polyphony, DEC); - show_patch(instance_id); + //show_patch(instance_id); } Serial.print(F("AUDIO_BLOCK_SAMPLES=")); @@ -1712,12 +1712,15 @@ void show_configuration(void) void show_patch(uint8_t instance_id) { - char voicename[VOICE_NAME_LEN]; + char vn[VOICE_NAME_LEN]; - Serial.print(F("INSTANCE ")); - Serial.println(instance_id, DEC); + if (instance_id < 0xFF) + { + Serial.print(F("INSTANCE ")); + Serial.println(instance_id, DEC); + } - memset(voicename, 0, sizeof(voicename)); + memset(vn, 0, sizeof(vn)); Serial.println(F("+==========================================================================================================+")); for (int8_t i = 5; i >= 0; --i) { @@ -1811,8 +1814,8 @@ void show_patch(uint8_t instance_id) Serial.print(F(" | ")); SerialPrintFormatInt3(MicroDexed[instance_id]->data[DEXED_VOICE_OFFSET + DEXED_LFO_PITCH_MOD_SENS]); Serial.print(F(" | ")); - strncpy(voicename, (char *)&MicroDexed[instance_id]->data[DEXED_VOICE_OFFSET + DEXED_NAME], sizeof(voicename) - 1); - Serial.print(voicename); + strncpy(vn, (char *)&MicroDexed[instance_id]->data[DEXED_VOICE_OFFSET + DEXED_NAME], VOICE_NAME_LEN - 1); + Serial.print(vn); Serial.println(F(" |")); Serial.println(F("+=========+=========+=========+=========+==========+==========+=========+==================================+")); Serial.println(F("+==========================================================================================================+")); diff --git a/dexed.cpp b/dexed.cpp index e43138a..5b50e05 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -626,7 +626,7 @@ void Dexed::setPBController(uint8_t pb_range, uint8_t pb_step) controllers.values_[kControllerPitchRange] = pb_range; controllers.values_[kControllerPitchStep] = pb_step; - //controllers.refresh(); + controllers.refresh(); } void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign) diff --git a/dexed_sysex.cpp b/dexed_sysex.cpp index 57141d5..6ebd462 100644 --- a/dexed_sysex.cpp +++ b/dexed_sysex.cpp @@ -32,6 +32,7 @@ #include "dexed_sysex.h" extern AudioSourceMicroDexed * MicroDexed[NUM_DEXED]; +extern void show_patch(uint8_t instance_id); void create_sysex_filename(uint8_t b, char* sysex_file_name, uint8_t instance_id) { @@ -255,6 +256,9 @@ bool load_sysex(uint8_t b, uint8_t v, uint8_t instance_id) Serial.println(F("]")); #endif bool ret = MicroDexed[instance_id]->loadPackedVoiceParameters(data); +#ifdef DEBUG + show_patch(instance_id); +#endif configuration.dexed[instance_id].transpose = MicroDexed[instance_id]->data[DEXED_VOICE_OFFSET + DEXED_TRANSPOSE]; return (ret); } @@ -523,7 +527,7 @@ bool load_sysex_setup(uint8_t b, uint8_t v, uint8_t instance_id) bool save_sysex_setup(uint8_t b, uint8_t v, config_t configuration) { const char* sysex_filename = "config.syx"; - + if (sd_card_available) { File sysex; @@ -542,6 +546,6 @@ bool save_sysex_setup(uint8_t b, uint8_t v, config_t configuration) return (false); } } - + return (false); }