From 15233c6d34e180365a796e322ea2a81913139009 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 28 Aug 2023 09:02:31 +0200 Subject: [PATCH] clamp fft value to prevent hard error --- packages/superdough/superdough.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index d5a2ca3f5..da81c6290 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -276,6 +276,7 @@ export const superdough = async (value, deadline, hapDuration) => { // analyser let analyserSend; if (analyze) { + fft = clamp(fft, 1, 10); const analyserNode = getAnalyser(/* orbit, */ 2 ** (fft + 5)); analyserSend = effectSend(post, analyserNode, analyze); }