[SCM] calf/master: + Wavetable: smoother wavetable

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:24 UTC 2013


The following commit has been merged in the master branch:
commit 85a0d3670873cb7c990ce427791c7187d5f6d4ff
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sat Feb 28 22:49:52 2009 +0000

    + Wavetable: smoother wavetable

diff --git a/src/wavetable.cpp b/src/wavetable.cpp
index 79d9dab..8d17daf 100644
--- a/src/wavetable.cpp
+++ b/src/wavetable.cpp
@@ -116,8 +116,11 @@ wavetable_audio_module::wavetable_audio_module()
             float ph = j * 2 * M_PI / 256;
             float ii = i / 128.0;
             float peak = (32 * ii);
-            float rezo = lerp(sin(floor(peak) * ph), sin(floor(peak+1) * ph), peak - floor(peak));
-            tables[i][j] = 32767 * sin (ph + 2 * ii * sin(2 * ph) + 2 * ii * ii * sin(4 * ph) + ii * ii * rezo);
+            float rezo1 = sin(floor(peak) * ph);
+            float rezo2 = sin(floor(peak + 1) * ph);
+            float v1 = sin (ph + 2 * ii * sin(2 * ph) + 2 * ii * ii * sin(4 * ph) + ii * ii * rezo1);
+            float v2 = sin (ph + 2 * ii * sin(2 * ph) + 2 * ii * ii * sin(4 * ph) + ii * ii * rezo2);
+            tables[i][j] = 32767 * lerp(v1, v2, peak - floor(peak));
         }
     }
 }

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list