[PD-cvs] externals/chaos/src bernoulli_dsp.cpp,NONE,1.1 bernoulli_msg.cpp,NONE,1.1 bungalow_tent_dsp.cpp,NONE,1.1 bungalow_tent_msg.cpp,NONE,1.1 chaos_defs.hpp,NONE,1.1 chaos_msg.hpp,NONE,1.1 circle_map_dsp.cpp,NONE,1.1 circle_map_msg.cpp,NONE,1.1 gauss_map_dsp.cpp,NONE,1.1 gauss_map_msg.cpp,NONE,1.1 henon_map_dsp.cpp,NONE,1.1 henon_map_msg.cpp,NONE,1.1 ikeda_laser_map_dsp.cpp,NONE,1.1 ikeda_laser_map_msg.cpp,NONE,1.1 logistic_dsp.cpp,NONE,1.1 logistic_msg.cpp,NONE,1.1 lorenz_dsp.cpp,NONE,1.1 lorenz_msg.cpp,NONE,1.1 lozi_map_dsp.cpp,NONE,1.1 lozi_map_msg.cpp,NONE,1.1 sine_map_dsp.cpp,NONE,1.1 sine_map_msg.cpp,NONE,1.1 standard_map_dsp.cpp,NONE,1.1 standard_map_msg.cpp,NONE,1.1 tent_map_dsp.cpp,NONE,1.1 tent_map_msg.cpp,NONE,1.1 Makefile.am,1.4,1.5 bernoulli_map.hpp,1.2,1.3 bungalow_tent_map.hpp,1.2,1.3 chaos_dsp.hpp,1.4,1.5 circle_map.hpp,1.2,1.3 gauss_map.hpp,1.2,1.3 henon_map.hpp,1.2,1.3 ikeda_laser_map.hpp,1.2,1.3 lozi_map.hpp,1.2,1.3 main.cpp,1.4,1.5 sine_map.hpp,1.2,1.3 standard_map.hpp,1.2,1.3 tent_map.hpp,1.2,1.3

Tim Blechmann timblech at users.sourceforge.net
Mon Dec 27 15:44:13 CET 2004


Update of /cvsroot/pure-data/externals/chaos/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18492

Modified Files:
	Makefile.am bernoulli_map.hpp bungalow_tent_map.hpp 
	chaos_dsp.hpp circle_map.hpp gauss_map.hpp henon_map.hpp 
	ikeda_laser_map.hpp lozi_map.hpp main.cpp sine_map.hpp 
	standard_map.hpp tent_map.hpp 
Added Files:
	bernoulli_dsp.cpp bernoulli_msg.cpp bungalow_tent_dsp.cpp 
	bungalow_tent_msg.cpp chaos_defs.hpp chaos_msg.hpp 
	circle_map_dsp.cpp circle_map_msg.cpp gauss_map_dsp.cpp 
	gauss_map_msg.cpp henon_map_dsp.cpp henon_map_msg.cpp 
	ikeda_laser_map_dsp.cpp ikeda_laser_map_msg.cpp 
	logistic_dsp.cpp logistic_msg.cpp lorenz_dsp.cpp 
	lorenz_msg.cpp lozi_map_dsp.cpp lozi_map_msg.cpp 
	sine_map_dsp.cpp sine_map_msg.cpp standard_map_dsp.cpp 
	standard_map_msg.cpp tent_map_dsp.cpp tent_map_msg.cpp 
Log Message:
a lot of new objects ...

--- NEW FILE: lozi_map_msg.cpp ---
// 
//  
//  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 "lozi_map.hpp"
#include "chaos_msg.hpp"

class lozi_map_msg:
	public chaos_msg<lozi_map>
{
	CHAOS_MSG_INIT(lozi_map, LOZI_MAP_ATTRIBUTES);

	LOZI_MAP_CALLBACKS;
};



FLEXT_LIB_V("lozi", lozi_map_msg);

Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/main.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** main.cpp	25 Dec 2004 12:50:41 -0000	1.4
--- main.cpp	27 Dec 2004 14:44:11 -0000	1.5
***************
*** 24,33 ****
  {
  	post("chaos~ version "PACKAGE_VERSION"\n");
  	
  	FLEXT_DSP_SETUP(lorenz_dsp);
  	FLEXT_SETUP(lorenz_msg);
  
! 	FLEXT_DSP_SETUP(logistic_dsp);
! 	FLEXT_SETUP(logistic_msg);
  }
  
