aboutsummaryrefslogtreecommitdiff
path: root/modules/bdiag~.c
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2006-08-15 15:11:52 +0000
committerTom Schouten <doelie@users.sourceforge.net>2006-08-15 15:11:52 +0000
commit4a83a80c044c9613bd50a63dd9ac5a97e2c028b5 (patch)
treeb424886f7e10d928a27ae16a64d577d749768a4d /modules/bdiag~.c
parent55ba904ccef240df1056157e4a376d4cb1eb476d (diff)
creb 0.9.2 import
svn path=/trunk/externals/creb/; revision=5607
Diffstat (limited to 'modules/bdiag~.c')
-rw-r--r--modules/bdiag~.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/modules/bdiag~.c b/modules/bdiag~.c
index b18c1b2..ac0a363 100644
--- a/modules/bdiag~.c
+++ b/modules/bdiag~.c
@@ -22,13 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <m_pd.h>
-#include <math.h>
+#include "extlib_util.h"
#include <stdio.h>
#include <stdlib.h>
-#ifndef IS_DENORMAL
-#include "extlib_util.h"
-#endif
#define MAXORDER 64
@@ -83,7 +79,8 @@ static void bdiag_reset(t_bdiag *x)
-static void bdiag_eigen(t_bdiag *x, t_floatarg index, t_floatarg aval, t_floatarg bval)
+static void bdiag_eigen(t_bdiag *x, t_floatarg index,
+ t_floatarg aval, t_floatarg bval)
{
int i = (int)index;
if (i<0) return;
@@ -94,7 +91,8 @@ static void bdiag_eigen(t_bdiag *x, t_floatarg index, t_floatarg aval, t_floatar
}
/* set decay time and frequency of pole at index */
-static void bdiag_timefreq(t_bdiag *x, t_floatarg index, t_floatarg time, t_floatarg freq)
+static void bdiag_timefreq(t_bdiag *x, t_floatarg index,
+ t_floatarg time, t_floatarg freq)
{
float r,a,b,n;
float sr = sys_getsr() / (float)x->x_ctl.c_order;
@@ -217,7 +215,8 @@ static void bdiag_dsp(t_bdiag *x, t_signal **sp)
}
- dsp_add(bdiag_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);
+ dsp_add(bdiag_perform, 4, &x->x_ctl, sp[0]->s_n,
+ sp[0]->s_vec, sp[1]->s_vec);
}
}
@@ -270,8 +269,11 @@ void bdiag_tilde_setup(void)
class_addmethod(bdiag_class, (t_method)bdiag_reset, gensym("reset"), 0);
class_addmethod(bdiag_class, (t_method)bdiag_dsp, gensym("dsp"), 0);
- class_addmethod(bdiag_class, (t_method)bdiag_eigen, gensym("eigen"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
- class_addmethod(bdiag_class, (t_method)bdiag_timefreq, gensym("timefreq"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
- class_addmethod(bdiag_class, (t_method)bdiag_preset, gensym("preset"), A_DEFFLOAT, 0);
+ class_addmethod(bdiag_class, (t_method)bdiag_eigen, gensym("eigen"),
+ A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addmethod(bdiag_class, (t_method)bdiag_timefreq, gensym("timefreq"),
+ A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addmethod(bdiag_class, (t_method)bdiag_preset, gensym("preset"),
+ A_DEFFLOAT, 0);
}