From 4d69f4ccb8015006651bd080e70738d47b276f6d Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 3 Nov 2021 04:25:54 -0400 Subject: [PATCH] Tweak Delay DSP tape speed. --- src/Delay.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Delay.cpp b/src/Delay.cpp index 65a6843..7238157 100644 --- a/src/Delay.cpp +++ b/src/Delay.cpp @@ -132,11 +132,11 @@ struct Delay : Module { historyBuffer.push(dry); } - if (outBuffer.empty() && historyBuffer.size() >= 2) { + if (outBuffer.empty()) { // How many samples do we need consume to catch up? float consume = index - historyBuffer.size(); - double ratio = std::pow(2.f, clamp(consume / 1000.f, -1.f, 1.f)); - // DEBUG("index %f historyBuffer %lu consume %f ratio %f", index, historyBuffer.size(), consume, ratio); + double ratio = std::pow(4.f, clamp(consume / 10000.f, -1.f, 1.f)); + // DEBUG("index %f historyBuffer %lu consume %f ratio %lf", index, historyBuffer.size(), consume, ratio); // Convert samples from the historyBuffer to catch up or slow down so `index` and `historyBuffer.size()` eventually match approximately SRC_DATA srcData; @@ -149,6 +149,7 @@ struct Delay : Module { src_process(src, &srcData); historyBuffer.startIncr(srcData.input_frames_used); outBuffer.endIncr(srcData.output_frames_gen); + // DEBUG("used %ld gen %ld", srcData.input_frames_used, srcData.output_frames_gen); } float wet = 0.f;