diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-12-21 09:22:10 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:57 +0200 |
commit | 5233c01a26329306c9f1d08c1a39733aee2cc518 (patch) | |
tree | 27ea384742c0ebeed4439ab0874ea1af79f1bccf /chaos/src/chaos_dsp.hpp | |
parent | cde59e47632b062410739af9064d906be182e589 (diff) |
This commit was generated by cvs2svn to compensate for changes in r2423,
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/externals/tb/; revision=2424
Diffstat (limited to 'chaos/src/chaos_dsp.hpp')
-rw-r--r-- | chaos/src/chaos_dsp.hpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/chaos/src/chaos_dsp.hpp b/chaos/src/chaos_dsp.hpp new file mode 100644 index 0000000..12efaa8 --- /dev/null +++ b/chaos/src/chaos_dsp.hpp @@ -0,0 +1,61 @@ +// +// +// chaos~ +// Copyright (C) 2004 Tim Blechmann +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +#include "chaos_base.hpp" + +class chaos_dsp + : public flext_dsp +{ + FLEXT_HEADER(chaos_dsp, flext_dsp); + +protected: + + /* signal functions: */ + /* for frequency = sr/2 */ + void m_signal_(int n, t_sample *const *insigs,t_sample *const *outsigs); + /* sample & hold */ + void m_signal_n(int n, t_sample *const *insigs,t_sample *const *outsigs); + /* linear interpolation */ + void m_signal_l(int n, t_sample *const *insigs,t_sample *const *outsigs); + /* cubic interpolatio */ + void m_signal_c(int n, t_sample *const *insigs,t_sample *const *outsigs); + + virtual void m_signal(int n, t_sample *const *insigs,t_sample *const *outsigs); + virtual void m_dsp(int n, t_sample *const *insigs,t_sample *const *outsigs); + + + /* local data for system, output and interpolation */ + chaos_base * m_system; /* the system */ + + t_sample * m_values; /* actual value */ + t_sample * m_slopes; /* actual slope for cubic interpolation */ + + t_sample * m_nextvalues; + t_sample * m_nextmidpts; + t_sample * m_curves; + + /* local data for signal functions */ + float m_freq; /* frequency of oscillations */ + int m_phase; /* phase counter */ + float m_sr; /* sample rate */ + + char m_method; /* interpolation method */ + +}; |