diff --git a/MicroDexed.ino b/MicroDexed.ino index 72da9a4..3e906af 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -58,27 +58,6 @@ AudioOutputUSB usb1; #endif AudioEffectStereoMono stereomono1; -// -// Dynamic patching -// -uint8_t nDynamic = 0; -#ifdef USE_REVERB -AudioConnection * dynamicConnections[NUM_DEXED * 7]; -#else -AudioConnection * dynamicConnections[NUM_DEXED * 6]; -#endif -void create_audio_connections(AudioSourceMicroDexed &d, uint8_t instance_id) -{ - dynamicConnections[nDynamic++] = new AudioConnection(d, peak1); -#if defined(USE_REVERB) - dynamicConnections[nDynamic++] = new AudioConnection(d, 0, reverb_mixer, instance_id); -#endif - dynamicConnections[nDynamic++] = new AudioConnection(d, 0, delay_mixer, instance_id); - dynamicConnections[nDynamic++] = new AudioConnection(d, 0, chorus_mixer, instance_id); - dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_r, 0); - dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_l, 0); -} - // Audio connections AudioConnection patchCord1(modulator, 0, modchorus, 1); AudioConnection patchCord2(chorus_mixer, 0, modchorus, 0); @@ -143,6 +122,27 @@ AudioConnection patchCord35(stereomono1, 0, dacOut, 0); AudioConnection patchCord36(stereomono1, 1, dacOut, 1); #endif +// +// Dynamic patching +// +uint8_t nDynamic = 0; +#ifdef USE_REVERB +AudioConnection * dynamicConnections[NUM_DEXED * 7]; +#else +AudioConnection * dynamicConnections[NUM_DEXED * 6]; +#endif +void create_audio_connections(AudioSourceMicroDexed &d, uint8_t instance_id) +{ + dynamicConnections[nDynamic++] = new AudioConnection(d, peak1); +#if defined(USE_REVERB) + dynamicConnections[nDynamic++] = new AudioConnection(d, 0, reverb_mixer, instance_id); +#endif + dynamicConnections[nDynamic++] = new AudioConnection(d, 0, delay_mixer, instance_id); + dynamicConnections[nDynamic++] = new AudioConnection(d, 0, chorus_mixer, instance_id); + dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_r, 0); + dynamicConnections[nDynamic++] = new AudioConnection(d, 0 , master_mixer_l, 0); +} + bool sd_card_available = false; uint8_t max_loaded_banks = 0; char bank_name[NUM_DEXED][BANK_NAME_LEN]; diff --git a/dexed_sysex.h b/dexed_sysex.h index f3000ef..ac93701 100644 --- a/dexed_sysex.h +++ b/dexed_sysex.h @@ -45,7 +45,7 @@ extern config_t configuration; void create_sysex_filename(uint8_t b, char* sysex_file_name); void strip_extension(char* s, char *target); -bool get_voice_names_from_bank(uint8_t b); +bool get_voice_names_from_bank(uint8_t b, uint8_t i); uint8_t get_bank_names(uint8_t instance_id); bool get_bank_voice_name(uint8_t b, uint8_t v); bool load_sysex(uint8_t b, uint8_t v, uint8_t instance_id);