|
|
@ -86,8 +86,8 @@ AudioConnection patchCord2(chorus_mixer, 0, modchorus, 0); |
|
|
|
AudioConnection patchCord3(delay_mixer, 0, delay_fb_mixer, 0); |
|
|
|
AudioConnection patchCord3(delay_mixer, 0, delay_fb_mixer, 0); |
|
|
|
AudioConnection patchCord4(delay_fb_mixer, delay1); |
|
|
|
AudioConnection patchCord4(delay_fb_mixer, delay1); |
|
|
|
AudioConnection patchCord5(delay1, 0, delay_fb_mixer, 1); |
|
|
|
AudioConnection patchCord5(delay1, 0, delay_fb_mixer, 1); |
|
|
|
AudioConnection patchCord6(delay_mixer, 0, master_mixer_r, 2); |
|
|
|
AudioConnection patchCord6(delay1, 0, master_mixer_r, 2); |
|
|
|
AudioConnection patchCord7(delay_mixer, 0, master_mixer_l, 2); |
|
|
|
AudioConnection patchCord7(delay1, 0, master_mixer_l, 2); |
|
|
|
AudioConnection patchCord8(master_mixer_r, volume_r); |
|
|
|
AudioConnection patchCord8(master_mixer_r, volume_r); |
|
|
|
AudioConnection patchCord9(master_mixer_l, volume_l); |
|
|
|
AudioConnection patchCord9(master_mixer_l, volume_l); |
|
|
|
AudioConnection patchCord10(volume_r, 0, stereomono1, 0); |
|
|
|
AudioConnection patchCord10(volume_r, 0, stereomono1, 0); |
|
|
@ -360,7 +360,7 @@ void setup() |
|
|
|
#ifdef USE_REVERB |
|
|
|
#ifdef USE_REVERB |
|
|
|
// INIT REVERB
|
|
|
|
// INIT REVERB
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
reverb_mixer.gain(instance_id, 0.0); |
|
|
|
reverb_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
master_mixer_r.gain(REVERB, 1.0); |
|
|
|
master_mixer_r.gain(REVERB, 1.0); |
|
|
|
master_mixer_l.gain(REVERB, 1.0); |
|
|
|
master_mixer_l.gain(REVERB, 1.0); |
|
|
|
freeverbs1.roomsize(mapfloat(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
freeverbs1.roomsize(mapfloat(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
@ -369,10 +369,10 @@ void setup() |
|
|
|
|
|
|
|
|
|
|
|
// INIT DELAY
|
|
|
|
// INIT DELAY
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
delay_mixer.gain(instance_id, 0.0); |
|
|
|
delay_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
master_mixer_r.gain(DELAY, 1.0); |
|
|
|
master_mixer_r.gain(DELAY, 1.0); |
|
|
|
master_mixer_l.gain(DELAY, 1.0); |
|
|
|
master_mixer_l.gain(DELAY, 1.0); |
|
|
|
delay1.delay(0, mapfloat(configuration.delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
delay1.delay(0, mapfloat(configuration.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 is the feedback-adding mixer
|
|
|
|
//delay_fb_mixer.gain(0, 1.0 - (mapfloat(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0))); // original signal
|
|
|
|
//delay_fb_mixer.gain(0, 1.0 - (mapfloat(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0))); // original signal
|
|
|
|
delay_fb_mixer.gain(0, 1.0); // original signal
|
|
|
|
delay_fb_mixer.gain(0, 1.0); // original signal
|
|
|
@ -380,7 +380,7 @@ void setup() |
|
|
|
|
|
|
|
|
|
|
|
// INIT CHORUS
|
|
|
|
// INIT CHORUS
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
chorus_mixer.gain(instance_id, 0.0); |
|
|
|
chorus_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
master_mixer_r.gain(CHORUS, 1.0); |
|
|
|
master_mixer_r.gain(CHORUS, 1.0); |
|
|
|
master_mixer_l.gain(CHORUS, 1.0); |
|
|
|
master_mixer_l.gain(CHORUS, 1.0); |
|
|
|
switch (configuration.chorus_waveform) |
|
|
|
switch (configuration.chorus_waveform) |
|
|
@ -395,6 +395,7 @@ void setup() |
|
|
|
modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
} |
|
|
|
} |
|
|
|
modulator.phase(0); |
|
|
|
modulator.phase(0); |
|
|
|
|
|
|
|
modulator.frequency(configuration.chorus_frequency / 10.0); |
|
|
|
modulator.amplitude(mapfloat(configuration.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 0.0, 1.0)); |
|
|
|
modulator.amplitude(mapfloat(configuration.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 0.0, 1.0)); |
|
|
|
modulator.offset(0.0); |
|
|
|
modulator.offset(0.0); |
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
@ -411,6 +412,8 @@ void setup() |
|
|
|
modchorus_inverter.gain(-1.0); // stereo mode
|
|
|
|
modchorus_inverter.gain(-1.0); // stereo mode
|
|
|
|
else |
|
|
|
else |
|
|
|
modchorus_inverter.gain(1.0); // mono mode
|
|
|
|
modchorus_inverter.gain(1.0); // mono mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Filter
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
soften_filter_res[instance_id].init(configuration.dexed[instance_id].filter_resonance); |
|
|
|
soften_filter_res[instance_id].init(configuration.dexed[instance_id].filter_resonance); |
|
|
|