Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6517
Modified Files:
Tag: desiredata
builtins_dsp.c
Log Message:
using class_new2 everywhere
Index: builtins_dsp.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/builtins_dsp.c,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -d -r1.1.2.10 -r1.1.2.11
*** builtins_dsp.c 4 Jan 2007 20:30:26 -0000 1.1.2.10
--- builtins_dsp.c 4 Jan 2007 21:16:50 -0000 1.1.2.11
***************
*** 45,48 ****
--- 45,49 ----
template <class T> T min(T a, T b) {return a<b?a:b;}
template <class T> T max(T a, T b) {return a>b?a:b;}
+ template <class T> T clip(T a, T b, T c) {return min(max(a,b),b);}
/* ----------------------------- plus ----------------------------- */
***************
*** 78,86 ****
return x;} \
static void NAME##_setup() { \
! t_class *c = NAME##_class = class_new(gensym("+~"), (t_newmethod)NAME##_new, 0, sizeof(t_dop), 0, A_GIMME, 0); \
class_addmethod2(c, NAME##_dsp, "dsp",""); \
CLASS_MAINSIGNALIN(c, t_dop, a); \
class_sethelpsymbol(NAME##_class, gensym("sigbinops")); \
! c = scalar##NAME##_class = class_new(gensym("+~"), 0, 0, sizeof(t_dop), 0, 0); \
CLASS_MAINSIGNALIN(c, t_dop, a); \
class_addmethod2(c, scalar##NAME##_dsp, "dsp",""); \
--- 79,87 ----
return x;} \
static void NAME##_setup() { \
! t_class *c = NAME##_class = class_new2("+~",NAME##_new,0,sizeof(t_dop),0,"*"); \
class_addmethod2(c, NAME##_dsp, "dsp",""); \
CLASS_MAINSIGNALIN(c, t_dop, a); \
class_sethelpsymbol(NAME##_class, gensym("sigbinops")); \
! c = scalar##NAME##_class = class_new2("+~",0,0,sizeof(t_dop),0,""); \
CLASS_MAINSIGNALIN(c, t_dop, a); \
class_addmethod2(c, scalar##NAME##_dsp, "dsp",""); \
***************
*** 244,250 ****
/* ------------------------- tabwrite~ -------------------------- */
-
static t_class *tabwrite_tilde_class;
-
struct t_tabwrite_tilde : t_object {
int phase;
--- 245,249 ----
***************
*** 254,258 ****
float a;
};
-
static void *tabwrite_tilde_new(t_symbol *s) {
t_tabwrite_tilde *x = (t_tabwrite_tilde *)pd_new(tabwrite_tilde_class);
--- 253,256 ----
***************
*** 262,273 ****
return x;
}
-
static void tabwrite_tilde_redraw(t_tabwrite_tilde *x) {
t_garray *a = (t_garray *)pd_findbyclass(x->arrayname, garray_class);
! if (!a)
! bug("tabwrite_tilde_redraw");
else garray_redraw(a);
}
-
static t_int *tabwrite_tilde_perform(t_int *w) {
t_tabwrite_tilde *x = (t_tabwrite_tilde *)w[1];
--- 260,268 ----
return x;
}
static void tabwrite_tilde_redraw(t_tabwrite_tilde *x) {
t_garray *a = (t_garray *)pd_findbyclass(x->arrayname, garray_class);
! if (!a) bug("tabwrite_tilde_redraw");
else garray_redraw(a);
}
static t_int *tabwrite_tilde_perform(t_int *w) {
t_tabwrite_tilde *x = (t_tabwrite_tilde *)w[1];
***************
*** 275,279 ****
int n = (int)w[3], phase = x->phase, endphase = x->nsampsintab;
if (!x->vec) goto bad;
-
if (endphase > phase) {
int nxfer = endphase - phase;
--- 270,273 ----
***************
*** 281,286 ****
if (nxfer > n) nxfer = n;
phase += nxfer;
!
! testcopyvec(fp, in, nxfer);
if (phase >= endphase) {
tabwrite_tilde_redraw(x);
--- 275,279 ----
if (nxfer > n) nxfer = n;
phase += nxfer;
! testcopyvec(fp, in, nxfer);
if (phase >= endphase) {
tabwrite_tilde_redraw(x);
***************
*** 288,298 ****
}
x->phase = phase;
! }
! else x->phase = 0x7fffffff;
bad:
return w+4;
}
-
-
static t_int *tabwrite_tilde_perf_simd(t_int *w) {
t_tabwrite_tilde *x = (t_tabwrite_tilde *)w[1];
--- 281,288 ----
}
x->phase = phase;
! } else x->phase = 0x7fffffff;
bad:
return w+4;
}
static t_int *tabwrite_tilde_perf_simd(t_int *w) {
t_tabwrite_tilde *x = (t_tabwrite_tilde *)w[1];
***************
*** 300,304 ****
int n = (int)w[3], phase = x->phase, endphase = x->nsampsintab;
if (!x->vec) goto bad;
-
if (endphase > phase) {
int nxfer = endphase - phase;
--- 290,293 ----
***************
*** 321,326 ****
return w+4;
}
-
-
void tabwrite_tilde_set(t_tabwrite_tilde *x, t_symbol *s) {
x->arrayname = s;
--- 310,313 ----
***************
*** 334,338 ****
} else garray_usedindsp(a);
}
-
static void tabwrite_tilde_dsp(t_tabwrite_tilde *x, t_signal **sp) {
tabwrite_tilde_set(x, x->arrayname);
--- 321,324 ----
***************
*** 341,345 ****
else dsp_add(tabwrite_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n);
}
-
static void tabwrite_tilde_bang(t_tabwrite_tilde *x) {x->phase = 0;}
static void tabwrite_tilde_start(t_tabwrite_tilde *x, t_floatarg f) {x->phase = (int)max((int)f,0);}
--- 327,330 ----
***************
*** 350,357 ****
}
}
-
static void tabwrite_tilde_setup() {
! t_class *c = tabwrite_tilde_class = class_new(gensym("tabwrite~"), (t_newmethod)tabwrite_tilde_new, 0,
! sizeof(t_tabwrite_tilde), 0, A_DEFSYM, 0);
CLASS_MAINSIGNALIN(c, t_tabwrite_tilde, a);
class_addmethod2(c, tabwrite_tilde_dsp, "dsp","");
--- 335,341 ----
}
}
static void tabwrite_tilde_setup() {
! t_class *c = tabwrite_tilde_class =
! class_new2("tabwrite~",tabwrite_tilde_new,0,sizeof(t_tabwrite_tilde),0,"S");
CLASS_MAINSIGNALIN(c, t_tabwrite_tilde, a);
class_addmethod2(c, tabwrite_tilde_dsp, "dsp","");
***************
*** 769,774 ****
static void tabosc4_tilde_setup() {
! t_class *c = tabosc4_tilde_class = class_new(gensym("tabosc4~"),
! (t_newmethod)tabosc4_tilde_new, 0, sizeof(t_tabosc4_tilde), 0, A_DEFSYM, 0);
CLASS_MAINSIGNALIN(c, t_tabosc4_tilde, a);
class_addmethod2(c, tabosc4_tilde_dsp, "dsp","");
--- 753,758 ----
static void tabosc4_tilde_setup() {
! t_class *c = tabosc4_tilde_class =
! class_new2("tabosc4~",tabosc4_tilde_new,0,sizeof(t_tabosc4_tilde),0,"S");
CLASS_MAINSIGNALIN(c, t_tabosc4_tilde, a);
class_addmethod2(c, tabosc4_tilde_dsp, "dsp","");
***************
*** 868,873 ****
static void tabsend_setup() {
! tabsend_class = class_new(gensym("tabsend~"), (t_newmethod)tabsend_new,
! 0, sizeof(t_tabsend), 0, A_DEFSYM, 0);
CLASS_MAINSIGNALIN(tabsend_class, t_tabsend, a);
class_addmethod2(tabsend_class, tabsend_dsp, "dsp","");
--- 852,856 ----
static void tabsend_setup() {
! tabsend_class = class_new2("tabsend~",tabsend_new,0,sizeof(t_tabsend),0,"S");
CLASS_MAINSIGNALIN(tabsend_class, t_tabsend, a);
class_addmethod2(tabsend_class, tabsend_dsp, "dsp","");
***************
*** 950,956 ****
static void tabreceive_setup() {
! tabreceive_class = class_new(gensym("tabreceive~"),
! (t_newmethod)tabreceive_new, 0,
! sizeof(t_tabreceive), 0, A_DEFSYM, 0);
class_addmethod2(tabreceive_class, tabreceive_dsp, "dsp","");
}
--- 933,937 ----
static void tabreceive_setup() {
! tabreceive_class = class_new2("tabreceive~",tabreceive_new,0,sizeof(t_tabreceive),0,"S");
class_addmethod2(tabreceive_class, tabreceive_dsp, "dsp","");
}
***************
*** 993,998 ****
static void tabread_setup() {
! tabread_class = class_new(gensym("tabread"), (t_newmethod)tabread_new,
! 0, sizeof(t_tabread), 0, A_DEFSYM, 0);
class_addfloat(tabread_class, tabread_float);
class_addmethod2(tabread_class, tabread_set, "set","s");
--- 974,978 ----
static void tabread_setup() {
! tabread_class = class_new2("tabread",tabread_new,0,sizeof(t_tabread),0,"S");
class_addfloat(tabread_class, tabread_float);
class_addmethod2(tabread_class, tabread_set, "set","s");
***************
*** 1052,1057 ****
static void tabread4_setup() {
! tabread4_class = class_new(gensym("tabread4"), (t_newmethod)tabread4_new,
! 0, sizeof(t_tabread4), 0, A_DEFSYM, 0);
class_addfloat(tabread4_class, tabread4_float);
class_addmethod2(tabread4_class, tabread4_set, "set","s");
--- 1032,1036 ----
static void tabread4_setup() {
! tabread4_class = class_new2("tabread4",tabread4_new,0,sizeof(t_tabread4),0,"S");
class_addfloat(tabread4_class, tabread4_float);
class_addmethod2(tabread4_class, tabread4_set, "set","s");
***************
*** 1100,1105 ****
void tabwrite_setup() {
! tabwrite_class = class_new(gensym("tabwrite"), (t_newmethod)tabwrite_new,
! 0, sizeof(t_tabwrite), 0, A_DEFSYM, 0);
class_addfloat(tabwrite_class, tabwrite_float);
class_addmethod2(tabwrite_class, tabwrite_set, "set","s");
--- 1079,1083 ----
void tabwrite_setup() {
! tabwrite_class = class_new2("tabwrite",tabwrite_new,0,sizeof(t_tabwrite),0,"S");
class_addfloat(tabwrite_class, tabwrite_float);
class_addmethod2(tabwrite_class, tabwrite_set, "set","s");
***************
*** 1168,1173 ****
static void sig_tilde_setup() {
! sig_tilde_class = class_new(gensym("sig~"), (t_newmethod)sig_tilde_new, 0,
! sizeof(t_sig), 0, A_DEFFLOAT, 0);
class_addfloat(sig_tilde_class, sig_tilde_float);
class_addmethod2(sig_tilde_class, sig_tilde_dsp,"dsp","");
--- 1146,1150 ----
static void sig_tilde_setup() {
! sig_tilde_class = class_new2("sig~",sig_tilde_new,0,sizeof(t_sig),0,"F");
class_addfloat(sig_tilde_class, sig_tilde_float);
class_addmethod2(sig_tilde_class, sig_tilde_dsp,"dsp","");
***************
*** 1596,1613 ****
float val;
if (x->gotone) {
! int indx = (int)(clock_gettimesince(x->time) * x->sampspermsec);
! if (indx < 0)
! indx = 0;
! else if (indx >= x->n)
! indx = x->n - 1;
val = x->vec[indx];
! }
! else val = 0;
outlet_float(x->outlet, val);
}
static void vsnapshot_tilde_ff(t_vsnapshot *x) {
! if (x->vec)
! t_freebytes(x->vec, x->n * sizeof(t_sample));
}
--- 1573,1584 ----
float val;
if (x->gotone) {
! int indx = clip((int)(clock_gettimesince(x->time) * x->sampspermsec),0,x->n-1);
val = x->vec[indx];
! } else val = 0;
outlet_float(x->outlet, val);
}
static void vsnapshot_tilde_ff(t_vsnapshot *x) {
! if (x->vec) t_freebytes(x->vec, x->n * sizeof(t_sample));
}
***************
*** 2794,2800 ****
static void sigrfftw_setup() {
! sigrfftw_class = class_new(gensym("rfft~"), sigrfftw_new,
! sigrfftw_free,
! sizeof(t_sigrfftw), 0, 0);
CLASS_MAINSIGNALIN(sigrfftw_class, t_sigrfftw, a);
class_addmethod2(sigrfftw_class, sigrfftw_dsp,"dsp","");
--- 2765,2769 ----
static void sigrfftw_setup() {
! sigrfftw_class = class_new2("rfft~",sigrfftw_new,sigrfftw_free,sizeof(t_sigrfftw),0,0);
CLASS_MAINSIGNALIN(sigrfftw_class, t_sigrfftw, a);
class_addmethod2(sigrfftw_class, sigrfftw_dsp,"dsp","");
***************
*** 2852,2858 ****
static void sigrifftw_setup() {
! sigrifftw_class = class_new(gensym("rifft~"), sigrifftw_new,
! sigrifftw_free,
! sizeof(t_sigrifftw), 0, 0);
CLASS_MAINSIGNALIN(sigrifftw_class, t_sigrifftw, a);
class_addmethod2(sigrifftw_class, sigrifftw_dsp, "dsp","");
--- 2821,2825 ----
static void sigrifftw_setup() {
! sigrifftw_class = class_new2("rifft~",sigrifftw_new,sigrifftw_free,sizeof(t_sigrifftw),0,"");
CLASS_MAINSIGNALIN(sigrifftw_class, t_sigrifftw, a);
class_addmethod2(sigrifftw_class, sigrifftw_dsp, "dsp","");
***************
*** 2936,2941 ****
static void sigframp_setup() {
! sigframp_class = class_new(gensym("framp~"), sigframp_new, 0,
! sizeof(t_sigframp), 0, 0);
CLASS_MAINSIGNALIN(sigframp_class, t_sigframp, a);
class_addmethod2(sigframp_class, sigframp_dsp, "dsp","");
--- 2903,2907 ----
static void sigframp_setup() {
! sigframp_class = class_new2("framp~",sigframp_new,0,sizeof(t_sigframp),0,"");
CLASS_MAINSIGNALIN(sigframp_class, t_sigframp, a);
class_addmethod2(sigframp_class, sigframp_dsp, "dsp","");
***************
*** 3021,3025 ****
void sighip_setup() {
! sighip_class = class_new(gensym("hip~"), (t_newmethod)sighip_new, 0, sizeof(t_sighip), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sighip_class, t_sighip, a);
class_addmethod2(sighip_class, sighip_dsp, "dsp","");
--- 2987,2991 ----
void sighip_setup() {
! sighip_class = class_new2("hip~",sighip_new,0,sizeof(t_sighip),0,"F");
CLASS_MAINSIGNALIN(sighip_class, t_sighip, a);
class_addmethod2(sighip_class, sighip_dsp, "dsp","");
***************
*** 3100,3105 ****
void siglop_setup() {
! siglop_class = class_new(gensym("lop~"), (t_newmethod)siglop_new, 0,
! sizeof(t_siglop), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(siglop_class, t_siglop, a);
class_addmethod2(siglop_class, siglop_dsp, "dsp","");
--- 3066,3070 ----
void siglop_setup() {
! siglop_class = class_new2("lop~",siglop_new,0,sizeof(t_siglop),0,"F");
CLASS_MAINSIGNALIN(siglop_class, t_siglop, a);
class_addmethod2(siglop_class, siglop_dsp, "dsp","");
***************
*** 3218,3223 ****
void sigbp_setup() {
! sigbp_class = class_new(gensym("bp~"), (t_newmethod)sigbp_new, 0,
! sizeof(t_sigbp), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigbp_class, t_sigbp, a);
class_addmethod2(sigbp_class, sigbp_dsp, "dsp","");
--- 3183,3187 ----
void sigbp_setup() {
! sigbp_class = class_new2("bp~",sigbp_new,0,sizeof(t_sigbp),0,"FF");
CLASS_MAINSIGNALIN(sigbp_class, t_sigbp, a);
class_addmethod2(sigbp_class, sigbp_dsp, "dsp","");
***************
*** 3406,3411 ****
void sigbiquad_setup() {
! sigbiquad_class = class_new(gensym("biquad~"), (t_newmethod)sigbiquad_new,
! 0, sizeof(t_sigbiquad), 0, A_GIMME, 0);
CLASS_MAINSIGNALIN(sigbiquad_class, t_sigbiquad, a);
class_addmethod2(sigbiquad_class, sigbiquad_dsp, "dsp","");
--- 3370,3374 ----
void sigbiquad_setup() {
! sigbiquad_class = class_new2("biquad~",sigbiquad_new,0,sizeof(t_sigbiquad),0,"*");
CLASS_MAINSIGNALIN(sigbiquad_class, t_sigbiquad, a);
class_addmethod2(sigbiquad_class, sigbiquad_dsp, "dsp","");
***************
*** 3472,3477 ****
void sigsamphold_setup() {
! sigsamphold_class = class_new(gensym("samphold~"),
! (t_newmethod)sigsamphold_new, 0, sizeof(t_sigsamphold), 0, 0);
CLASS_MAINSIGNALIN(sigsamphold_class, t_sigsamphold, a);
class_addmethod2(sigsamphold_class, sigsamphold_set, "set","F");
--- 3435,3439 ----
void sigsamphold_setup() {
! sigsamphold_class = class_new2("samphold~",sigsamphold_new,0,sizeof(t_sigsamphold),0,"");
CLASS_MAINSIGNALIN(sigsamphold_class, t_sigsamphold, a);
class_addmethod2(sigsamphold_class, sigsamphold_set, "set","F");
***************
*** 3528,3533 ****
void sigrpole_setup() {
! sigrpole_class = class_new(gensym("rpole~"),
! (t_newmethod)sigrpole_new, 0, sizeof(t_sigrpole), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigrpole_class, t_sigrpole, a);
class_addmethod2(sigrpole_class, sigrpole_set, "set","F");
--- 3490,3494 ----
void sigrpole_setup() {
! sigrpole_class = class_new2("rpole~",sigrpole_new,0,sizeof(t_sigrpole),0,"F");
CLASS_MAINSIGNALIN(sigrpole_class, t_sigrpole, a);
class_addmethod2(sigrpole_class, sigrpole_set, "set","F");
***************
*** 3581,3586 ****
void sigrzero_setup() {
! sigrzero_class = class_new(gensym("rzero~"),
! (t_newmethod)sigrzero_new, 0, sizeof(t_sigrzero), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigrzero_class, t_sigrzero, a);
class_addmethod2(sigrzero_class, sigrzero_set, "set","F");
--- 3542,3546 ----
void sigrzero_setup() {
! sigrzero_class = class_new2("rzero~",sigrzero_new,0,sizeof(t_sigrzero),0,"F");
CLASS_MAINSIGNALIN(sigrzero_class, t_sigrzero, a);
class_addmethod2(sigrzero_class, sigrzero_set, "set","F");
***************
*** 3641,3647 ****
void sigrzero_rev_setup() {
! sigrzero_rev_class = class_new(gensym("rzero_rev~"),
! (t_newmethod)sigrzero_rev_new, 0, sizeof(t_sigrzero_rev),
! 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigrzero_rev_class, t_sigrzero_rev, a);
class_addmethod2(sigrzero_rev_class, sigrzero_rev_set, "set","F");
--- 3601,3605 ----
void sigrzero_rev_setup() {
! sigrzero_rev_class = class_new2("rzero_rev~",sigrzero_rev_new,0,sizeof(t_sigrzero_rev),0,"F");
CLASS_MAINSIGNALIN(sigrzero_rev_class, t_sigrzero_rev, a);
class_addmethod2(sigrzero_rev_class, sigrzero_rev_set, "set","F");
***************
*** 3722,3727 ****
void sigcpole_setup() {
! sigcpole_class = class_new(gensym("cpole~"), (t_newmethod)sigcpole_new, 0, sizeof(t_sigcpole), 0,
! A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigcpole_class, t_sigcpole, a);
class_addmethod2(sigcpole_class, sigcpole_set, "set","FF");
--- 3680,3684 ----
void sigcpole_setup() {
! sigcpole_class = class_new2("cpole~",sigcpole_new,0,sizeof(t_sigcpole),0,"FF");
CLASS_MAINSIGNALIN(sigcpole_class, t_sigcpole, a);
class_addmethod2(sigcpole_class, sigcpole_set, "set","FF");
***************
*** 3799,3804 ****
void sigczero_setup() {
! sigczero_class = class_new(gensym("czero~"),
! (t_newmethod)sigczero_new, 0, sizeof(t_sigczero), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigczero_class, t_sigczero, a);
class_addmethod2(sigczero_class, sigczero_set, "set","FF");
--- 3756,3760 ----
void sigczero_setup() {
! sigczero_class = class_new2("czero~",sigczero_new,0,sizeof(t_sigczero),0,"FF");
CLASS_MAINSIGNALIN(sigczero_class, t_sigczero, a);
class_addmethod2(sigczero_class, sigczero_set, "set","FF");
***************
*** 3877,3882 ****
void sigczero_rev_setup() {
! sigczero_rev_class = class_new(gensym("czero_rev~"),
! (t_newmethod)sigczero_rev_new, 0, sizeof(t_sigczero_rev), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigczero_rev_class, t_sigczero_rev, a);
class_addmethod2(sigczero_rev_class, sigczero_rev_set, "set","FF");
--- 3833,3837 ----
void sigczero_rev_setup() {
! sigczero_rev_class = class_new2("czero_rev~",sigczero_rev_new,0,sizeof(t_sigczero_rev),0,"FF");
CLASS_MAINSIGNALIN(sigczero_rev_class, t_sigczero_rev, a);
class_addmethod2(sigczero_rev_class, sigczero_rev_set, "set","FF");
***************
*** 4028,4034 ****
static void sigreceive_setup() {
! sigreceive_class = class_new(gensym("receive~"),
! (t_newmethod)sigreceive_new, 0,
! sizeof(t_sigreceive), 0, A_DEFSYM, 0);
class_addcreator((t_newmethod)sigreceive_new, gensym("r~"), A_DEFSYM, 0);
class_addmethod2(sigreceive_class, sigreceive_set, "set","s");
--- 3983,3987 ----
static void sigreceive_setup() {
! sigreceive_class = class_new2("receive~",sigreceive_new,0,sizeof(t_sigreceive),0,"S");
class_addcreator((t_newmethod)sigreceive_new, gensym("r~"), A_DEFSYM, 0);
class_addmethod2(sigreceive_class, sigreceive_set, "set","s");
***************
*** 4170,4175 ****
static void sigthrow_setup() {
! sigthrow_class = class_new(gensym("throw~"), (t_newmethod)sigthrow_new, 0,
! sizeof(t_sigthrow), 0, A_DEFSYM, 0);
class_addmethod2(sigthrow_class, sigthrow_set, "set","s");
CLASS_MAINSIGNALIN(sigthrow_class, t_sigthrow, a);
--- 4123,4127 ----
static void sigthrow_setup() {
! sigthrow_class = class_new2("throw~",sigthrow_new,0,sizeof(t_sigthrow),0,"S");
class_addmethod2(sigthrow_class, sigthrow_set, "set","s");
CLASS_MAINSIGNALIN(sigthrow_class, t_sigthrow, a);
***************
*** 4220,4225 ****
static void clip_setup() {
! clip_class = class_new(gensym("clip~"), (t_newmethod)clip_new, 0,
! sizeof(t_clip), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(clip_class, t_clip, a);
class_addmethod2(clip_class, clip_dsp, "dsp","");
--- 4172,4176 ----
static void clip_setup() {
! clip_class = class_new2("clip~",clip_new,0,sizeof(t_clip),0,"FF");
CLASS_MAINSIGNALIN(clip_class, t_clip, a);
class_addmethod2(clip_class, clip_dsp, "dsp","");
***************
*** 4308,4314 ****
void sigrsqrt_setup() {
init_rsqrt();
! sigrsqrt_class = class_new(gensym("rsqrt~"), (t_newmethod)sigrsqrt_new, 0,
! sizeof(t_sigrsqrt), 0, 0);
! /* an old name for it: */
class_addcreator(sigrsqrt_new, gensym("q8_rsqrt~"), 0);
CLASS_MAINSIGNALIN(sigrsqrt_class, t_sigrsqrt, a);
--- 4259,4264 ----
void sigrsqrt_setup() {
init_rsqrt();
! sigrsqrt_class = class_new2("rsqrt~",sigrsqrt_new,0,sizeof(t_sigrsqrt),0,"");
! /* an old name for it: */
class_addcreator(sigrsqrt_new, gensym("q8_rsqrt~"), 0);
CLASS_MAINSIGNALIN(sigrsqrt_class, t_sigrsqrt, a);
***************
*** 4357,4362 ****
void sigsqrt_setup() {
! sigsqrt_class = class_new(gensym("sqrt~"), (t_newmethod)sigsqrt_new, 0,
! sizeof(t_sigsqrt), 0, 0);
class_addcreator(sigsqrt_new, gensym("q8_sqrt~"), 0); /* old name */
CLASS_MAINSIGNALIN(sigsqrt_class, t_sigsqrt, a);
--- 4307,4311 ----
void sigsqrt_setup() {
! sigsqrt_class = class_new2("sqrt~",sigsqrt_new,0,sizeof(t_sigsqrt),0,"");
class_addcreator(sigsqrt_new, gensym("q8_sqrt~"), 0); /* old name */
CLASS_MAINSIGNALIN(sigsqrt_class, t_sigsqrt, a);
***************
*** 4399,4404 ****
void sigwrap_setup() {
! sigwrap_class = class_new(gensym("wrap~"), (t_newmethod)sigwrap_new, 0,
! sizeof(t_sigwrap), 0, 0);
CLASS_MAINSIGNALIN(sigwrap_class, t_sigwrap, a);
class_addmethod2(sigwrap_class, sigwrap_dsp, "dsp","");
--- 4348,4352 ----
void sigwrap_setup() {
! sigwrap_class = class_new2("wrap~",sigwrap_new,0,sizeof(t_sigwrap),0,"");
CLASS_MAINSIGNALIN(sigwrap_class, t_sigwrap, a);
class_addmethod2(sigwrap_class, sigwrap_dsp, "dsp","");
***************
*** 4439,4444 ****
void mtof_tilde_setup() {
! mtof_tilde_class = class_new(gensym("mtof~"), (t_newmethod)mtof_tilde_new, 0,
! sizeof(t_mtof_tilde), 0, 0);
CLASS_MAINSIGNALIN(mtof_tilde_class, t_mtof_tilde, a);
class_addmethod2(mtof_tilde_class, mtof_tilde_dsp, "dsp","");
--- 4387,4391 ----
void mtof_tilde_setup() {
! mtof_tilde_class = class_new2("mtof~",mtof_tilde_new,0,sizeof(t_mtof_tilde),0,"");
CLASS_MAINSIGNALIN(mtof_tilde_class, t_mtof_tilde, a);
class_addmethod2(mtof_tilde_class, mtof_tilde_dsp, "dsp","");
***************
*** 4475,4480 ****
void ftom_tilde_setup() {
! ftom_tilde_class = class_new(gensym("ftom~"), (t_newmethod)ftom_tilde_new, 0,
! sizeof(t_ftom_tilde), 0, 0);
CLASS_MAINSIGNALIN(ftom_tilde_class, t_ftom_tilde, a);
class_addmethod2(ftom_tilde_class, ftom_tilde_dsp, "dsp","");
--- 4422,4426 ----
void ftom_tilde_setup() {
! ftom_tilde_class = class_new2("ftom~",ftom_tilde_new,0,sizeof(t_ftom_tilde),0,"");
CLASS_MAINSIGNALIN(ftom_tilde_class, t_ftom_tilde, a);
class_addmethod2(ftom_tilde_class, ftom_tilde_dsp, "dsp","");
***************
*** 4516,4521 ****
void dbtorms_tilde_setup() {
! dbtorms_tilde_class = class_new(gensym("dbtorms~"), (t_newmethod)dbtorms_tilde_new, 0,
! sizeof(t_dbtorms_tilde), 0, 0);
CLASS_MAINSIGNALIN(dbtorms_tilde_class, t_dbtorms_tilde, a);
class_addmethod2(dbtorms_tilde_class, dbtorms_tilde_dsp, "dsp","");
--- 4462,4466 ----
void dbtorms_tilde_setup() {
! dbtorms_tilde_class = class_new2("dbtorms~",dbtorms_tilde_new,0,sizeof(t_dbtorms_tilde),0,"");
CLASS_MAINSIGNALIN(dbtorms_tilde_class, t_dbtorms_tilde, a);
class_addmethod2(dbtorms_tilde_class, dbtorms_tilde_dsp, "dsp","");
***************
*** 4556,4561 ****
void rmstodb_tilde_setup() {
! rmstodb_tilde_class = class_new(gensym("rmstodb~"), (t_newmethod)rmstodb_tilde_new, 0,
! sizeof(t_rmstodb_tilde), 0, 0);
CLASS_MAINSIGNALIN(rmstodb_tilde_class, t_rmstodb_tilde, a);
class_addmethod2(rmstodb_tilde_class, rmstodb_tilde_dsp, "dsp","");
--- 4501,4505 ----
void rmstodb_tilde_setup() {
! rmstodb_tilde_class = class_new2("rmstodb~",rmstodb_tilde_new,0,sizeof(t_rmstodb_tilde),0,"");
CLASS_MAINSIGNALIN(rmstodb_tilde_class, t_rmstodb_tilde, a);
class_addmethod2(rmstodb_tilde_class, rmstodb_tilde_dsp, "dsp","");
***************
*** 4597,4602 ****
void dbtopow_tilde_setup() {
! dbtopow_tilde_class = class_new(gensym("dbtopow~"), (t_newmethod)dbtopow_tilde_new, 0,
! sizeof(t_dbtopow_tilde), 0, 0);
CLASS_MAINSIGNALIN(dbtopow_tilde_class, t_dbtopow_tilde, a);
class_addmethod2(dbtopow_tilde_class, dbtopow_tilde_dsp, "dsp","");
--- 4541,4545 ----
void dbtopow_tilde_setup() {
! dbtopow_tilde_class = class_new2("dbtopow~",dbtopow_tilde_new,0,sizeof(t_dbtopow_tilde),0,"");
CLASS_MAINSIGNALIN(dbtopow_tilde_class, t_dbtopow_tilde, a);
class_addmethod2(dbtopow_tilde_class, dbtopow_tilde_dsp, "dsp","");
***************
*** 4637,4642 ****
void powtodb_tilde_setup() {
! powtodb_tilde_class = class_new(gensym("powtodb~"), (t_newmethod)powtodb_tilde_new, 0,
! sizeof(t_powtodb_tilde), 0, 0);
CLASS_MAINSIGNALIN(powtodb_tilde_class, t_powtodb_tilde, a);
class_addmethod2(powtodb_tilde_class, powtodb_tilde_dsp, "dsp","");
--- 4580,4584 ----
void powtodb_tilde_setup() {
! powtodb_tilde_class = class_new2("powtodb~",powtodb_tilde_new,0,sizeof(t_powtodb_tilde),0,"");
CLASS_MAINSIGNALIN(powtodb_tilde_class, t_powtodb_tilde, a);
class_addmethod2(powtodb_tilde_class, powtodb_tilde_dsp, "dsp","");
***************
*** 4695,4700 ****
static void print_setup() {
! print_class = class_new(gensym("print~"), (t_newmethod)print_new, 0,
! sizeof(t_print), 0, A_DEFSYM, 0);
CLASS_MAINSIGNALIN(print_class, t_print, a);
class_addmethod2(print_class, print_dsp, "dsp","");
--- 4637,4641 ----
static void print_setup() {
! print_class = class_new2("print~",print_new,0,sizeof(t_print),0,"S");
CLASS_MAINSIGNALIN(print_class, t_print, a);
class_addmethod2(print_class, print_dsp, "dsp","");
***************
*** 4797,4802 ****
static void phasor_setup() {
! phasor_class = class_new(gensym("phasor~"), (t_newmethod)phasor_new, 0,
! sizeof(t_phasor), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(phasor_class, t_phasor, a);
class_addmethod2(phasor_class, phasor_dsp, "dsp","");
--- 4738,4742 ----
static void phasor_setup() {
! phasor_class = class_new2("phasor~",phasor_new,0,sizeof(t_phasor),0,"F");
CLASS_MAINSIGNALIN(phasor_class, t_phasor, a);
class_addmethod2(phasor_class, phasor_dsp, "dsp","");
***************
*** 4894,4899 ****
static void cos_setup() {
! cos_class = class_new(gensym("cos~"), (t_newmethod)cos_new, 0,
! sizeof(t_cos), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(cos_class, t_cos, a);
class_addmethod2(cos_class, cos_dsp, "dsp","");
--- 4834,4838 ----
static void cos_setup() {
! cos_class = class_new2("cos~",cos_new,0,sizeof(t_cos),0,"F");
CLASS_MAINSIGNALIN(cos_class, t_cos, a);
class_addmethod2(cos_class, cos_dsp, "dsp","");
***************
*** 4986,4991 ****
static void osc_setup() {
! osc_class = class_new(gensym("osc~"), (t_newmethod)osc_new, 0,
! sizeof(t_osc), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(osc_class, t_osc, a);
class_addmethod2(osc_class, osc_dsp, "dsp","");
--- 4925,4929 ----
static void osc_setup() {
! osc_class = class_new2("osc~",osc_new,0,sizeof(t_osc),0,"F");
CLASS_MAINSIGNALIN(osc_class, t_osc, a);
class_addmethod2(osc_class, osc_dsp, "dsp","");
***************
*** 5101,5105 ****
void sigvcf_setup() {
! sigvcf_class = class_new(gensym("vcf~"), (t_newmethod)sigvcf_new, 0, sizeof(t_sigvcf), 0, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(sigvcf_class, t_sigvcf, a);
class_addmethod2(sigvcf_class, sigvcf_dsp, "dsp","");
--- 5039,5043 ----
void sigvcf_setup() {
! sigvcf_class = class_new2("vcf~",sigvcf_new,0,sizeof(t_sigvcf),0,"F");
CLASS_MAINSIGNALIN(sigvcf_class, t_sigvcf, a);
class_addmethod2(sigvcf_class, sigvcf_dsp, "dsp","");
***************
*** 5141,5145 ****
static void noise_setup() {
! noise_class = class_new(gensym("noise~"), (t_newmethod)noise_new, 0, sizeof(t_noise), 0, 0);
class_addmethod2(noise_class, noise_dsp, "dsp","");
}
--- 5079,5083 ----
static void noise_setup() {
! noise_class = class_new2("noise~",noise_new,0,sizeof(t_noise),0,"");
class_addmethod2(noise_class, noise_dsp, "dsp","");
}