From 5f5f73adc11304f2e59ca13c78548b709580064b Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sun, 14 Jan 2024 16:28:49 -0500 Subject: [PATCH] Sine OSC Feedback Modulation Fix The Sin OSC feedback evaluated whether feedback was negative per block not per sample, making it somewhat discontinuous when modulated. Addresses #7353 --- src/common/dsp/oscillators/SineOscillator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/dsp/oscillators/SineOscillator.cpp b/src/common/dsp/oscillators/SineOscillator.cpp index 33c4d7e3213..c429fc7d6f2 100644 --- a/src/common/dsp/oscillators/SineOscillator.cpp +++ b/src/common/dsp/oscillators/SineOscillator.cpp @@ -640,7 +640,6 @@ void SineOscillator::process_block_internal(float pitch, float drift, float fmde p[i] = 0.0; auto outattensse = _mm_set1_ps(out_attenuation); - auto fbnegmask = _mm_cmplt_ps(_mm_set1_ps(fb_val), _mm_setzero_ps()); __m128 playramp[4], dramp[4]; if (firstblock) { @@ -686,6 +685,7 @@ void SineOscillator::process_block_internal(float pitch, float drift, float fmde float fmpd = FM ? FMdepth.v * master_osc[k] : 0.f; auto fmpds = _mm_set1_ps(fmpd); auto fbv = _mm_set1_ps(FB.v); + auto fbnegmask = _mm_cmplt_ps(fbv, _mm_setzero_ps()); for (int u = 0; u < n_unison; u += 4) {