diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp index 071263007b1..4943672229d 100644 --- a/src/common/SurgeStorage.cpp +++ b/src/common/SurgeStorage.cpp @@ -109,6 +109,8 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) last_key[0] = 60; last_key[1] = 60; temposyncratio = 1.f; + temposyncratio_inv = 0.0f; // Use this as a sentinel (since it was not initialized prior to 1.6.5 this was the value at least win and mac had). #1444 + songpos = 0; for (int i = 0; i < n_customcontrollers; i++) diff --git a/src/common/dsp/effect/DualDelayEffect.cpp b/src/common/dsp/effect/DualDelayEffect.cpp index eb1695f4704..baef177771e 100644 --- a/src/common/dsp/effect/DualDelayEffect.cpp +++ b/src/common/dsp/effect/DualDelayEffect.cpp @@ -29,10 +29,22 @@ void DualDelayEffect::init() lp.suspend(); hp.suspend(); setvars(true); + inithadtempo = true; + // See issue #1444 and the fix for this stuff + if( storage->temposyncratio_inv == 0 ) + { + inithadtempo = false; + } } void DualDelayEffect::setvars(bool init) { + if( ! inithadtempo && storage->temposyncratio_inv != 0 ) + { + init = true; + inithadtempo = true; + } + float fb = amp_to_linear(*f[2]); float cf = amp_to_linear(*f[3]); diff --git a/src/common/dsp/effect/FreqshiftEffect.cpp b/src/common/dsp/effect/FreqshiftEffect.cpp index 787d3e57b3c..b31397f5f26 100644 --- a/src/common/dsp/effect/FreqshiftEffect.cpp +++ b/src/common/dsp/effect/FreqshiftEffect.cpp @@ -35,10 +35,24 @@ void FreqshiftEffect::init() fi.reset(); ringout = 10000000; setvars(true); + + inithadtempo = true; + // See issue #1444 and the fix for this stuff + if( storage->temposyncratio_inv == 0 ) + { + inithadtempo = false; + } + } void FreqshiftEffect::setvars(bool init) { + if( ! inithadtempo && storage->temposyncratio_inv != 0 ) + { + init = true; + inithadtempo = true; + } + feedback.newValue(amp_to_linear(*f[fsp_feedback])); if (init) diff --git a/src/common/dsp/effect/effect_defs.h b/src/common/dsp/effect/effect_defs.h index 68d9696fb9b..bdd0a7ba108 100644 --- a/src/common/dsp/effect/effect_defs.h +++ b/src/common/dsp/effect/effect_defs.h @@ -50,6 +50,7 @@ class DualDelayEffect : public Effect private: lag timeL, timeR; + bool inithadtempo; float envf; int wpos; BiquadFilter lp, hp; @@ -121,6 +122,7 @@ class FreqshiftEffect : public Effect private: lipol feedback; lag time, shiftL, shiftR; + bool inithadtempo; float buffer[2][max_delay_length]; int wpos; // CHalfBandFilter<6> frL,fiL,frR,fiR;