|
|
@ -301,6 +301,21 @@ void setup() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
|
|
|
generate_version_string(version_string, sizeof(version_string)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed")); |
|
|
|
|
|
|
|
Serial.println(F("(c)2018-2021 H. Wirtz <wirtz@parasitstudio.de>")); |
|
|
|
|
|
|
|
Serial.println(F("https://codeberg.org/dcoredump/MicroDexed")); |
|
|
|
|
|
|
|
Serial.print(F("Version: ")); |
|
|
|
|
|
|
|
Serial.println(version_string); |
|
|
|
|
|
|
|
Serial.print(F("CPU-Speed: ")); |
|
|
|
|
|
|
|
Serial.print(F_CPU / 1000000.0, 1); |
|
|
|
|
|
|
|
Serial.println(F(" MHz")); |
|
|
|
|
|
|
|
Serial.println(F("<setup start>")); |
|
|
|
|
|
|
|
Serial.flush(); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
setup_midi_devices(); |
|
|
|
setup_midi_devices(); |
|
|
|
|
|
|
|
|
|
|
|
// Start audio system
|
|
|
|
// Start audio system
|
|
|
@ -376,6 +391,17 @@ void setup() |
|
|
|
create_audio_engine_chain(instance_id); |
|
|
|
create_audio_engine_chain(instance_id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Serial.print(F("Instance ")); |
|
|
|
|
|
|
|
Serial.print(instance_id); |
|
|
|
|
|
|
|
Serial.print(F(": ")); |
|
|
|
|
|
|
|
Serial.print(MicroDexed[instance_id]->getMaxNotes()); |
|
|
|
|
|
|
|
Serial.println(F(" voices")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|
// Init effects
|
|
|
|
// Init effects
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
@ -397,29 +423,6 @@ void setup() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
|
|
|
generate_version_string(version_string, sizeof(version_string)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed")); |
|
|
|
|
|
|
|
Serial.println(F("(c)2018-2021 H. Wirtz <wirtz@parasitstudio.de>")); |
|
|
|
|
|
|
|
Serial.println(F("https://codeberg.org/dcoredump/MicroDexed")); |
|
|
|
|
|
|
|
Serial.print(F("Version: ")); |
|
|
|
|
|
|
|
Serial.println(version_string); |
|
|
|
|
|
|
|
Serial.print(F("CPU-Speed: ")); |
|
|
|
|
|
|
|
Serial.print(F_CPU / 1000000.0, 1); |
|
|
|
|
|
|
|
Serial.println(F(" MHz")); |
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Serial.print(F("Instance ")); |
|
|
|
|
|
|
|
Serial.print(instance_id); |
|
|
|
|
|
|
|
Serial.print(F(": ")); |
|
|
|
|
|
|
|
Serial.print(MicroDexed[instance_id]->getMaxNotes()); |
|
|
|
|
|
|
|
Serial.println(F(" voices")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Serial.println(F("<setup start>")); |
|
|
|
|
|
|
|
Serial.flush(); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initial_values_from_eeprom(false); |
|
|
|
initial_values_from_eeprom(false); |
|
|
|
|
|
|
|
|
|
|
|
// start SD card
|
|
|
|
// start SD card
|
|
|
@ -1597,7 +1600,7 @@ void initial_values_from_eeprom(bool init) |
|
|
|
set_fx_params(); |
|
|
|
set_fx_params(); |
|
|
|
set_sys_params(); |
|
|
|
set_sys_params(); |
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
show_configuration(); |
|
|
|
show_configuration(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1961,7 +1964,7 @@ void set_voiceconfig_params(uint8_t instance_id) |
|
|
|
MicroDexed[instance_id]->ControllersRefresh(); |
|
|
|
MicroDexed[instance_id]->ControllersRefresh(); |
|
|
|
MicroDexed[instance_id]->setOPAll(configuration.dexed[instance_id].op_enabled); |
|
|
|
MicroDexed[instance_id]->setOPAll(configuration.dexed[instance_id].op_enabled); |
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
MicroDexed[instance_id]->setMonoMode(configuration.sys.mono); |
|
|
|
MicroDexed[instance_id]->setMonoMode(configuration.dexed[instance_id].monopoly); |
|
|
|
|
|
|
|
|
|
|
|
// Dexed output level
|
|
|
|
// Dexed output level
|
|
|
|
MicroDexed[instance_id]->setGain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); |
|
|
|
MicroDexed[instance_id]->setGain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); |
|
|
|