diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-12-25 12:50:41 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:57 +0200 |
commit | eced45909ba691a454fec179360ec1c2663f773a (patch) | |
tree | d67d33d3fde0ac583ad01795e3e3736874fb13f4 /chaos/src/chaos_dsp.hpp | |
parent | 5c3670b6322b60b8bc5f60e22d891fe39b854e3e (diff) |
getting stable
svn path=/trunk/externals/tb/; revision=2429
Diffstat (limited to 'chaos/src/chaos_dsp.hpp')
-rw-r--r-- | chaos/src/chaos_dsp.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chaos/src/chaos_dsp.hpp b/chaos/src/chaos_dsp.hpp index c340b88..f03f7c9 100644 --- a/chaos/src/chaos_dsp.hpp +++ b/chaos/src/chaos_dsp.hpp @@ -185,8 +185,7 @@ void chaos_dsp<system>::m_signal_n(int n, t_sample *const *insigs, } -/* linear and cubic interpolation adapted from supercollider by James McCartney */ - +/* linear interpolation adapted from supercollider by James McCartney */ template <class system> void chaos_dsp<system>::m_signal_l(int n, t_sample *const *insigs, t_sample *const *outsigs) @@ -226,6 +225,7 @@ void chaos_dsp<system>::m_signal_l(int n, t_sample *const *insigs, } +/* linear interpolation adapted from Numerical Recipes In C */ template <class system> void chaos_dsp<system>::m_signal_c(int n, t_sample *const *insigs, t_sample *const *outsigs) @@ -253,10 +253,9 @@ void chaos_dsp<system>::m_signal_c(int n, t_sample *const *insigs, m_nextmidpts[j] = (m_values[j] + value) * 0.5f; float fseglen = (float)phase; - m_curves[j] = 2.f * (m_nextmidpts[j] - m_values[j] - fseglen * m_slopes[j]) + m_curves[j] = 2.f * (m_nextmidpts[j] - m_values[j] - + fseglen * m_slopes[j]) / (fseglen * fseglen + fseglen); - - m_values[j] = value; } } |