|
|
|
@ -443,12 +443,8 @@ void setup() |
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(DEXED, 1.0); |
|
|
|
|
master_mixer_l.gain(DEXED, 1.0); |
|
|
|
|
master_mixer_r.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
set_fx_params(); |
|
|
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
@ -459,91 +455,10 @@ void setup() |
|
|
|
|
dexed_mixer_r.gain(instance_id, 1.0); |
|
|
|
|
dexed_mixer_l.gain(instance_id, 1.0); |
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// INIT REVERB
|
|
|
|
|
reverb_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
reverb_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// INIT DELAY
|
|
|
|
|
delay_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
delay_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// INIT CHORUS
|
|
|
|
|
chorus_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
chorus_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// DEXED FILTER
|
|
|
|
|
//MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX);
|
|
|
|
|
MicroDexed[instance_id]->fx.Gain = 1.0; |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Dexed output level
|
|
|
|
|
dexed_level[instance_id]->gain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); |
|
|
|
|
|
|
|
|
|
// PANORAMA
|
|
|
|
|
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// DELAY
|
|
|
|
|
delay_r.delay(0, mapfloat(configuration.fx.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
delay_l.delay(0, mapfloat(configuration.fx.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
// delay_fb_mixer is the feedback-adding mixer
|
|
|
|
|
delay_fb_mixer_r.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_r.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
delay_fb_mixer_l.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_l.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
|
|
|
|
|
// CHORUS
|
|
|
|
|
switch (configuration.fx.chorus_waveform) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_SINE); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
|
set_voiceconfig_params(instance_id); |
|
|
|
|
} |
|
|
|
|
chorus_modulator.phase(0); |
|
|
|
|
chorus_modulator.frequency(configuration.fx.chorus_frequency / 10.0); |
|
|
|
|
chorus_modulator.amplitude(mapfloat(configuration.fx.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 0.0, 1.0)); |
|
|
|
|
chorus_modulator.offset(0.0); |
|
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
|
// Butterworth filter, 12 db/octave
|
|
|
|
|
modchorus_filter_r.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
|
modchorus_filter_l.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
|
#elif MOD_FILTER_OUTPUT == MOD_LINKWITZ_RILEY_FILTER_OUTPUT |
|
|
|
|
// Linkwitz-Riley filter, 48 dB/octave
|
|
|
|
|
modchorus_filter_r.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_r.setLowpass(1, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_r.setLowpass(2, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_r.setLowpass(3, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_l.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_l.setLowpass(1, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_l.setLowpass(2, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_l.setLowpass(3, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// REVERB
|
|
|
|
|
freeverb_r.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_r.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_l.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_l.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// MONO/STEREO
|
|
|
|
|
if (configuration.sys.mono == 0) |
|
|
|
|
modchorus_inverter.gain(-1.0); // stereo mode
|
|
|
|
|
else |
|
|
|
|
modchorus_inverter.gain(1.0); // mono mode
|
|
|
|
|
|
|
|
|
|
// set initial volume
|
|
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
set_sys_params(); |
|
|
|
|
|
|
|
|
|
// Initialize processor and memory measurements
|
|
|
|
|
AudioProcessorUsageMaxReset(); |
|
|
|
@ -708,7 +623,6 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
if (inValue < MAX_BANKS - 1) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.bank[instance_id] = inValue; |
|
|
|
|
//eeprom_write();
|
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
@ -736,7 +650,6 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
case 5: // Portamento time
|
|
|
|
|
configuration.dexed[instance_id].portamento_time = inValue; |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 7: // Instance Volume
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -748,7 +661,6 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
#else |
|
|
|
|
dexed_level[instance_id]->gain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); |
|
|
|
|
#endif |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 10: // Pan
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -756,14 +668,12 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
#endif |
|
|
|
|
configuration.dexed[instance_id].pan = map(inValue, 0, 0x7f, PANORAMA_MIN, PANORAMA_MAX); |
|
|
|
|
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0)); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 32: // BankSelect LSB
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("BANK-SELECT CC")); |
|
|
|
|
#endif |
|
|
|
|
configuration.performance.bank[instance_id] = inValue; |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 64: |
|
|
|
|
MicroDexed[instance_id]->setSustain(inValue > 63); |
|
|
|
@ -781,37 +691,31 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
break; |
|
|
|
|
case 65: |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
case 103: // CC 103: filter resonance
|
|
|
|
|
configuration.dexed[instance_id].filter_resonance = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX); |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 104: // CC 104: filter cutoff
|
|
|
|
|
configuration.dexed[instance_id].filter_cutoff = map(inValue, 0, 0x7f, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 105: // CC 105: delay time
|
|
|
|
|
configuration.fx.delay_time = map(inValue, 0, 0x7f, DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
|
delay_r.delay(0, configuration.fx.delay_time * 10); |
|
|
|
|
delay_l.delay(0, configuration.fx.delay_time * 10); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
case 106: // CC 106: delay feedback
|
|
|
|
|
configuration.fx.delay_feedback = map(inValue, 0, 0x7f, DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX); |
|
|
|
|
//delay_fb_mixer_r.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_r.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
//delay_fb_mixer_l.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_l.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 107: // CC 107: delay volume
|
|
|
|
|
configuration.dexed[instance_id].delay_send = map(inValue, 0, 0x7f, DELAY_SEND_MIN, DELAY_SEND_MAX); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
case 120: |
|
|
|
@ -825,11 +729,9 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
break; |
|
|
|
|
case 126: |
|
|
|
|
MicroDexed[instance_id]->setMonoMode(true); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
case 127: |
|
|
|
|
MicroDexed[instance_id]->setMonoMode(false); |
|
|
|
|
//eeprom_write();
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1591,6 +1493,112 @@ bool eeprom_get_performance() |
|
|
|
|
return (true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|
PARAMETER-HELPERS |
|
|
|
|
******************************************************************************/ |
|
|
|
|
|
|
|
|
|
void set_fx_params(void) |
|
|
|
|
{ |
|
|
|
|
master_mixer_r.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(CHORUS, mapfloat(configuration.fx.chorus_level, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(DELAY, mapfloat(configuration.fx.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_l.gain(REVERB, mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// DELAY
|
|
|
|
|
delay_r.delay(0, mapfloat(configuration.fx.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
delay_l.delay(0, mapfloat(configuration.fx.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
// delay_fb_mixer is the feedback-adding mixer
|
|
|
|
|
delay_fb_mixer_r.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_r.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
delay_fb_mixer_l.gain(0, 1.0); // original signal
|
|
|
|
|
delay_fb_mixer_l.gain(1, mapfloat(configuration.fx.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
|
|
|
|
|
|
|
|
|
|
// CHORUS
|
|
|
|
|
switch (configuration.fx.chorus_waveform) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_SINE); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
chorus_modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
|
} |
|
|
|
|
chorus_modulator.phase(0); |
|
|
|
|
chorus_modulator.frequency(configuration.fx.chorus_frequency / 10.0); |
|
|
|
|
chorus_modulator.amplitude(mapfloat(configuration.fx.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 0.0, 1.0)); |
|
|
|
|
chorus_modulator.offset(0.0); |
|
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
|
// Butterworth filter, 12 db/octave
|
|
|
|
|
modchorus_filter_r.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
|
modchorus_filter_l.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.707); |
|
|
|
|
#elif MOD_FILTER_OUTPUT == MOD_LINKWITZ_RILEY_FILTER_OUTPUT |
|
|
|
|
// Linkwitz-Riley filter, 48 dB/octave
|
|
|
|
|
modchorus_filter_r.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_r.setLowpass(1, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_r.setLowpass(2, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_r.setLowpass(3, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_l.setLowpass(0, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_l.setLowpass(1, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
modchorus_filter_l.setLowpass(2, MOD_FILTER_CUTOFF_HZ, 0.54); |
|
|
|
|
modchorus_filter_l.setLowpass(3, MOD_FILTER_CUTOFF_HZ, 1.3); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// REVERB
|
|
|
|
|
freeverb_r.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_r.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_l.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_l.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void set_voiceconfig_params(uint8_t instance_id) |
|
|
|
|
{ |
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// INIT REVERB
|
|
|
|
|
reverb_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
reverb_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// INIT DELAY
|
|
|
|
|
delay_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
delay_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// INIT CHORUS
|
|
|
|
|
chorus_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
chorus_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
|
|
|
|
|
// DEXED FILTER
|
|
|
|
|
//MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX);
|
|
|
|
|
MicroDexed[instance_id]->fx.Gain = 1.0; |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Dexed output level
|
|
|
|
|
dexed_level[instance_id]->gain(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)); |
|
|
|
|
|
|
|
|
|
// PANORAMA
|
|
|
|
|
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void set_sys_params(void) |
|
|
|
|
{ |
|
|
|
|
// MONO/STEREO
|
|
|
|
|
if (configuration.sys.mono == 0) |
|
|
|
|
modchorus_inverter.gain(-1.0); // stereo mode
|
|
|
|
|
else |
|
|
|
|
modchorus_inverter.gain(1.0); // mono mode
|
|
|
|
|
|
|
|
|
|
// set initial volume
|
|
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
|
HELPERS |
|
|
|
|
******************************************************************************/ |
|
|
|
|