--- 24,63 ----
  {
  	post("chaos~ version "PACKAGE_VERSION"\n");
+ 
+ 	FLEXT_DSP_SETUP(bernoulli_dsp);
+ 	FLEXT_SETUP(bernoulli_msg);
+ 
+ 	FLEXT_DSP_SETUP(bungalow_tent_dsp);
+ 	FLEXT_SETUP(bungalow_tent_msg);
+ 
+ 	FLEXT_DSP_SETUP(circle_map_dsp);
+ 	FLEXT_SETUP(circle_map_msg);
+ 
+ 	FLEXT_DSP_SETUP(gauss_map_dsp);
+ 	FLEXT_SETUP(gauss_map_msg);
+ 
+ 	FLEXT_DSP_SETUP(henon_dsp);
+ 	FLEXT_SETUP(henon_msg);
+ 
+ 	FLEXT_DSP_SETUP(ikeda_laser_map_dsp);
+ 	FLEXT_SETUP(ikeda_laser_map_msg);
  	
+ 	FLEXT_DSP_SETUP(logistic_dsp);
+ 	FLEXT_SETUP(logistic_msg);
+ 
  	FLEXT_DSP_SETUP(lorenz_dsp);
  	FLEXT_SETUP(lorenz_msg);
  
! 	FLEXT_DSP_SETUP(lozi_map_dsp);
! 	FLEXT_SETUP(lozi_map_msg);
! 
! 	FLEXT_DSP_SETUP(sine_map_dsp);
! 	FLEXT_SETUP(sine_map_msg);
! 
! 	FLEXT_DSP_SETUP(standard_map_dsp);
! 	FLEXT_SETUP(standard_map_msg);
! 
! 	FLEXT_DSP_SETUP(tent_map_dsp);
! 	FLEXT_SETUP(tent_map_msg);
  }
  

--- NEW FILE: standard_map_dsp.cpp ---
// 
//  
//  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 "standard_map.hpp"
#include "chaos_dsp.hpp"

