From 7d16ab6a159ef855699a90e6f756954844552674 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Sat, 28 Sep 2024 22:45:18 -0500 Subject: [PATCH] dynamic_smoother: Fix extra cycle of latency Fixes cycfi/q#74. --- q_lib/include/q/fx/lowpass.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/q_lib/include/q/fx/lowpass.hpp b/q_lib/include/q/fx/lowpass.hpp index 56549425..f2fa96b5 100755 --- a/q_lib/include/q/fx/lowpass.hpp +++ b/q_lib/include/q/fx/lowpass.hpp @@ -238,7 +238,7 @@ namespace cycfi::q auto g = std::min(g0 + sense * std::abs(bandz), 1.0f); low1 = lowlz + g * (s - lowlz); low2 = low2z + g * (low1 - low2z); - return low2z; + return low2; } void base_frequency(frequency base, float sps)