[PD-cvs] externals/tb/chaos/src chaos_dsp.hpp,1.7,1.8

Tim Blechmann timblech at users.sourceforge.net
Thu Jan 13 14:40:00 CET 2005


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

Modified Files:
	chaos_dsp.hpp 
Log Message:
smooth interpolation changing

Index: chaos_dsp.hpp
===================================================================
RCS file: /cvsroot/pure-data/externals/tb/chaos/src/chaos_dsp.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** chaos_dsp.hpp	1 Jan 2005 11:06:58 -0000	1.7
--- chaos_dsp.hpp	13 Jan 2005 13:39:57 -0000	1.8
***************
*** 75,78 ****
--- 75,79 ----
  	void set_imethod(int i)
  	{
+ 		int imethod = m_imethod;
  		if( (i >= 0) && (i <= 2) )
  		{
***************
*** 96,106 ****
  			return;
  		}
! 		if( i != 2)
  		{
  			for (int j = 0; j != m_system->get_num_eq(); ++j)
  			{
! 				m_nextvalues[i] = 0;
! 				m_nextmidpts[i] = 0;
! 				m_curves[i] = 0;
  			}
  		}
--- 97,115 ----
  			return;
  		}
! 
! 		if (imethod == 0)
! 			for (int j = 0; j != m_system->get_num_eq(); ++j)
! 			{
! 				m_values[j] = m_system->get_data(j);
! 				m_slopes[j] = 0;
! 			}
! 
! 		if( i == 2)
  		{
  			for (int j = 0; j != m_system->get_num_eq(); ++j)
  			{
! 				m_phase = 0; /* reschedule to avoid click, find a better way later*/
! 				m_nextvalues[j] = m_values[j];
! 				m_nextmidpts[j] = m_values[j];
  			}
  		}
***************
*** 222,228 ****
  	
  	int phase = m_phase;
! 
! 	int i = 0;
! 
  	while (n)
  	{
--- 231,236 ----
  	
  	int phase = m_phase;
! 	
! 	int offset = 0;
  	while (n)
  	{
***************
*** 237,253 ****
  		phase -=next;
  		
! 		while (next--)
  		{
! 			for (int j = 0; j != outlets; ++j)
! 			{
! 				outsigs[j][i] = m_system->get_data(j);
! 			}
! 			++i;
  		}
  	}
  	m_phase = phase;
  }
  
- 
  /* linear and cubic interpolation adapted from supercollider by James McCartney */
  template <class system> 
--- 245,257 ----
  		phase -=next;
  		
! 		for (int i = 0; i != outlets; ++i)
  		{
! 			SetSamples(outsigs[i]+offset, next, m_system->get_data(i));
  		}
+ 		offset += next;
  	}
  	m_phase = phase;
  }
  
  /* linear and cubic interpolation adapted from supercollider by James McCartney */
  template <class system> 





More information about the Pd-cvs mailing list