summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-05-29 08:19:25 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-05-29 18:33:36 -0400
commit101cffe6f61fc1594cd63e1f4c6618ca6ee0a3a1 (patch)
tree0334b8209c4ceb96deca5a84b7ba5805e010c47b
parentb6565b212f57e7715c05f8c2607f795f06f30fd3 (diff)
Increase reverb window size to at least 2048 since small FFTs are inefficient
-rw-r--r--reverb.bqn5
1 files changed, 3 insertions, 2 deletions
diff --git a/reverb.bqn b/reverb.bqn
index 867ea26..04a067e 100644
--- a/reverb.bqn
+++ b/reverb.bqn
@@ -5,9 +5,10 @@ Reverb ← {
! 0<lw
# Use the overlap-add method.
o ← lw-1 # Overlap length
- n ← ⌈⌾(2⋆⁼⊢) 3×o # Window length, including overlap
- l ← n-o # Without overlap
k ← lx+o # Result length
+ n ← k⌊(2⋆14)⌈3×o # Window length, including overlap
+ n ⌈⌾(2⋆⁼⊢)↩ # Round up to power of two
+ l ← n-o # Without overlap
k0← ⌈⌾(÷⟜l) k # Rounded up
𝕨 {
CW ← (n↑𝕨) _rev1