Setting initial effect values at startup.

Small fixes.
pull/4/head
Holger Wirtz 6 years ago
parent 1bab42b0cc
commit 685794ab2a
  1. 13
      MicroDexed.ino
  2. 2
      UI.cpp

@ -227,14 +227,15 @@ void setup()
}
#endif
// fixed delay options
delay1.delay(0, 1000);
// Init effects
filter1.frequency(effect_filter_frq);
filter1.resonance(mapfloat(effect_filter_resonance, 0, ENC_FILTER_RES_STEPS, 0.7, 5.0));
filter1.octaveControl(mapfloat(effect_filter_octave, 0, ENC_FILTER_OCT_STEPS, 0.0, 7.0));
delay1.delay(0, map(effect_delay_feedback, 0, ENC_DELAY_TIME_STEPS, 0, DELAY_MAX_TIME));
mixer1.gain(0, 1.0); // original signal
mixer1.gain(1, 0.0); // delay tap signal (feedback loop)
mixer1.gain(1, mapfloat(effect_delay_feedback,0,99,0.0,1.0)); // delay tap signal (feedback loop)
// fixed filter options
filter1.frequency(20000);
filter1.resonance(1);
filter1.octaveControl(1);
// load default SYSEX data
load_sysex(bank, voice);
}

@ -307,7 +307,7 @@ void handle_ui(void)
else if (enc[i].read() > ENC_FILTER_OCT_STEPS)
enc[i].write(ENC_FILTER_OCT_STEPS);
effect_filter_octave = enc[i].read();
filter1.octaveControl(mapfloat(enc[i].read(), 0, ENC_FILTER_OCT_STEPS, 0.0, 7.0));
filter1.octaveControl(mapfloat(effect_filter_octave, 0, ENC_FILTER_OCT_STEPS, 0.0, 7.0));
break;
}
ui_show_effects_filter();

Loading…
Cancel
Save