Update of /cvsroot/pure-data/externals/unauthorized/filterbank~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3807
Modified Files: CHANGES.LOG Makefile filterbank~.c filterbank~.h Log Message: Added GOP supoort
Index: CHANGES.LOG =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/filterbank~/CHANGES.LOG,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGES.LOG 16 Aug 2003 08:19:33 -0000 1.1 --- CHANGES.LOG 2 Mar 2005 02:40:44 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + 0.3 + Added GOP support + 0.2 + Adapted for pd 0.37 0.1 First filterbank~ implementation
Index: Makefile =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/filterbank~/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 16 Aug 2003 08:19:33 -0000 1.1 --- Makefile 2 Mar 2005 02:40:44 -0000 1.2 *************** *** 80,84 ****
.c.pd_linux: ! ../tk2c.bash < $*.tk > $*.tk2c cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm --- 80,84 ----
.c.pd_linux: ! ./tk2c.bash < $*.tk > $*.tk2c cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
Index: filterbank~.h =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/filterbank~/filterbank~.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** filterbank~.h 16 Aug 2003 08:22:50 -0000 1.2 --- filterbank~.h 2 Mar 2005 02:40:44 -0000 1.3 *************** *** 41,45 **** #include <math.h> #include <ctype.h> ! #include <m_pd.h> #include "m_imp.h" #include "g_canvas.h" --- 41,45 ---- #include <math.h> #include <ctype.h> ! #include "m_pd.h" #include "m_imp.h" #include "g_canvas.h"
Index: filterbank~.c =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/filterbank~/filterbank~.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** filterbank~.c 30 May 2004 05:20:00 -0000 1.5 --- filterbank~.c 2 Mar 2005 02:40:44 -0000 1.6 *************** *** 36,40 **** #ifdef NT #include <io.h> - #define random rand #else #include <unistd.h> --- 36,39 ---- *************** *** 47,51 **** #define FILTERBANK_HEIGHT 16
! static char *filterbank_version = "filterbank : responses from a set of band-pass filters, version 0.1 (ydegoyon@free.fr)";
t_widgetbehavior filterbank_widgetbehavior; --- 46,50 ---- #define FILTERBANK_HEIGHT 16
! static char *filterbank_version = "filterbank : responses from a set of band-pass filters, version 0.3 (ydegoyon@free.fr)";
t_widgetbehavior filterbank_widgetbehavior; *************** *** 133,148 **** SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xFILTERBANK\n", canvas, ! x->x_obj.te_xpix, ! x->x_obj.te_ypix, ! x->x_obj.te_xpix + x->x_width, ! x->x_obj.te_ypix + x->x_height, x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #000000 -tags %xSIN\n", canvas, ! x->x_obj.te_xpix, ! x->x_obj.te_ypix-1, ! x->x_obj.te_xpix+7, ! x->x_obj.te_ypix, x);
--- 132,147 ---- SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xFILTERBANK\n", canvas, ! text_xpix(&x->x_obj, glist), ! text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist) + x->x_width, ! text_ypix(&x->x_obj, glist) + x->x_height, x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #000000 -tags %xSIN\n", canvas, ! text_xpix(&x->x_obj, glist), ! text_ypix(&x->x_obj, glist)-1, ! text_xpix(&x->x_obj, glist)+7, ! text_ypix(&x->x_obj, glist), x);
*************** *** 151,164 **** char color[8];
! sprintf( color, "#%.2x%.2x%.2x", random() % 256, random() % 256, random() % 256 );
SYS_VGUI11(".x%x.c create polygon %d %d %d %d %d %d -outline #000000 -fill %s -tags %xFILTER%d\n", canvas, ! x->x_obj.te_xpix + fi*x->x_width/x->x_nbfilters, ! x->x_obj.te_ypix, ! x->x_obj.te_xpix + fi*x->x_width/x->x_nbfilters + x->x_width/(2*x->x_nbfilters), ! x->x_obj.te_ypix + x->x_height, ! x->x_obj.te_xpix + (fi+1)*x->x_width/x->x_nbfilters, ! x->x_obj.te_ypix, color, x, fi); } --- 150,163 ---- char color[8];
! sprintf( color, "#%.2x%.2x%.2x", (int)random() % 256, (int)random() % 256, (int)random() % 256 );
SYS_VGUI11(".x%x.c create polygon %d %d %d %d %d %d -outline #000000 -fill %s -tags %xFILTER%d\n", canvas, ! text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters, ! text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters + x->x_width/(2*x->x_nbfilters), ! text_ypix(&x->x_obj, glist) + x->x_height, ! text_xpix(&x->x_obj, glist) + (fi+1)*x->x_width/x->x_nbfilters, ! text_ypix(&x->x_obj, glist), color, x, fi); } *************** *** 175,190 **** SYS_VGUI7(".x%x.c coords %xFILTERBANK %d %d %d %d\n", canvas, x, ! x->x_obj.te_xpix, ! x->x_obj.te_ypix, ! x->x_obj.te_xpix + x->x_width, ! x->x_obj.te_ypix + x->x_height );
SYS_VGUI7(".x%x.c coords %xSIN %d %d %d %d\n", canvas, x, ! x->x_obj.te_xpix, ! x->x_obj.te_ypix-1, ! x->x_obj.te_xpix+7, ! x->x_obj.te_ypix );
--- 174,189 ---- SYS_VGUI7(".x%x.c coords %xFILTERBANK %d %d %d %d\n", canvas, x, ! text_xpix(&x->x_obj, glist), ! text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist) + x->x_width, ! text_ypix(&x->x_obj, glist) + x->x_height );
SYS_VGUI7(".x%x.c coords %xSIN %d %d %d %d\n", canvas, x, ! text_xpix(&x->x_obj, glist), ! text_ypix(&x->x_obj, glist)-1, ! text_xpix(&x->x_obj, glist)+7, ! text_ypix(&x->x_obj, glist) );
*************** *** 193,202 **** SYS_VGUI10(".x%x.c coords %xFILTER%d %d %d %d %d %d %d\n", canvas, x, fi, ! x->x_obj.te_xpix + fi*x->x_width/x->x_nbfilters, ! x->x_obj.te_ypix, ! x->x_obj.te_xpix + fi*x->x_width/x->x_nbfilters + x->x_width/(2*x->x_nbfilters), ! x->x_obj.te_ypix + x->x_height, ! x->x_obj.te_xpix + (fi+1)*x->x_width/x->x_nbfilters, ! x->x_obj.te_ypix ); } --- 192,201 ---- SYS_VGUI10(".x%x.c coords %xFILTER%d %d %d %d %d %d %d\n", canvas, x, fi, ! text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters, ! text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters + x->x_width/(2*x->x_nbfilters), ! text_ypix(&x->x_obj, glist) + x->x_height, ! text_xpix(&x->x_obj, glist) + (fi+1)*x->x_width/x->x_nbfilters, ! text_ypix(&x->x_obj, glist) ); } *************** *** 242,249 **** t_filterbank_tilde* x = (t_filterbank_tilde*)z;
! *xp1 = x->x_obj.te_xpix; ! *yp1 = x->x_obj.te_ypix; ! *xp2 = x->x_obj.te_xpix+x->x_width; ! *yp2 = x->x_obj.te_ypix+x->x_height; }
--- 241,248 ---- t_filterbank_tilde* x = (t_filterbank_tilde*)z;
! *xp1 = text_xpix(&x->x_obj, owner); ! *yp1 = text_ypix(&x->x_obj, owner); ! *xp2 = text_xpix(&x->x_obj, owner)+x->x_width; ! *yp2 = text_ypix(&x->x_obj, owner)+x->x_height; }
*************** *** 254,258 ****
binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), ! (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("filterbank~"), x->x_lowfreq, x->x_highfreq, x->x_nbfilters ); --- 253,257 ----
binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), ! (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), gensym("filterbank~"), x->x_lowfreq, x->x_highfreq, x->x_nbfilters ); *************** *** 381,386 **** { t_filterbank_tilde *x = (t_filterbank_tilde *)z; ! int xold = x->x_obj.te_xpix; ! int yold = x->x_obj.te_ypix;
// post( "filterbank_displace dx=%d dy=%d", dx, dy ); --- 380,385 ---- { t_filterbank_tilde *x = (t_filterbank_tilde *)z; ! int xold = text_xpix(&x->x_obj, glist); ! int yold = text_ypix(&x->x_obj, glist);
// post( "filterbank_displace dx=%d dy=%d", dx, dy ); *************** *** 388,392 **** x->x_obj.te_xpix += dx; x->x_obj.te_ypix += dy; ! if(xold != x->x_obj.te_xpix || yold != x->x_obj.te_ypix) { filterbank_draw_move(x, x->x_glist); --- 387,391 ---- x->x_obj.te_xpix += dx; x->x_obj.te_ypix += dy; ! if(xold != text_xpix(&x->x_obj, glist) || yold != text_ypix(&x->x_obj, glist) ) { filterbank_draw_move(x, x->x_glist); *************** *** 656,672 **** filterbank_widgetbehavior.w_visfn = filterbank_vis; filterbank_widgetbehavior.w_clickfn = NULL; ! /* ! * hans@eds.org: As of 0.37, pd does not have these last ! * two elements in t_widgetbehavoir anymore. ! * see pd/src/notes.txt: ! * savefunction and dialog into class structure ! */ ! #if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) filterbank_widgetbehavior.w_propertiesfn = filterbank_properties; filterbank_widgetbehavior.w_savefn = filterbank_save; - #else - class_setsavefn(filterbank_class_tilde, &filterbank_save); - class_setpropertiesfn(filterbank_class_tilde, &filterbank_properties); #endif class_setwidget(filterbank_class_tilde, &filterbank_widgetbehavior); } --- 655,667 ---- filterbank_widgetbehavior.w_visfn = filterbank_vis; filterbank_widgetbehavior.w_clickfn = NULL; ! ! #if PD_MINOR_VERSION >= 37 ! class_setpropertiesfn(filterbank_class_tilde, filterbank_properties); ! class_setsavefn(filterbank_class_tilde, filterbank_save); ! #else filterbank_widgetbehavior.w_propertiesfn = filterbank_properties; filterbank_widgetbehavior.w_savefn = filterbank_save; #endif class_setwidget(filterbank_class_tilde, &filterbank_widgetbehavior); + class_sethelpsymbol(filterbank_class_tilde, gensym("filterbank~.pd")); }