From bcbce9e1fb8c151fd8e90d0c51aaf451bb06b0b9 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Sun, 8 Dec 2024 19:35:09 +0100 Subject: [PATCH] delay: mix parameter keeps dry signal constant, only fades in wet signal up to 50% --- delay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/delay.c b/delay.c index c73889f..91236c9 100644 --- a/delay.c +++ b/delay.c @@ -42,14 +42,14 @@ void delay_process( for( size_t i = 0; i < frame_size; ++i ) { if( delay->duration > 0 ) { out[i] = - (1.0 - delay->mix) * in[i] - + delay->mix * delay->buf[ delay->buf_idx ]; + 0.5 * in[i] + + 0.5 * delay->mix * delay->buf[ delay->buf_idx ]; delay->buf[ delay->buf_idx ] *= delay->feedback; delay->buf[ delay->buf_idx ] += (1.0 - delay->feedback) * in[i]; delay->buf_idx = (delay->buf_idx + 1) % delay->duration; } else { - out[i] = in[i]; + out[i] = 0.5 * in[i]; } } }