[PD-cvs] SF.net SVN: pure-data: [10114] trunk/externals/nusmuk/tab/tabosc4aa~.c

nusmuk at users.sourceforge.net nusmuk at users.sourceforge.net
Fri Jun 27 11:59:50 CEST 2008


Revision: 10114
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10114&view=rev
Author:   nusmuk
Date:     2008-06-27 02:59:50 -0700 (Fri, 27 Jun 2008)

Log Message:
-----------


Modified Paths:
--------------
    trunk/externals/nusmuk/tab/tabosc4aa~.c

Modified: trunk/externals/nusmuk/tab/tabosc4aa~.c
===================================================================
--- trunk/externals/nusmuk/tab/tabosc4aa~.c	2008-06-26 20:57:26 UTC (rev 10113)
+++ trunk/externals/nusmuk/tab/tabosc4aa~.c	2008-06-27 09:59:50 UTC (rev 10114)
@@ -143,13 +143,13 @@
 #if 1
     while (n--)
     {
-        t_sample frac,  a,  b,  c,  d, cminusb, temp, filter_out;
+        t_sample frac,  a,  b,  c,  d, cminusb, temp, sum, filter_out;
 
-		temp = 0;
-		for (i=0;i<8;i++)
+		sum = 0;
+		for (i=0;i<4;i++)
 		{
 	        tf.tf_d = dphase;
-    	    dphase += *in/8 * conv;
+    	    dphase += *in/4 * conv;
     	    addr = tab + (tf.tf_i[HIOFFSET] & mask);
     	    tf.tf_i[HIOFFSET] = normhipart;
     	    frac = tf.tf_d - UNITBIT32;
@@ -168,15 +168,16 @@
 //			temp = cut_filter(x, temp);
 //	t_sample filter_out;
 
-			filter_out = 0.0147491 * temp + 0.0294982 * x->x_last_in + 0.0147491 * x->x_prev_in + 1.60425 * x->x_last_out - 0.663244 * x->x_prev_out; 
+			filter_out = 0.0603297 * temp + 0.120659 * x->x_last_in + 0.0603297 * x->x_prev_in + 1.1565 * x->x_last_out - 0.397817 * x->x_prev_out; 
 
 			x->x_prev_in = x->x_last_in;
 			x->x_last_in = temp;
 			x->x_prev_out = x->x_last_out;
 			x->x_last_out = filter_out;
+			sum += filter_out;
 
 		}
-		*out++ = filter_out;
+		*out++ = sum/4;
 		*in++;
     }
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list