diff --git a/src/LFO.cpp b/src/LFO.cpp index 5cd410c..fe49273 100644 --- a/src/LFO.cpp +++ b/src/LFO.cpp @@ -15,7 +15,7 @@ struct LowFrequencyOscillator { void setPitch(T pitch) { pitch = simd::fmin(pitch, 10.f); - freq = dsp::approxExp2_taylor5(pitch + 30) / 1073741824; + freq = dsp::approxExp2_taylor5(pitch + 30.f) / std::pow(2.f, 30.f); } void setPulseWidth(T pw) { const T pwMin = 0.01f; diff --git a/src/VCO.cpp b/src/VCO.cpp index 1ae6b4a..b1ddc9f 100644 --- a/src/VCO.cpp +++ b/src/VCO.cpp @@ -52,7 +52,7 @@ struct VoltageControlledOscillator { T sinValue = 0.f; void setPitch(T pitch) { - freq = dsp::FREQ_C4 * dsp::approxExp2_taylor5(pitch + 30) / 1073741824; + freq = dsp::FREQ_C4 * dsp::approxExp2_taylor5(pitch + 30.f) / std::pow(2.f, 30.f); } void setPulseWidth(T pulseWidth) {