From 208af455292e082c5153210e817d9eb839cadcd5 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 23 Nov 2024 12:26:02 +0100 Subject: [PATCH] restrict max fc smoothing to 5*64 samples --- src/rvoice/fluid_iir_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rvoice/fluid_iir_filter.c b/src/rvoice/fluid_iir_filter.c index 70f51934e..b3d1702c0 100644 --- a/src/rvoice/fluid_iir_filter.c +++ b/src/rvoice/fluid_iir_filter.c @@ -395,7 +395,7 @@ void fluid_iir_filter_calc(fluid_iir_filter_t *iir_filter, { int fres_incr_count = FLUID_BUFSIZE; fluid_real_t num_buffers = iir_filter->last_q; - fluid_clip(num_buffers, 1, 8); + fluid_clip(num_buffers, 1, 5); // For high values of Q, the phase gets really steep. To prevent clicks when quickly modulating fres in this case, we need to smooth out "slower". // This is done by simply using Q times FLUID_BUFSIZE samples for the interpolation to complete, capped at 8. fres_incr_count *= num_buffers;