Several fixes.

pull/15/head^2
Holger Wirtz 5 years ago
parent 00473d40ce
commit a3215de56d
  1. 15
      MicroDexed.ino
  2. 6
      config.h

@ -86,8 +86,8 @@ AudioConnection patchCord2(chorus_mixer, 0, modchorus, 0);
AudioConnection patchCord3(delay_mixer, 0, delay_fb_mixer, 0);
AudioConnection patchCord4(delay_fb_mixer, delay1);
AudioConnection patchCord5(delay1, 0, delay_fb_mixer, 1);
AudioConnection patchCord6(delay_mixer, 0, master_mixer_r, 2);
AudioConnection patchCord7(delay_mixer, 0, master_mixer_l, 2);
AudioConnection patchCord6(delay1, 0, master_mixer_r, 2);
AudioConnection patchCord7(delay1, 0, master_mixer_l, 2);
AudioConnection patchCord8(master_mixer_r, volume_r);
AudioConnection patchCord9(master_mixer_l, volume_l);
AudioConnection patchCord10(volume_r, 0, stereomono1, 0);
@ -360,7 +360,7 @@ void setup()
#ifdef USE_REVERB
// INIT REVERB
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_l.gain(REVERB, 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
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_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.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
@ -380,7 +380,7 @@ void setup()
// INIT CHORUS
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_l.gain(CHORUS, 1.0);
switch (configuration.chorus_waveform)
@ -395,6 +395,7 @@ void setup()
modulator.begin(WAVEFORM_TRIANGLE);
}
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.offset(0.0);
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT
@ -411,6 +412,8 @@ void setup()
modchorus_inverter.gain(-1.0); // stereo mode
else
modchorus_inverter.gain(1.0); // mono mode
// Filter
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
soften_filter_res[instance_id].init(configuration.dexed[instance_id].filter_resonance);

@ -81,7 +81,7 @@
// CHORUS parameters
#define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(20.0)) // 20.0 ms delay buffer.
#define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE
#define MOD_FILTER_OUTPUT MOD_LINKWITZ_RILEY_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
#define MOD_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
#define MOD_FILTER_CUTOFF_HZ 3000
#define USE_REVERB 1
@ -228,9 +228,9 @@ enum { DEXED, REVERB, DELAY, CHORUS };
// Teensy-3.6 settings
#define MIDI_DEVICE_USB_HOST 1
#if defined(USE_REVERB)
#define MAX_NOTES 12
#define MAX_NOTES 11
#else
#define MAX_NOTES 16
#define MAX_NOTES 14
#endif
#endif

Loading…
Cancel
Save