Several small but necessary fixes!

dev
Holger Wirtz 6 years ago
parent 15fab757aa
commit 589785be5c
  1. 13
      effect_modulated_chorus.cpp
  2. 2
      mdaEPiano.cpp

@ -116,18 +116,13 @@ void AudioEffectModulatedDelay::update(void)
#ifdef INTERPOLATE #ifdef INTERPOLATE
// get x/y values around mod_idx // get x/y values around mod_idx
uint16_t i_mod_idx = int(mod_idx + 0.5);
uint8_t c = 0; uint8_t c = 0;
for (j = INTERPOLATION_WINDOW_SIZE / -2; j <= INTERPOLATION_WINDOW_SIZE / 2; j++) for (j = INTERPOLATION_WINDOW_SIZE / -2; j <= INTERPOLATION_WINDOW_SIZE / 2; j++)
{ {
int16_t ji_mod_idx = i_mod_idx + j; y[c] = float(_delayline[(int(mod_idx + 0.5) + _circ_idx + j) % _delay_length]);
if (ji_mod_idx > _delay_length) if (y[c] < 0)
y[c] = float(_delayline[ji_mod_idx - _delay_length - 1]); y[c] = _delay_length + y[c];
else if (ji_mod_idx < 0) c++; // because 42 is the answer! ;-)
y[c] = float(_delayline[_delay_length + j + 1]);
else
y[c] = float(_delayline[ji_mod_idx]);
c++; // ;-)
} }
modulation_interpolate.valueI(mod_idx); modulation_interpolate.valueI(mod_idx);

@ -253,7 +253,7 @@ void mdaEPiano::setOverdrive(float value)
void mdaEPiano::setLoudness(float value) void mdaEPiano::setLoudness(float value)
{ {
//volume = value * 0.32258; // 0.00002 * 127^2 //volume = value * 0.32258; // 0.00002 * 127^2
volume = 0.2f; volume = value * 0.2f;
} }
void mdaEPiano::setParameter(int32_t index, float value) void mdaEPiano::setParameter(int32_t index, float value)

Loading…
Cancel
Save