diff --git a/src/common/dsp/oscillators/ModernOscillator.cpp b/src/common/dsp/oscillators/ModernOscillator.cpp index 5ee749618b1..a19edacb2b1 100644 --- a/src/common/dsp/oscillators/ModernOscillator.cpp +++ b/src/common/dsp/oscillators/ModernOscillator.cpp @@ -125,8 +125,8 @@ void ModernOscillator::init(float pitch, bool is_display, bool nonzero_init_drif { // we need a tiny little portamento since the derivative is pretty // unstable under super big pitch changes - pitchlag.setRate(0.5); - pitchlag.startValue(pitch); + pitchlag.newValue(pitch); + pitchlag.instantize(); pwidth.setRate(0.001); // 4x slower sync.setRate(0.001 * BLOCK_SIZE_OS); @@ -171,7 +171,7 @@ void ModernOscillator::process_sblk(float pitch, float drift, bool stereo, float float ud = oscdata->p[mo_unison_detune].get_extended( localcopy[oscdata->p[mo_unison_detune].param_id_in_scene].f); - pitchlag.startValue(pitch); + pitchlag.newValue(pitch); sync.newValue(std::max(0.f, localcopy[oscdata->p[mo_sync].param_id_in_scene].f)); float absOff = 0; diff --git a/src/common/dsp/oscillators/ModernOscillator.h b/src/common/dsp/oscillators/ModernOscillator.h index 2c79ad60c35..e86a0d15e54 100644 --- a/src/common/dsp/oscillators/ModernOscillator.h +++ b/src/common/dsp/oscillators/ModernOscillator.h @@ -75,8 +75,9 @@ class ModernOscillator : public Oscillator template void process_sblk(float pitch, float drift = 0.f, bool stereo = false, float FMdepth = 0.f); - lag sawmix, trimix, sqrmix, pwidth, sync, dpbase[MAX_UNISON], dspbase[MAX_UNISON], - subdpbase, subdpsbase, detune, pitchlag, fmdepth; + lag sawmix, trimix, sqrmix, pwidth, sync, detune, fmdepth; + lipol pitchlag,dpbase[MAX_UNISON], dspbase[MAX_UNISON], + subdpbase, subdpsbase; // character filter Surge::Oscillator::CharacterFilter charFilt;