Update of /cvsroot/pure-data/externals/iemlib/src/iem_t3_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26103/iemlib/src/iem_t3_lib
Modified Files: t3_line~.c t3_sig~.c Log Message: replace sig by tilde
Index: t3_line~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/src/iem_t3_lib/t3_line~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** t3_line~.c 8 Nov 2006 16:24:38 -0000 1.1 --- t3_line~.c 22 Nov 2006 15:05:51 -0000 1.2 *************** *** 9,15 ****
/* -------------------------- t3_line~ ------------------------------ */ ! static t_class *sigt3_line_class;
! typedef struct _sigt3_line { t_object x_obj; --- 9,15 ----
/* -------------------------- t3_line~ ------------------------------ */ ! static t_class *t3_line_tilde_class;
! typedef struct _t3_line_tilde { t_object x_obj; *************** *** 30,36 **** int x_t3_bang_samps; int x_transient; ! } t_sigt3_line;
! static void sigt3_line_nontransient(t_float *vec, t_sigt3_line *x, int n) { int cur_samps = x->x_cur_samps, i; --- 30,36 ---- int x_t3_bang_samps; int x_transient; ! } t_t3_line_tilde;
! static void t3_line_tilde_nontransient(t_float *vec, t_t3_line_tilde *x, int n) { int cur_samps = x->x_cur_samps, i; *************** *** 80,87 **** }
! static t_int *sigt3_line_perform(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_sigt3_line *x = (t_sigt3_line *)(w[2]); int n = (int)(w[3]);
--- 80,87 ---- }
! static t_int *t3_line_tilde_perform(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_t3_line_tilde *x = (t_t3_line_tilde *)(w[2]); int n = (int)(w[3]);
*************** *** 95,103 **** } else ! sigt3_line_nontransient(out, x, n); return(w+4); }
! static void sigt3_line_tick(t_sigt3_line *x) { t_float *trans = x->x_beg; --- 95,103 ---- } else ! t3_line_tilde_nontransient(out, x, n); return(w+4); }
! static void t3_line_tilde_tick(t_t3_line_tilde *x) { t_float *trans = x->x_beg; *************** *** 106,110 ****
if(!x->x_transient) ! sigt3_line_nontransient(trans, x, n); t3_bang_samps = x->x_t3_bang_samps; x->x_dst_val = x->x_inlet_val; --- 106,110 ----
if(!x->x_transient) ! t3_line_tilde_nontransient(trans, x, n); t3_bang_samps = x->x_t3_bang_samps; x->x_dst_val = x->x_inlet_val; *************** *** 171,175 **** }
! static void sigt3_line_list(t_sigt3_line *x, t_symbol *s, int ac, t_atom *av) { if((ac >= 2)&&IS_A_FLOAT(av,0)&&IS_A_FLOAT(av,1)) --- 171,175 ---- }
! static void t3_line_tilde_list(t_t3_line_tilde *x, t_symbol *s, int ac, t_atom *av) { if((ac >= 2)&&IS_A_FLOAT(av,0)&&IS_A_FLOAT(av,1)) *************** *** 192,196 **** } if(ticks < 1) ! sigt3_line_tick(x); else clock_delay(x->x_clock, (double)ticks * x->x_ticks2ms); --- 192,196 ---- } if(ticks < 1) ! t3_line_tilde_tick(x); else clock_delay(x->x_clock, (double)ticks * x->x_ticks2ms); *************** *** 198,202 **** }
! static void sigt3_line_ft1(t_sigt3_line *x, t_float time) { if(time < 0.0) --- 198,202 ---- }
! static void t3_line_tilde_ft1(t_t3_line_tilde *x, t_float time) { if(time < 0.0) *************** *** 205,209 **** }
! static void sigt3_line_stop(t_sigt3_line *x) { clock_unset(x->x_clock); --- 205,209 ---- }
! static void t3_line_tilde_stop(t_t3_line_tilde *x) { clock_unset(x->x_clock); *************** *** 212,216 **** }
! static void sigt3_line_dsp(t_sigt3_line *x, t_signal **sp) { int i; --- 212,216 ---- }
! static void t3_line_tilde_dsp(t_t3_line_tilde *x, t_signal **sp) { int i; *************** *** 232,239 **** x->x_ms2samps = 0.001*(double)sp[0]->s_sr; x->x_ticks2ms = (double)x->x_n / x->x_ms2samps; ! dsp_add(sigt3_line_perform, 3, sp[0]->s_vec, x, sp[0]->s_n); }
! static void sigt3_line_free(t_sigt3_line *x) { if(x->x_beg) --- 232,239 ---- x->x_ms2samps = 0.001*(double)sp[0]->s_sr; x->x_ticks2ms = (double)x->x_n / x->x_ms2samps; ! dsp_add(t3_line_tilde_perform, 3, sp[0]->s_vec, x, sp[0]->s_n); }
! static void t3_line_tilde_free(t_t3_line_tilde *x) { if(x->x_beg) *************** *** 242,248 **** }
! static void *sigt3_line_new(t_floatarg init_val) { ! t_sigt3_line *x = (t_sigt3_line *)pd_new(sigt3_line_class); int i;
--- 242,248 ---- }
! static void *t3_line_tilde_new(t_floatarg init_val) { ! t_t3_line_tilde *x = (t_t3_line_tilde *)pd_new(t3_line_tilde_class); int i;
*************** *** 255,259 **** x->x_ms2samps = 0.001 * (double)sys_getsr(); x->x_ticks2ms = (double)x->x_n / x->x_ms2samps; ! x->x_clock = clock_new(x, (t_method)sigt3_line_tick); outlet_new(&x->x_obj, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft1")); --- 255,259 ---- x->x_ms2samps = 0.001 * (double)sys_getsr(); x->x_ticks2ms = (double)x->x_n / x->x_ms2samps; ! x->x_clock = clock_new(x, (t_method)t3_line_tilde_tick); outlet_new(&x->x_obj, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft1")); *************** *** 261,272 **** }
! void sigt3_line_setup(void) { ! sigt3_line_class = class_new(gensym("t3_line~"), (t_newmethod)sigt3_line_new, ! (t_method)sigt3_line_free, sizeof(t_sigt3_line), 0, A_DEFFLOAT, 0); ! class_addmethod(sigt3_line_class, (t_method)sigt3_line_dsp, gensym("dsp"), 0); ! class_addmethod(sigt3_line_class, (t_method)sigt3_line_stop, gensym("stop"), 0); ! class_addmethod(sigt3_line_class, (t_method)sigt3_line_ft1, gensym("ft1"), A_FLOAT, 0); ! class_addlist(sigt3_line_class, (t_method)sigt3_line_list); ! class_sethelpsymbol(sigt3_line_class, gensym("iemhelp/help-t3_line~")); } --- 261,272 ---- }
! void t3_line_tilde_setup(void) { ! t3_line_tilde_class = class_new(gensym("t3_line~"), (t_newmethod)t3_line_tilde_new, ! (t_method)t3_line_tilde_free, sizeof(t_t3_line_tilde), 0, A_DEFFLOAT, 0); ! class_addmethod(t3_line_tilde_class, (t_method)t3_line_tilde_dsp, gensym("dsp"), 0); ! class_addmethod(t3_line_tilde_class, (t_method)t3_line_tilde_stop, gensym("stop"), 0); ! class_addmethod(t3_line_tilde_class, (t_method)t3_line_tilde_ft1, gensym("ft1"), A_FLOAT, 0); ! class_addlist(t3_line_tilde_class, (t_method)t3_line_tilde_list); ! class_sethelpsymbol(t3_line_tilde_class, gensym("iemhelp/help-t3_line~")); }
Index: t3_sig~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/src/iem_t3_lib/t3_sig~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** t3_sig~.c 8 Nov 2006 16:24:38 -0000 1.1 --- t3_sig~.c 22 Nov 2006 15:05:51 -0000 1.2 *************** *** 7,14 **** #include "iemlib.h"
! /* -------------------------- sigt3_sig~ ------------------------------ */ ! static t_class *sigt3_sig_class;
! typedef struct _sigt3_sig { t_object x_obj; --- 7,14 ---- #include "iemlib.h"
! /* -------------------------- t3_sig_tilde~ ------------------------------ */ ! static t_class *t3_sig_tilde_class;
! typedef struct _t3_sig_tilde { t_object x_obj; *************** *** 22,28 **** t_float x_ms2samps; t_float x_ticks2ms; ! } t_sigt3_sig;
! static void sigt3_sig_tick(t_sigt3_sig *x) { t_float *trans = x->x_beg, val; --- 22,28 ---- t_float x_ms2samps; t_float x_ticks2ms; ! } t_t3_sig_tilde;
! static void t3_sig_tilde_tick(t_t3_sig_tilde *x) { t_float *trans = x->x_beg, val; *************** *** 42,46 **** }
! static void sigt3_sig_stop(t_sigt3_sig *x) { clock_unset(x->x_clock); --- 42,46 ---- }
! static void t3_sig_tilde_stop(t_t3_sig_tilde *x) { clock_unset(x->x_clock); *************** *** 48,52 **** }
! static void sigt3_sig_list(t_sigt3_sig *x, t_symbol *s, int ac, t_atom *av) { if((ac == 2)&&IS_A_FLOAT(av,0)&&IS_A_FLOAT(av,1)) --- 48,52 ---- }
! static void t3_sig_tilde_list(t_t3_sig_tilde *x, t_symbol *s, int ac, t_atom *av) { if((ac == 2)&&IS_A_FLOAT(av,0)&&IS_A_FLOAT(av,1)) *************** *** 61,65 **** x->x_t3_bang_samps = t3_bang_samps - n*ticks; if(ticks < 1) ! sigt3_sig_tick(x); else clock_delay(x->x_clock, (double)ticks * (double)x->x_ticks2ms); --- 61,65 ---- x->x_t3_bang_samps = t3_bang_samps - n*ticks; if(ticks < 1) ! t3_sig_tilde_tick(x); else clock_delay(x->x_clock, (double)ticks * (double)x->x_ticks2ms); *************** *** 67,74 **** }
! static t_int *sigt3_sig_perform(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_sigt3_sig *x = (t_sigt3_sig *)(w[2]); int n = (int)(w[3]);
--- 67,74 ---- }
! static t_int *t3_sig_tilde_perform(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_t3_sig_tilde *x = (t_t3_sig_tilde *)(w[2]); int n = (int)(w[3]);
*************** *** 91,98 **** }
! static t_int *sigt3_sig_perf8(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_sigt3_sig *x = (t_sigt3_sig *)(w[2]); int n = (int)(w[3]), i;
--- 91,98 ---- }
! static t_int *t3_sig_tilde_perf8(t_int *w) { t_float *out = (t_float *)(w[1]); ! t_t3_sig_tilde *x = (t_t3_sig_tilde *)(w[2]); int n = (int)(w[3]), i;
*************** *** 133,137 **** }
! static void sigt3_sig_dsp(t_sigt3_sig *x, t_signal **sp) { int i; --- 133,137 ---- }
! static void t3_sig_tilde_dsp(t_t3_sig_tilde *x, t_signal **sp) { int i; *************** *** 155,164 ****
if((sp[0]->s_n)&7) ! dsp_add(sigt3_sig_perform, 3, sp[0]->s_vec, x, sp[0]->s_n); else ! dsp_add(sigt3_sig_perf8, 3, sp[0]->s_vec, x, sp[0]->s_n); }
! static void sigt3_sig_free(t_sigt3_sig *x) { if(x->x_beg) --- 155,164 ----
if((sp[0]->s_n)&7) ! dsp_add(t3_sig_tilde_perform, 3, sp[0]->s_vec, x, sp[0]->s_n); else ! dsp_add(t3_sig_tilde_perf8, 3, sp[0]->s_vec, x, sp[0]->s_n); }
! static void t3_sig_tilde_free(t_t3_sig_tilde *x) { if(x->x_beg) *************** *** 167,173 **** }
! static void *sigt3_sig_new(t_floatarg init_val) { ! t_sigt3_sig *x = (t_sigt3_sig *)pd_new(sigt3_sig_class);
x->x_new_val = x->x_old_val = init_val; --- 167,173 ---- }
! static void *t3_sig_tilde_new(t_floatarg init_val) { ! t_t3_sig_tilde *x = (t_t3_sig_tilde *)pd_new(t3_sig_tilde_class);
x->x_new_val = x->x_old_val = init_val; *************** *** 177,192 **** x->x_ms2samps = 0.001 * (t_float)sys_getsr(); x->x_ticks2ms = (t_float)x->x_n / x->x_ms2samps; ! x->x_clock = clock_new(x, (t_method)sigt3_sig_tick); outlet_new(&x->x_obj, &s_signal); return (x); }
! void sigt3_sig_setup(void) { ! sigt3_sig_class = class_new(gensym("t3_sig~"), (t_newmethod)sigt3_sig_new, ! (t_method)sigt3_sig_free, sizeof(t_sigt3_sig), 0, A_DEFFLOAT, 0); ! class_addmethod(sigt3_sig_class, (t_method)sigt3_sig_dsp, gensym("dsp"), 0); ! class_addmethod(sigt3_sig_class, (t_method)sigt3_sig_stop, gensym("stop"), 0); ! class_addlist(sigt3_sig_class, (t_method)sigt3_sig_list); ! class_sethelpsymbol(sigt3_sig_class, gensym("iemhelp/help-t3_sig~")); } --- 177,192 ---- x->x_ms2samps = 0.001 * (t_float)sys_getsr(); x->x_ticks2ms = (t_float)x->x_n / x->x_ms2samps; ! x->x_clock = clock_new(x, (t_method)t3_sig_tilde_tick); outlet_new(&x->x_obj, &s_signal); return (x); }
! void t3_sig_tilde_setup(void) { ! t3_sig_tilde_class = class_new(gensym("t3_sig~"), (t_newmethod)t3_sig_tilde_new, ! (t_method)t3_sig_tilde_free, sizeof(t_t3_sig_tilde), 0, A_DEFFLOAT, 0); ! class_addmethod(t3_sig_tilde_class, (t_method)t3_sig_tilde_dsp, gensym("dsp"), 0); ! class_addmethod(t3_sig_tilde_class, (t_method)t3_sig_tilde_stop, gensym("stop"), 0); ! class_addlist(t3_sig_tilde_class, (t_method)t3_sig_tilde_list); ! class_sethelpsymbol(t3_sig_tilde_class, gensym("iemhelp/help-t3_sig~")); }