From eced45909ba691a454fec179360ec1c2663f773a Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sat, 25 Dec 2004 12:50:41 +0000 Subject: getting stable svn path=/trunk/externals/tb/; revision=2429 --- chaos/src/chaos_dsp.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chaos/src/chaos_dsp.hpp') 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::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 void chaos_dsp::m_signal_l(int n, t_sample *const *insigs, t_sample *const *outsigs) @@ -226,6 +225,7 @@ void chaos_dsp::m_signal_l(int n, t_sample *const *insigs, } +/* linear interpolation adapted from Numerical Recipes In C */ template void chaos_dsp::m_signal_c(int n, t_sample *const *insigs, t_sample *const *outsigs) @@ -253,10 +253,9 @@ void chaos_dsp::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; } } -- cgit v1.2.1