Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8372
Modified Files: z_sigbin.c z_zexy.c z_zexy.h Added Files: sgn~.c Log Message: moved sgn~ into separate file initial SSE-support of sgn~
Index: z_sigbin.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_sigbin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** z_sigbin.c 21 Dec 2005 14:56:16 -0000 1.6 --- z_sigbin.c 21 Dec 2005 17:05:47 -0000 1.7 *************** *** 16,20 ****
/* ! finally :: some of the missing binops for signals :: sgn~, >~, <~, ==~, &&~, ||~
1302:forum::für::umläute:2000 --- 16,20 ----
/* ! finally :: some of the missing binops for signals :: >~, <~, ==~, &&~, ||~
1302:forum::für::umläute:2000 *************** *** 23,81 **** #include "zexy.h"
- typedef struct _misc - { - t_object x_obj; - } t_misc; - - - /* ------------------------ sgn~ ----------------------------- */ - - static t_class *sigSGN_class; - - static t_int *sigSGN_perform(t_int *w) - { - t_float *in = (t_float *)(w[1]); - t_float *out = (t_float *)(w[2]); - int n = (int)(w[3]); - t_float x; - - while (n--) { - if ((x=*in++)>0.) *out++=1.; - else if (x<0.) *out++=-1.; - else *out++=0.; - } - - return (w+4); - } - - static void sigSGN_dsp(t_misc *x, t_signal **sp) - { - dsp_add(sigSGN_perform, 3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); - } - - static void sigSGN_helper(void) - { - post("\n%c sgn~ \t\t:: sign of a signal", HEARTSYMBOL); - } - - static void *sigSGN_new() - { - t_misc *x = (t_misc *)pd_new(sigSGN_class); - outlet_new(&x->x_obj, gensym("signal")); - - return (x); - } - - static void sigSGN_setup(void) - { - sigSGN_class = class_new(gensym("sgn~"), (t_newmethod)sigSGN_new, 0, - sizeof(t_misc), 0, A_DEFFLOAT, 0); - class_addmethod(sigSGN_class, nullfn, gensym("signal"), 0); - class_addmethod(sigSGN_class, (t_method)sigSGN_dsp, gensym("dsp"), 0); - - class_addmethod(sigSGN_class, (t_method)sigSGN_helper, gensym("help"), 0); - class_sethelpsymbol(sigSGN_class, gensym("zexy/sigbinops+")); - } - /* ------------------------ relational~ ----------------------------- */
--- 23,26 ---- *************** *** 756,760 **** void z_sigbin_setup(void) { - sigSGN_setup(); sigGRT_setup(); sigLESS_setup(); --- 701,704 ----
Index: z_zexy.h =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_zexy.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** z_zexy.h 21 Dec 2005 14:56:16 -0000 1.4 --- z_zexy.h 21 Dec 2005 17:05:47 -0000 1.5 *************** *** 52,55 **** --- 52,56 ---- void z_sfplay_setup(void); /* sfplay.c */ void z_sfrecord_setup(void); /* sfrecord.c */ + void z_sgn__setup(void); /* sgn~.c */ void z_sigzero__setup(void); /* sigzero~.c */ void z_sort_setup(void); /* sort.c */
Index: z_zexy.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/z_zexy.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** z_zexy.c 21 Dec 2005 14:56:16 -0000 1.4 --- z_zexy.c 21 Dec 2005 17:05:47 -0000 1.5 *************** *** 54,57 **** --- 54,58 ---- z_sfplay_setup(); /* sfplay.c */ z_sfrecord_setup(); /* sfrecord.c */ + z_sgn__setup(); /* sgn~.c */ z_sigzero__setup(); /* sigzero~.c */ z_sort_setup(); /* sort.c */
--- NEW FILE: sgn~.c --- (This appears to be a binary file; contents omitted.)