class standard_map_dsp:
	public chaos_dsp<standard_map>
{
	CHAOS_DSP_INIT(standard_map, STANDARD_MAP_ATTRIBUTES);

	STANDARD_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("standard_map~", standard_map_dsp);

--- NEW FILE: circle_map_msg.cpp ---
// 
//  
//  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 "circle_map.hpp"
#include "chaos_msg.hpp"

class circle_map_msg:
	public chaos_msg<circle_map>
{
	CHAOS_MSG_INIT(circle_map, CIRCLE_MAP_ATTRIBUTES);

	CIRCLE_MAP_CALLBACKS;
};



FLEXT_LIB_V("circle_map", circle_map_msg);

--- NEW FILE: sine_map_msg.cpp ---
// 
//  
//  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 "sine_map.hpp"
#include "chaos_msg.hpp"

class sine_map_msg:
	public chaos_msg<sine_map>
{
	CHAOS_MSG_INIT(sine_map, SINE_MAP_ATTRIBUTES);

	SINE_MAP_CALLBACKS;
};



FLEXT_LIB_V("sine_map", sine_map_msg);

--- NEW FILE: circle_map_dsp.cpp ---
// 
//  
//  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 "circle_map.hpp"
#include "chaos_dsp.hpp"

class circle_map_dsp:
	public chaos_dsp<circle_map>
{
	CHAOS_DSP_INIT(circle_map, CIRCLE_MAP_ATTRIBUTES);

	CIRCLE_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("circle_map~", circle_map_dsp);

--- NEW FILE: logistic_msg.cpp ---
// 
//  
//  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 "logistic_map.hpp"
#include "chaos_msg.hpp"

class logistic_msg:
	public chaos_msg<logistic>
{
	CHAOS_MSG_INIT(logistic, LOGISTIC_ATTRIBUTES);

	LOGISTIC_CALLBACKS;
};



FLEXT_LIB_V("logistic", logistic_msg);

Index: tent_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/tent_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tent_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- tent_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 26,34 ****
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class tent:
! 	protected map_base
  {
  public:
! 	tent()
  	{
  		m_num_eq = 1;
--- 26,34 ----
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class tent_map:
! 	public map_base
  {
  public:
! 	tent_map()
  	{
  		m_num_eq = 1;
***************
*** 37,41 ****
  	}
  
! 	~tent()
  	{
  		delete m_data;
--- 37,41 ----
  	}
  
! 	~tent_map()
  	{
  		delete m_data;
***************
*** 60,70 ****
  
  
! #define LOGISTIC_CALLBACKS						\
  MAP_CALLBACKS									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define LOGISTIC_ATTRIBUTES						\
  MAP_ATTRIBUTES									\
  CHAOS_SYS_ATTRIBUTE(x);
! 
  
--- 60,70 ----
  
  
! #define TENT_MAP_CALLBACKS						\
  MAP_CALLBACKS									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define TENT_MAP_ATTRIBUTES						\
  MAP_ATTRIBUTES									\
  CHAOS_SYS_ATTRIBUTE(x);
!  
  

--- NEW FILE: lorenz_dsp.cpp ---
// 
//  
//  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 "lorenz.hpp"
#include "chaos_dsp.hpp"

class lorenz_dsp:
	public chaos_dsp<lorenz>
{
	CHAOS_DSP_INIT(lorenz, LORENZ_ATTRIBUTES);

	LORENZ_CALLBACKS;
};



FLEXT_LIB_DSP_V("lorenz~", lorenz_dsp);

--- NEW FILE: tent_map_dsp.cpp ---
// 
//  
//  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 "tent_map.hpp"
#include "chaos_dsp.hpp"

class tent_map_dsp:
	public chaos_dsp<tent_map>
{
	CHAOS_DSP_INIT(tent_map, TENT_MAP_ATTRIBUTES);

	TENT_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("tent~", tent_map_dsp);

Index: sine_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/sine_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sine_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- sine_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 26,35 ****
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class sine:
! 	protected map_base
  {
  	
  public:
! 	sine()
  	{
  		m_num_eq = 1;
--- 26,35 ----
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class sine_map:
! 	public map_base
  {
  	
  public:
! 	sine_map()
  	{
  		m_num_eq = 1;
***************
*** 38,42 ****
  	}
  
! 	~sine()
  	{
  		delete m_data;
--- 38,42 ----
  	}
  
! 	~sine_map()
  	{
  		delete m_data;
***************
*** 48,52 ****
  	}
  
! 	CHAOS_SYSVAR_FUNCS_PRED(x, m_pred);
  
  	bool m_pred(t_float f)
--- 48,52 ----
  	}
  
! 	CHAOS_SYSVAR_FUNCS_PRED(x, 0, m_pred);
  
  	bool m_pred(t_float f)
***************
*** 56,64 ****
  };
  
! #define SINE_CALLBACKS							\
  MAP_CALLBACKS									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define SINE_ATTRIBUTES							\
  MAP_ATTRIBUTES									\
  CHAOS_SYS_ATTRIBUTE(x);
--- 56,64 ----
  };
  
! #define SINE_MAP_CALLBACKS						\
  MAP_CALLBACKS									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define SINE_MAP_ATTRIBUTES						\
  MAP_ATTRIBUTES									\
  CHAOS_SYS_ATTRIBUTE(x);

--- NEW FILE: ikeda_laser_map_dsp.cpp ---
// 
//  
//  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 "ikeda_laser_map.hpp"
#include "chaos_dsp.hpp"

class ikeda_laser_map_dsp:
	public chaos_dsp<ikeda_laser_map>
{
	CHAOS_DSP_INIT(ikeda_laser_map, IKEDA_LASER_MAP_ATTRIBUTES);

	IKEDA_LASER_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("ikeda~", ikeda_laser_map_dsp);

--- NEW FILE: bernoulli_dsp.cpp ---
// 
//  
//  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 "bernoulli_map.hpp"
#include "chaos_dsp.hpp"

class bernoulli_dsp:
	public chaos_dsp<bernoulli>
{
	CHAOS_DSP_INIT(bernoulli, BERNOULLI_ATTRIBUTES);

	BERNOULLI_CALLBACKS;
};



FLEXT_LIB_DSP_V("bernoulli~", bernoulli_dsp);

--- NEW FILE: henon_map_msg.cpp ---
// 
//  
//  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 "henon_map.hpp"
#include "chaos_msg.hpp"

class henon_msg:
	public chaos_msg<henon>
{
	CHAOS_MSG_INIT(henon, HENON_ATTRIBUTES);

	HENON_CALLBACKS;
};



FLEXT_LIB_V("henon", henon_msg);

--- NEW FILE: chaos_defs.hpp ---
// 
//  
//  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.

#ifndef __chaos_defs_hpp


// macros for simplified system state functions
#define CHAOS_SYS_SETFUNC(NAME, NR)				\
	void set_##NAME(t_float f)					\
	{											\
		m_data[NR] = (data_t) f;				\
	}

#define CHAOS_SYS_SETFUNC_PRED(NAME, NR, PRED)							\
	void set_##NAME(t_float f)											\
	{																	\
		if ( PRED(f) )													\
			m_data[NR] = (data_t) f;									\
		else															\
			post("value for dimension " #NAME " %f out of range", f);	\
	}

#define CHAOS_SYS_GETFUNC(NAME, NR)				\
	t_float get_##NAME()						\
	{											\
		return (t_float)m_data[NR];				\
	}

/* to be called in the public part */			
#define CHAOS_SYSVAR_FUNCS_PRED(NAME, NR, PRED)	\
CHAOS_SYS_SETFUNC_PRED(NAME, NR, PRED)			\
CHAOS_SYS_GETFUNC(NAME, NR)

#define CHAOS_SYSVAR_FUNCS(NAME, NR)			\
CHAOS_SYS_SETFUNC(NAME, NR)						\
CHAOS_SYS_GETFUNC(NAME, NR)



// macros for simplified system parameter functions
#define CHAOS_PAR_SETFUNC(NAME)					\
	void set_##NAME(t_float f)					\
	{											\
		m_##NAME = (data_t) f;					\
	}

#define CHAOS_PAR_SETFUNC_PRED(NAME, PRED)								\
	void set_##NAME(t_float f)											\
	{																	\
		if ( PRED(f) )													\
			m_##NAME = (data_t) f;										\
		else															\
			post("value for parameter " #NAME " %f out of range", f);	\
	}

#define CHAOS_PAR_GETFUNC(NAME)					\
	t_float get_##NAME()						\
	{											\
		return (t_float)m_##NAME;				\
	}


#define CHAOS_SYSPAR_FUNCS_PRED(NAME, PRED)		\
CHAOS_PAR_SETFUNC_PRED(NAME, PRED)				\
CHAOS_PAR_GETFUNC(NAME)							\
data_t m_##NAME;


#define CHAOS_SYSPAR_FUNCS(NAME)				\
public:											\
CHAOS_PAR_SETFUNC(NAME)							\
CHAOS_PAR_GETFUNC(NAME)							\
data_t m_##NAME;


#define CHAOS_SYSPAR_FUNCS_I(NAME)				\
CHAOS_PAR_SETFUNC(NAME)							\
CHAOS_PAR_GETFUNC(NAME)							\
data_t m_##NAME;


#define CHAOS_SYS_CALLBACKS(NAME)				\
public:void get_##NAME(t_float &f)				\
{												\
	f = m_system->get_##NAME();					\
}												\
void set_##NAME(t_float &f)						\
{												\
	m_system->set_##NAME(f);					\
}												\
FLEXT_CALLVAR_F(get_##NAME, set_##NAME);
 
#define CHAOS_SYS_CALLBACKS_I(NAME)				\
public:											\
void get_##NAME(int &i)							\
{												\
	i = m_system->get_##NAME();					\
}												\
void set_##NAME(int &i)							\
{												\
	m_system->set_##NAME(i);					\
}												\
FLEXT_CALLVAR_I(get_##NAME, set_##NAME);


#define CHAOS_SYS_ATTRIBUTE(NAME)					\
FLEXT_ADDATTR_VAR(#NAME,get_##NAME, set_##NAME);

#define CHAOS_SYS_INIT(NAME, VALUE)				\
set_##NAME(VALUE);

#define CHAOS_PARAMETER(NAME) m_##NAME






#define __chaos_defs_hpp
#endif /* __chaos_defs_hpp */

--- NEW FILE: gauss_map_msg.cpp ---
// 
//  
//  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 "gauss_map.hpp"
#include "chaos_msg.hpp"

class gauss_map_msg:
	public chaos_msg<gauss_map>
{
	CHAOS_MSG_INIT(gauss_map, GAUSS_MAP_ATTRIBUTES);

	GAUSS_MAP_CALLBACKS;
};



FLEXT_LIB_V("gauss_map", gauss_map_msg);

Index: circle_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/circle_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** circle_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- circle_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 21,30 ****
  #include "map_base.hpp"
  
! //  circle_map map: x[n+1] = x[n] * omega - r / (2*pi) * sin (2 * pi * x [n])
  // 
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
  class circle_map:
! 	protected map_base
  {
  public:
--- 21,32 ----
  #include "map_base.hpp"
  
! #include <cmath>
! 
! //  circle_map map: x[n+1] = x[n] + omega - r / (2*pi) * sin (2 * pi * x [n])
  // 
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
  class circle_map:
! 	public map_base
  {
  public:
***************
*** 33,39 ****
  		m_num_eq = 1;
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(omega, 0.4);
! 		CHAOS_SYS_INIT(r, 1);
! 		CHAOS_SYS_INIT(x, 0.5);
  	}
  
--- 35,41 ----
  		m_num_eq = 1;
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(omega, 0.1);
! 		CHAOS_SYS_INIT(r, 3);
! 		CHAOS_SYS_INIT(x, 0.4);
  	}
  

--- NEW FILE: sine_map_dsp.cpp ---
// 
//  
//  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 "sine_map.hpp"
#include "chaos_dsp.hpp"

class sine_map_dsp:
	public chaos_dsp<sine_map>
{
	CHAOS_DSP_INIT(sine_map, SINE_MAP_ATTRIBUTES);

	SINE_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("sine_map~", sine_map_dsp);

Index: standard_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/standard_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** standard_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- standard_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 27,35 ****
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class standard:
! 	protected map_base
  {
  public:
! 	standard()
  	{
  		m_num_eq = 2;
--- 27,35 ----
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class standard_map:
! 	public map_base
  {
  public:
! 	standard_map()
  	{
  		m_num_eq = 2;
***************
*** 41,45 ****
  	}
  
! 	~standard()
  	{
  		delete m_data;
--- 41,45 ----
  	}
  
! 	~standard_map()
  	{
  		delete m_data;
***************
*** 55,75 ****
  		theta = theta + I + k * sin(theta);
  
! 		if (y > 2 * M_PI)
  		{
  			do
  			{
! 				y -= 2*M_PI;
  			}
! 			while (y > 2 * M_PI);
  			goto put_data;
  		}
  		
! 		if (y < 0)
  		{
  			do
  			{
! 				y += 2*M_PI;
  			}
! 			while (y < 0);
  		}
  		
--- 55,75 ----
  		theta = theta + I + k * sin(theta);
  
! 		if (theta > 2 * M_PI)
  		{
  			do
  			{
! 				theta -= 2*M_PI;
  			}
! 			while (theta > 2 * M_PI);
  			goto put_data;
  		}
  		
! 		if (theta < 0)
  		{
  			do
  			{
! 				theta += 2*M_PI;
  			}
! 			while (theta < 0);
  		}
  		
***************
*** 87,95 ****
  	}
  
! 	CHAOS_SYSPAR_FUNCS(I, 1);
  };
  
  
! #define STANDARD_CALLBACKS						\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(I);							\
--- 87,95 ----
  	}
  
! 	CHAOS_SYSPAR_FUNCS(k);
  };
  
  
! #define STANDARD_MAP_CALLBACKS					\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(I);							\
***************
*** 98,102 ****
  
  
! #define STANDARD_ATTRIBUTES						\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(I);							\
--- 98,102 ----
  
  
! #define STANDARD_MAP_ATTRIBUTES					\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(I);							\

Index: gauss_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/gauss_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gauss_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- gauss_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 21,34 ****
  #include "map_base.hpp"
  
  //  gauss map: x[n+1] = 0              (for x[n] = 0)
! //                      fmod(1 / x[n]) (else)
  //             0 <= x[n] <  1
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class gauss:
! 	protected map_base
  {
  public:
! 	gauss()
  	{
  		m_num_eq = 1;
--- 21,36 ----
  #include "map_base.hpp"
  
+ #include <cmath>
+ 
  //  gauss map: x[n+1] = 0              (for x[n] = 0)
! //                      fmod(1 / x[n], 1) (else)
  //             0 <= x[n] <  1
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class gauss_map:
! 	public map_base
  {
  public:
! 	gauss_map()
  	{
  		m_num_eq = 1;
***************
*** 37,41 ****
  	}
  
! 	~gauss()
  	{
  		delete m_data;
--- 39,43 ----
  	}
  
! 	~gauss_map()
  	{
  		delete m_data;
***************
*** 47,53 ****
  
  		if (data == 0)
! 			m_data[0] = 0;
  		else
! 			m_data[0] = fmod(1.f / data);
  	}
  
--- 49,55 ----
  
  		if (data == 0)
! 			m_data[0] = 0.001;
  		else
! 			m_data[0] = fmod(1.f / data, 1);
  	}
  
***************
*** 59,67 ****
  };
  
! #define GAUSS_CALLBACKS							\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define GAUSS_ATTRIBUTES						\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(x);
--- 61,69 ----
  };
  
! #define GAUSS_MAP_CALLBACKS						\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(x);
  
! #define GAUSS_MAP_ATTRIBUTES					\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(x);

--- NEW FILE: gauss_map_dsp.cpp ---
// 
//  
//  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 "gauss_map.hpp"
#include "chaos_dsp.hpp"

class gauss_map_dsp:
	public chaos_dsp<gauss_map>
{
	CHAOS_DSP_INIT(gauss_map, GAUSS_MAP_ATTRIBUTES);

	GAUSS_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("gauss_map~", gauss_map_dsp);

Index: bungalow_tent_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/bungalow_tent_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bungalow_tent_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- bungalow_tent_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 34,38 ****
  
  class bungalow_tent:
! 	protected map_base
  {
  public:
--- 34,38 ----
  
  class bungalow_tent:
! 	public map_base
  {
  public:
***************
*** 41,45 ****
  		m_num_eq = 1;
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(x, 0.5);
  		CHAOS_SYS_INIT(r, 0.5);
  	}
--- 41,45 ----
  		m_num_eq = 1;
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(x, 0.6);
  		CHAOS_SYS_INIT(r, 0.5);
  	}
***************
*** 84,88 ****
  	}
  
! 	CHAOS_SYSVAR_FUNCS_PRED(r, 0, m_pred_r);
  	bool m_pred_r(t_float f)
  	{
--- 84,88 ----
  	}
  
! 	CHAOS_SYSPAR_FUNCS_PRED(r, m_pred_r);
  	bool m_pred_r(t_float f)
  	{

--- NEW FILE: lozi_map_dsp.cpp ---
// 
//  
//  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 "lozi_map.hpp"
#include "chaos_dsp.hpp"

class lozi_map_dsp:
	public chaos_dsp<lozi_map>
{
	CHAOS_DSP_INIT(lozi_map, LOZI_MAP_ATTRIBUTES);

	LOZI_MAP_CALLBACKS;
};



FLEXT_LIB_DSP_V("lozi~", lozi_map_dsp);

--- NEW FILE: henon_map_dsp.cpp ---
// 
//  
//  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 "henon_map.hpp"
#include "chaos_dsp.hpp"

class henon_dsp:
	public chaos_dsp<henon>
{
	CHAOS_DSP_INIT(henon, HENON_ATTRIBUTES);

	HENON_CALLBACKS;
};



FLEXT_LIB_DSP_V("henon~", henon_dsp);

--- NEW FILE: chaos_msg.hpp ---
// 
//  
//  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"

template <class system> class chaos_msg
	: public flext_base
{
	FLEXT_HEADER(chaos_msg, flext_base);

public:

	/* local data for system, output and interpolation */
	system * m_system; /* the system */

	void m_bang()
	{
		m_system->m_step();
		int outlets = m_system->get_num_eq();

		while (outlets--)
		{
			ToOutFloat(outlets, m_system->get_data(outlets));
		}
	}

	FLEXT_CALLBACK(m_bang);
};


/* create constructor / destructor */
#define CHAOS_MSG_INIT(SYSTEM, ATTRIBUTES)		\
FLEXT_HEADER(SYSTEM##_msg, chaos_msg<SYSTEM>)	\
												\
SYSTEM##_msg(int argc, t_atom* argv )			\
{												\
	m_system = new SYSTEM;						\
												\
	int size = m_system->get_num_eq();			\
												\
    for (int i = 0; i != size; ++i)				\
        AddOutFloat();							\
												\
    ATTRIBUTES;									\
    FLEXT_ADDBANG(0, m_bang);              	\
}												\
												\
~SYSTEM##_msg()									\
{												\
	delete m_system;							\
}

Index: henon_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/henon_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** henon_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- henon_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 27,31 ****
  
  class henon:
! 	protected map_base
  {
  public:
--- 27,31 ----
  
  class henon:
! 	public map_base
  {
  public:

--- NEW FILE: bungalow_tent_dsp.cpp ---
// 
//  
//  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 "bungalow_tent_map.hpp"
#include "chaos_dsp.hpp"

class bungalow_tent_dsp:
	public chaos_dsp<bungalow_tent>
{
	CHAOS_DSP_INIT(bungalow_tent, BUNGALOW_TENT_ATTRIBUTES);

	BUNGALOW_TENT_CALLBACKS;
};



FLEXT_LIB_DSP_V("bungalow_tent~", bungalow_tent_dsp);

--- NEW FILE: ikeda_laser_map_msg.cpp ---
// 
//  
//  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 "ikeda_laser_map.hpp"
#include "chaos_msg.hpp"

class ikeda_laser_map_msg:
	public chaos_msg<ikeda_laser_map>
{
	CHAOS_MSG_INIT(ikeda_laser_map, IKEDA_LASER_MAP_ATTRIBUTES);

	IKEDA_LASER_MAP_CALLBACKS;
};



FLEXT_LIB_V("ikeda_laser_map", ikeda_laser_map_msg);

--- NEW FILE: bungalow_tent_msg.cpp ---
// 
//  
//  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 "bungalow_tent_map.hpp"
#include "chaos_msg.hpp"

class bungalow_tent_msg:
	public chaos_msg<bungalow_tent>
{
	CHAOS_MSG_INIT(bungalow_tent, BUNGALOW_TENT_ATTRIBUTES);

	BUNGALOW_TENT_CALLBACKS;
};



FLEXT_LIB_V("bungalow_tent", bungalow_tent_msg);

Index: Makefile.am
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Makefile.am	25 Dec 2004 12:50:41 -0000	1.4
--- Makefile.am	27 Dec 2004 14:44:10 -0000	1.5
***************
*** 2,8 ****
  
  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
! 
  
  CXXFLAGS  = @CXXFLAGS@ \
--- 2,17 ----
  
  BUILT_SOURCES = main.cpp ode_base.cpp chaos_base.cpp chaos_dsp.cpp \
+ 	bernoulli_dsp.cpp bernoulli_msg.cpp \
+ 	bungalow_tent_dsp.cpp bungalow_tent_msg.cpp \
+ 	circle_map_dsp.cpp circle_map_msg.cpp \
+ 	gauss_map_dsp.cpp gauss_map_msg.cpp \
+ 	henon_map_dsp.cpp henon_map_msg.cpp \
+ 	ikeda_laser_map_dsp.cpp ikeda_laser_map_msg.cpp \
+ 	logistic_dsp.cpp logistic_msg.cpp \
  	lorenz_dsp.cpp lorenz_msg.cpp \
! 	lozi_map_dsp.cpp lozi_map_msg.cpp \
! 	sine_map_dsp.cpp sine_map_msg.cpp \
! 	standard_map_dsp.cpp standard_map_msg.cpp \
! 	tent_map_dsp.cpp tent_map_msg.cpp
  
  CXXFLAGS  = @CXXFLAGS@ \
***************
*** 38,41 ****
--- 47,51 ----
  	rm -f ./*~
  	rm -f ./*. at OBJEXT@
+ 	rm ./Makefile
  
  clean-local:

Index: chaos_dsp.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/chaos_dsp.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** chaos_dsp.hpp	25 Dec 2004 12:50:41 -0000	1.4
--- chaos_dsp.hpp	27 Dec 2004 14:44:11 -0000	1.5
***************
*** 76,82 ****
  	int size = m_system->get_num_eq();			\
  												\
-     for (int i = 0; i != size; ++i)				\
-         AddOutSignal();							\
- 												\
  	m_values = new t_float[size];				\
  	m_slopes = new t_float[size];				\
--- 76,79 ----
***************
*** 85,88 ****
--- 82,98 ----
  	m_curves = new t_float[size];				\
  												\
+     /* create inlets and zero arrays*/ 			\
+     for (int i = 0; i != size; ++i)				\
+ 	{											\
+ 		AddOutSignal();							\
+ 		m_values[i] = 0;						\
+ 		m_slopes[i] = 0;						\
+ 		m_nextvalues[i] = 0;					\
+ 		m_nextmidpts[i] = 0;					\
+ 		m_curves[i] = 0;						\
+ 	}											\
+ 												\
+ 												\
+ 												\
      m_freq = GetAFloat(argv[0]);				\
  	m_method = (char)GetAFloat(argv[1]);		\
***************
*** 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,
--- 196,200 ----
  
  
! /* 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,
***************
*** 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,
--- 236,239 ----
***************
*** 251,255 ****
  				
  				m_values[j] =  m_nextmidpts[j];
! 				m_nextmidpts[j] = (m_values[j] + value) * 0.5f;
  				
  				float fseglen = (float)phase;
--- 260,264 ----
  				
  				m_values[j] =  m_nextmidpts[j];
! 				m_nextmidpts[j] = (m_nextvalues[j] + value) * 0.5f;
  				
  				float fseglen = (float)phase;

--- NEW FILE: bernoulli_msg.cpp ---
// 
//  
//  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 "bernoulli_map.hpp"
#include "chaos_msg.hpp"

class bernoulli_msg:
	public chaos_msg<bernoulli>
{
	CHAOS_MSG_INIT(bernoulli, BERNOULLI_ATTRIBUTES);

	BERNOULLI_CALLBACKS;
};



FLEXT_LIB_V("bernoulli", bernoulli_msg);

Index: lozi_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/lozi_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lozi_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- lozi_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 26,34 ****
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class lozi:
! 	protected map_base
  {
  public:
! 	lozi()
  	{
  		m_num_eq = 2;
--- 26,34 ----
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class lozi_map:
! 	public map_base
  {
  public:
! 	lozi_map()
  	{
  		m_num_eq = 2;
***************
*** 40,44 ****
  	}
  
! 	~lozi()
  	{
  		delete m_data;
--- 40,44 ----
  	}
  
! 	~lozi_map()
  	{
  		delete m_data;
***************
*** 72,76 ****
  
  
! #define LOZI_CALLBACKS							\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(a);							\
--- 72,76 ----
  
  
! #define LOZI_MAP_CALLBACKS						\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(a);							\
***************
*** 79,83 ****
  CHAOS_SYS_CALLBACKS(y);
  
! #define LOZI_ATTRIBUTES							\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(a);							\
--- 79,83 ----
  CHAOS_SYS_CALLBACKS(y);
  
! #define LOZI_MAP_ATTRIBUTES						\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(a);							\

--- NEW FILE: tent_map_msg.cpp ---
// 
//  
//  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 "tent_map.hpp"
#include "chaos_msg.hpp"

class tent_map_msg:
	public chaos_msg<tent_map>
{
	CHAOS_MSG_INIT(tent_map, TENT_MAP_ATTRIBUTES);

	TENT_MAP_CALLBACKS;
};



FLEXT_LIB_V("tent", tent_map_msg);

Index: bernoulli_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/bernoulli_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bernoulli_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- bernoulli_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 26,40 ****
  
  class bernoulli:
! 	protected map_base
  {
  public:
  	bernoulli()
  	{
! 		m_num_eq = 1:
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(x,0.5)
  	}
  
! 	~Bernoulli()
  	{
  		delete m_data;
--- 26,40 ----
  
  class bernoulli:
! 	public map_base
  {
  public:
  	bernoulli()
  	{
! 		m_num_eq = 1;
  		m_data = new data_t[1];
! 		CHAOS_SYS_INIT(x,0.5);
  	}
  
! 	~bernoulli()
  	{
  		delete m_data;
***************
*** 44,47 ****
--- 44,50 ----
  	{
  		data_t x = m_data[0];
+ 		
+ 		if (x <= 0)
+ 			x = 0.00001;  //stability
  
  		if (x < 0.5f)

--- NEW FILE: lorenz_msg.cpp ---
// 
//  
//  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 "lorenz.hpp"
#include "chaos_msg.hpp"

class lorenz_msg:
	public chaos_msg<lorenz>
{
	CHAOS_MSG_INIT(lorenz, LORENZ_ATTRIBUTES);

	LORENZ_CALLBACKS;
};



FLEXT_LIB_V("lorenz", lorenz_msg);

--- NEW FILE: standard_map_msg.cpp ---
// 
//  
//  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 "standard_map.hpp"
#include "chaos_msg.hpp"

class standard_map_msg:
	public chaos_msg<standard_map>
{
	CHAOS_MSG_INIT(standard_map, STANDARD_MAP_ATTRIBUTES);

	STANDARD_MAP_CALLBACKS;
};



FLEXT_LIB_V("standard_map", standard_map_msg);

Index: ikeda_laser_map.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/chaos/src/ikeda_laser_map.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ikeda_laser_map.hpp	23 Dec 2004 10:07:17 -0000	1.2
--- ikeda_laser_map.hpp	27 Dec 2004 14:44:11 -0000	1.3
***************
*** 32,40 ****
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class ikeda:
! 	protected map_base
  {
  public:
! 	ikeda()
  	{
  		m_num_eq = 2;
--- 32,40 ----
  //  taken from Willi-Hans Steeb: Chaos and Fractals
  
! class ikeda_laser_map:
! 	public map_base
  {
  public:
! 	ikeda_laser_map()
  	{
  		m_num_eq = 2;
***************
*** 48,52 ****
  	}
  
! 	~ikeda()
  	{
  		delete m_data;
--- 48,52 ----
  	}
  
! 	~ikeda_laser_map()
  	{
  		delete m_data;
***************
*** 71,83 ****
  	CHAOS_SYSVAR_FUNCS(y, 1);
  	
! 	CHAOS_PAR_FUNCS(c1);
! 	CHAOS_PAR_FUNCS(c2);
! 	CHAOS_PAR_FUNCS(c3);
! 	CHAOS_PAR_FUNCS(roh);
  
  };
  
  
! #define IKEDA_CALLBACKS							\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(c1);						\
--- 71,83 ----
  	CHAOS_SYSVAR_FUNCS(y, 1);
  	
! 	CHAOS_SYSPAR_FUNCS(c1);
! 	CHAOS_SYSPAR_FUNCS(c2);
! 	CHAOS_SYSPAR_FUNCS(c3);
! 	CHAOS_SYSPAR_FUNCS(roh);
  
  };
  
  
! #define IKEDA_LASER_MAP_CALLBACKS				\
  MAP_CALLBACKS;									\
  CHAOS_SYS_CALLBACKS(c1);						\
***************
*** 88,92 ****
  CHAOS_SYS_CALLBACKS(y);
  
! #define IKEDA_ATTRIBUTES						\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(c1);						\
--- 88,92 ----
  CHAOS_SYS_CALLBACKS(y);
  
! #define IKEDA_LASER_MAP_ATTRIBUTES				\
  MAP_ATTRIBUTES;									\
  CHAOS_SYS_ATTRIBUTE(c1);						\

--- NEW FILE: logistic_dsp.cpp ---
// 
//  
//  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 "logistic_map.hpp"
#include "chaos_dsp.hpp"

class logistic_dsp:
	public chaos_dsp<logistic>
{
	CHAOS_DSP_INIT(logistic, LOGISTIC_ATTRIBUTES);

	LOGISTIC_CALLBACKS;
};



FLEXT_LIB_DSP_V("logistic~", logistic_dsp);





More information about the Pd-cvs mailing list