Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15535
Modified Files: z_sigbin.c z_zexy.c z_zexy.h Added Files: abs~.c Log Message: moved code for [abs~] into separate file use sse-code (intrinsics) for [abs~]
Index: z_sigbin.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_sigbin.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** z_sigbin.c 9 Jun 2005 18:56:30 -0000 1.5 --- z_sigbin.c 21 Dec 2005 14:56:16 -0000 1.6 *************** *** 16,20 ****
/* ! finally :: some of the missing binops for signals :: abs~, sgn~, >~, <~, ==~, &&~, ||~
1302:forum::für::umläute:2000 --- 16,20 ----
/* ! finally :: some of the missing binops for signals :: sgn~, >~, <~, ==~, &&~, ||~
1302:forum::für::umläute:2000 *************** *** 29,77 ****
- /* ------------------------ sigABS~ ----------------------------- */ - - static t_class *sigABS_class; - - static t_int *sigABS_perform(t_int *w) - { - t_float *in = (t_float *)(w[1]); - t_float *out = (t_float *)(w[2]); - int n = (int)(w[3]); - - while (n--) *out++ = fabsf(*in++); - - return (w+4); - } - - static void sigABS_dsp(t_misc *x, t_signal **sp) - { - dsp_add(sigABS_perform, 3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); - } - - static void sigABS_helper(void) - { - post("\n%c abs~ \t\t:: absolute value of a signal", HEARTSYMBOL); - } - - static void *sigABS_new(void) - { - t_misc *x = (t_misc *)pd_new(sigABS_class); - outlet_new(&x->x_obj, gensym("signal")); - - return (x); - } - - static void sigABS_setup(void) - { - sigABS_class = class_new(gensym("abs~"), (t_newmethod)sigABS_new, 0, - sizeof(t_misc), 0, A_DEFFLOAT, 0); - class_addmethod(sigABS_class, nullfn, gensym("signal"), 0); - class_addmethod(sigABS_class, (t_method)sigABS_dsp, gensym("dsp"), 0); - - class_addmethod(sigABS_class, (t_method)sigABS_helper, gensym("help"), 0); - - class_sethelpsymbol(sigABS_class, gensym("zexy/sigbinops+")); - } - /* ------------------------ sgn~ ----------------------------- */
--- 29,32 ---- *************** *** 801,805 **** void z_sigbin_setup(void) { - sigABS_setup(); sigSGN_setup(); sigGRT_setup(); --- 756,759 ----
Index: z_zexy.h =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_zexy.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** z_zexy.h 2 Nov 2005 12:57:37 -0000 1.3 --- z_zexy.h 21 Dec 2005 14:56:16 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- #define Z_ZEXY_H__ void z_a2l_setup(void); /* a2l.c */ + void z_abs__setup(void); /* abs~.c */ void z_atoi_setup(void); /* atoi.c */ void z_avg__setup(void); /* avg~.c */
Index: z_zexy.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_zexy.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** z_zexy.c 2 Nov 2005 12:57:37 -0000 1.3 --- z_zexy.c 21 Dec 2005 14:56:16 -0000 1.4 *************** *** 9,12 **** --- 9,13 ---- { z_a2l_setup(); /* a2l.c */ + z_abs__setup(); /* abs~.c */ z_atoi_setup(); /* atoi.c */ z_avg__setup(); /* avg~.c */
--- NEW FILE: abs~.c --- (This appears to be a binary file; contents omitted.)