Update of /cvsroot/pure-data/externals/chaos/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1940/src
Modified Files: Makefile.am chaos_dsp.hpp lorenz.hpp main.cpp Log Message: getting stable
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/chaos/src/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.cpp 24 Dec 2004 23:20:22 -0000 1.3 --- main.cpp 25 Dec 2004 12:50:41 -0000 1.4 *************** *** 26,30 **** --- 26,33 ---- FLEXT_DSP_SETUP(lorenz_dsp); + FLEXT_SETUP(lorenz_msg); + FLEXT_DSP_SETUP(logistic_dsp); + FLEXT_SETUP(logistic_msg); }
Index: lorenz.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/chaos/src/lorenz.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lorenz.hpp 24 Dec 2004 23:20:22 -0000 1.4 --- lorenz.hpp 25 Dec 2004 12:50:41 -0000 1.5 *************** *** 36,43 ****
CHAOS_SYS_INIT(method,0); ! CHAOS_SYS_INIT(dt,1); CHAOS_SYS_INIT(x1,0.8); ! CHAOS_SYS_INIT(x2,0.8); ! CHAOS_SYS_INIT(x3,0.8); CHAOS_SYS_INIT(sigma,16); CHAOS_SYS_INIT(b,4); --- 36,43 ----
CHAOS_SYS_INIT(method,0); ! CHAOS_SYS_INIT(dt,0.01); CHAOS_SYS_INIT(x1,0.8); ! CHAOS_SYS_INIT(x2,0.7); ! CHAOS_SYS_INIT(x3,0.6); CHAOS_SYS_INIT(sigma,16); CHAOS_SYS_INIT(b,4); *************** *** 61,65 **** deriv[0] = CHAOS_PARAMETER(sigma) * (x2 - x1); deriv[1] = - x1 * x3 + CHAOS_PARAMETER(r) * x1 - x2; ! deriv[3] = x1 * x2 - CHAOS_PARAMETER(b) * x3; }
--- 61,65 ---- deriv[0] = CHAOS_PARAMETER(sigma) * (x2 - x1); deriv[1] = - x1 * x3 + CHAOS_PARAMETER(r) * x1 - x2; ! deriv[2] = x1 * x2 - CHAOS_PARAMETER(b) * x3; }
Index: Makefile.am =================================================================== RCS file: /cvsroot/pure-data/externals/chaos/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 24 Dec 2004 23:20:22 -0000 1.3 --- Makefile.am 25 Dec 2004 12:50:41 -0000 1.4 *************** *** 2,6 ****
BUILT_SOURCES = main.cpp ode_base.cpp chaos_base.cpp chaos_dsp.cpp \ ! lorenz_dsp.cpp logistic_dsp.cpp
--- 2,7 ----
BUILT_SOURCES = main.cpp ode_base.cpp chaos_base.cpp chaos_dsp.cpp \ ! lorenz_dsp.cpp lorenz_msg.cpp \ ! logistic_dsp.cpp logistic_msg.cpp
Index: chaos_dsp.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/chaos/src/chaos_dsp.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** chaos_dsp.hpp 24 Dec 2004 23:20:22 -0000 1.3 --- chaos_dsp.hpp 25 Dec 2004 12:50:41 -0000 1.4 *************** *** 186,191 ****
! /* linear and cubic interpolation adapted from supercollider by James McCartney */ ! template <class system> void chaos_dsp<system>::m_signal_l(int n, t_sample *const *insigs, --- 186,190 ----
! /* linear interpolation adapted from supercollider by James McCartney */ template <class system> void chaos_dsp<system>::m_signal_l(int n, t_sample *const *insigs, *************** *** 227,230 **** --- 226,230 ----
+ /* linear interpolation adapted from Numerical Recipes In C */ template <class system> void chaos_dsp<system>::m_signal_c(int n, t_sample *const *insigs, *************** *** 254,261 **** float fseglen = (float)phase; ! m_curves[j] = 2.f * (m_nextmidpts[j] - m_values[j] - fseglen * m_slopes[j]) / (fseglen * fseglen + fseglen); - - m_values[j] = value; } } --- 254,260 ---- float fseglen = (float)phase; ! m_curves[j] = 2.f * (m_nextmidpts[j] - m_values[j] - ! fseglen * m_slopes[j]) / (fseglen * fseglen + fseglen); } }