r3961 - trunk/bse
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: r3961 - trunk/bse
- Date: Wed, 11 Oct 2006 20:29:10 -0400 (EDT)
Author: timj
Date: 2006-10-11 20:28:53 -0400 (Wed, 11 Oct 2006)
New Revision: 3961
Modified:
trunk/bse/ChangeLog
trunk/bse/bseiirfilter.c
Log:
Thu Oct 12 02:23:15 2006 Tim Janik <timj gtk org>
* bseiirfilter.c: enlarged ARRSIZ so order 16 filters can be calculated.
renamed and reworked print_filter_table() to print the filter table with
much finer granularity.
Modified: trunk/bse/ChangeLog
===================================================================
--- trunk/bse/ChangeLog 2006-10-12 00:15:16 UTC (rev 3960)
+++ trunk/bse/ChangeLog 2006-10-12 00:28:53 UTC (rev 3961)
@@ -1,3 +1,9 @@
+Thu Oct 12 02:23:15 2006 Tim Janik <timj gtk org>
+
+ * bseiirfilter.c: enlarged ARRSIZ so order 16 filters can be calculated.
+ renamed and reworked print_filter_table() to print the filter table with
+ much finer granularity.
+
Thu Oct 12 02:14:44 2006 Tim Janik <timj gtk org>
* bseiirfilter.c: more unused section removal. auto-fixed indentation.
Modified: trunk/bse/bseiirfilter.c
===================================================================
--- trunk/bse/bseiirfilter.c 2006-10-12 00:15:16 UTC (rev 3960)
+++ trunk/bse/bseiirfilter.c 2006-10-12 00:28:53 UTC (rev 3961)
@@ -400,7 +400,6 @@
extern int quadf ( double x, double y, int pzflg );
extern double response ( double f, double amp );
extern int spln ( void );
-extern int xfun ( void );
extern int zplna ( void );
extern int zplnb ( void );
extern int zplnc ( void );
@@ -1526,7 +1525,7 @@
#include <stdlib.h>
/* size of arrays: */
-#define ARRSIZ 50
+#define ARRSIZ 150
/* System configurations */
@@ -1640,7 +1639,7 @@
double cay ( double q );
int lampln ( void );
int spln ( void );
-int xfun ( void );
+void print_filter_table (void);
int zplna ( void );
int zplnb ( void );
int zplnc ( void );
@@ -1908,7 +1907,7 @@
zplna(); /* convert s plane to z plane */
zplnb();
zplnc();
- xfun(); /* tabulate transfer function */
+ print_filter_table(); /* tabulate transfer function */
goto top;
toosml:
@@ -2558,24 +2557,21 @@
/* Print table of filter frequency response
*/
-int xfun()
+void
+print_filter_table (void)
{
- double f, r;
- int i;
+ double f, limit = 0.05 * fnyq * 21;
- f = 0.0;
-
- for( i=0; i<=20; i++ )
+ for (f=0; f < limit; f += limit / 2100.)
{
- r = response( f, gain );
+ double r = response( f, gain );
if( r <= 0.0 )
r = -999.99;
else
r = 2.0 * dbfac * log( r );
printf( "%10.1f %10.2f\n", f, r );
- f = f + 0.05 * fnyq;
+ // f = f + 0.05 * fnyq;
}
- return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]