Fixed delay volume handling.

pull/4/head
Holger Wirtz 6 years ago
parent e2ad1df2c2
commit 493107327e
  1. 8
      UI.cpp
  2. 2
      config.h

@ -371,9 +371,11 @@ void handle_ui(void)
else if (enc[i].read() > ENC_DELAY_VOLUME_STEPS) else if (enc[i].read() > ENC_DELAY_VOLUME_STEPS)
enc[i].write(ENC_DELAY_VOLUME_STEPS); enc[i].write(ENC_DELAY_VOLUME_STEPS);
effect_delay_volume = enc[i].read(); effect_delay_volume = enc[i].read();
mixer2.gain(0, 1.0-mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback) float tmp_vol = mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0);
mixer2.gain(1, mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback) //mixer2.gain(0, 1.0 - mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback)
mixer2.gain(2, mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback) mixer2.gain(0, 1.0 - tmp_vol); // delay tap1 signal (with added feedback)
mixer2.gain(1, tmp_vol); // delay tap1 signal (with added feedback)
mixer2.gain(2, tmp_vol); // delay tap1 signal
#ifdef DEBUG #ifdef DEBUG
Serial.print(F("Setting delay volume to: ")); Serial.print(F("Setting delay volume to: "));
Serial.println(effect_delay_volume); Serial.println(effect_delay_volume);

@ -36,7 +36,7 @@
#define MIDI_DEVICE Serial1 #define MIDI_DEVICE Serial1
#define USE_ONBOARD_USB_HOST 1 #define USE_ONBOARD_USB_HOST 1
#define MIDI_MERGE_THRU 1 #define MIDI_MERGE_THRU 1
//#define TEENSY_AUDIO_BOARD 1 #define TEENSY_AUDIO_BOARD 1
#define VOLUME 0.6 #define VOLUME 0.6
#define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI #define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI
#define DEFAULT_SYSEXBANK 0 #define DEFAULT_SYSEXBANK 0

Loading…
Cancel
Save