Small fixes for the Volume of the delayed signal.

pull/4/head
Holger Wirtz 6 years ago
parent c0ae59e22a
commit 9eb5ddd580
  1. 6
      MicroDexed.ino
  2. 2
      UI.cpp
  3. 2
      config.h

@ -255,11 +255,11 @@ void setup()
delay1.delay(0, mapfloat(effect_delay_feedback, 0, ENC_DELAY_TIME_STEPS, 0.0, DELAY_MAX_TIME)); delay1.delay(0, mapfloat(effect_delay_feedback, 0, ENC_DELAY_TIME_STEPS, 0.0, DELAY_MAX_TIME));
// mixer1 is the feedback-adding mixer, mixer2 the whole delay (with/without feedback) mixer // mixer1 is the feedback-adding mixer, mixer2 the whole delay (with/without feedback) mixer
mixer1.gain(0, 1.0); // original signal mixer1.gain(0, 1.0); // original signal
mixer1.gain(1, mapfloat(effect_delay_feedback, 0, 99, 0.0, 1.0)); // amount of feedback mixer1.gain(1, mapfloat(effect_delay_feedback, 0, ENC_DELAY_FB_STEPS, 0.0, 1.0)); // amount of feedback
mixer1.gain(0, 0.0); // filtered signal off mixer1.gain(0, 0.0); // filtered signal off
mixer1.gain(3, 1.0); // original signal on mixer1.gain(3, 1.0); // original signal on
mixer2.gain(0, 1.0); // original signal mixer2.gain(0, 1.0); // original signal
mixer2.gain(1, mapfloat(effect_delay_volume, 0, 99, 0.0, 1.0)); // delayed signal (including feedback) mixer2.gain(1, mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delayed signal (including feedback)
// load default SYSEX data // load default SYSEX data
load_sysex(bank, voice); load_sysex(bank, voice);
@ -649,7 +649,7 @@ bool queue_midi_event(uint8_t type, uint8_t data1, uint8_t data2)
break; break;
case 0x6B: // CC 107: delay volume case 0x6B: // CC 107: delay volume
effect_delay_volume = map(data2, 0, 127, 0, ENC_DELAY_VOLUME_STEPS); effect_delay_volume = map(data2, 0, 127, 0, ENC_DELAY_VOLUME_STEPS);
mixer2.gain(1, mapfloat(effect_delay_volume, 0, 99, 0.0, 1.0)); // delay tap1 signal (with added feedback) mixer2.gain(1, mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback)
break; break;
default: default:
break; break;

@ -371,7 +371,7 @@ 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(1, mapfloat(effect_delay_volume, 0, 99, 0.0, 1.0)); // delay tap1 signal (with added feedback) mixer2.gain(1, mapfloat(effect_delay_volume, 0, ENC_DELAY_VOLUME_STEPS, 0.0, 1.0)); // delay tap1 signal (with added feedback)
#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);

@ -70,7 +70,7 @@
// Debug output // Debug output
#define SERIAL_SPEED 38400 #define SERIAL_SPEED 38400
//#define DEBUG 1 #define DEBUG 1
#define SHOW_MIDI_EVENT 1 #define SHOW_MIDI_EVENT 1
#define SHOW_XRUN 1 #define SHOW_XRUN 1
#define SHOW_CPU_LOAD_MSEC 5000 #define SHOW_CPU_LOAD_MSEC 5000

Loading…
Cancel
Save