Update of /cvsroot/pure-data/externals/ggee/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26862
Modified Files: envgen.c slider.c sliderh.c Log Message: who knows what
Index: sliderh.c =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/gui/sliderh.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sliderh.c 24 Feb 2005 14:55:29 -0000 1.5 --- sliderh.c 1 Jul 2005 07:51:03 -0000 1.6 *************** *** 19,34 **** t_fatom *x = (t_fatom *)z;
! binbuf_addv(b, "ssiisiiisss", gensym("#X"),gensym("obj"), x->x_obj.te_xpix, x->x_obj.te_ypix , ! gensym("sliderh"),x->x_max,x->x_min,x->x_width,x->x_send,x->x_color,x->x_bgcolor); binbuf_addv(b, ";"); }
! static void *sliderh_new(t_symbol* s, int argc, t_atom* argv) { t_fatom *x = (t_fatom *)pd_new(sliderh_class); x->x_type = gensym("hslider"); ! return fatom_new(x,argc,argv); }
--- 19,34 ---- t_fatom *x = (t_fatom *)z;
! binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), x->x_obj.te_xpix, x->x_obj.te_ypix , ! gensym("sliderh"),x->x_max,x->x_min,x->x_width); binbuf_addv(b, ";"); }
! static void *sliderh_new(t_floatarg max, t_floatarg min,t_floatarg h) { t_fatom *x = (t_fatom *)pd_new(sliderh_class); x->x_type = gensym("hslider"); ! return fatom_new(x,max,min,h,&s_); }
*************** *** 39,43 ****
! void sliderh_setup(void) { sliderh_class = class_new(gensym("sliderh"), (t_newmethod)sliderh_new, 0, sizeof(t_fatom),0,A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT,0); --- 39,43 ----
! void sliderh_setup() { sliderh_class = class_new(gensym("sliderh"), (t_newmethod)sliderh_new, 0, sizeof(t_fatom),0,A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT,0);
Index: slider.c =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/gui/slider.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** slider.c 24 Feb 2005 14:55:29 -0000 1.11 --- slider.c 1 Jul 2005 07:51:03 -0000 1.12 *************** *** 10,25 **** t_fatom *x = (t_fatom *)z;
! binbuf_addv(b, "ssiisiiisss", gensym("#X"),gensym("obj"), x->x_obj.te_xpix, x->x_obj.te_ypix , ! gensym("slider"),x->x_max,x->x_min,x->x_width,x->x_send,x->x_color,x->x_bgcolor); binbuf_addv(b, ";"); }
! static void *slider_new(t_symbol* s,t_int argc, t_atom* argv) { t_fatom *x = (t_fatom *)pd_new(slider_class); x->x_type = gensym("vslider"); ! return fatom_new(x,argc,argv); }
--- 10,25 ---- t_fatom *x = (t_fatom *)z;
! binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), x->x_obj.te_xpix, x->x_obj.te_ypix , ! gensym("slider"),x->x_max,x->x_min,x->x_width); binbuf_addv(b, ";"); }
! static void *slider_new(t_floatarg max, t_floatarg min, t_floatarg h) { t_fatom *x = (t_fatom *)pd_new(slider_class); x->x_type = gensym("vslider"); ! return fatom_new(x,max,min,h,&s_); }
*************** *** 28,53 ****
! void slider_setup(void) { slider_class = class_new(gensym("slider"), (t_newmethod)slider_new, 0, ! sizeof(t_fatom),0,A_GIMME,0);
! slider_widgetbehavior.w_getrectfn = fatom_getrect; ! slider_widgetbehavior.w_displacefn = fatom_displace; ! slider_widgetbehavior.w_selectfn = fatom_select; ! slider_widgetbehavior.w_activatefn = fatom_activate; ! slider_widgetbehavior.w_deletefn = fatom_delete; ! slider_widgetbehavior.w_visfn= fatom_vis; ! slider_widgetbehavior.w_clickfn = NULL; ! ! fatom_setup_common(slider_class); ! class_setwidget(slider_class,&slider_widgetbehavior); ! #if PD_MINOR_VERSION < 37 ! slider_widgetbehavior.w_savefn = slider_save; ! slider_widgetbehavior.w_propertiesfn = NULL; ! #else class_setsavefn(slider_class,&slider_save); - class_setpropertiesfn(slider_class,&fatom_properties); #endif ! } --- 28,52 ----
! void slider_setup() { slider_class = class_new(gensym("slider"), (t_newmethod)slider_new, 0, ! sizeof(t_fatom),0,A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT,0);
! slider_widgetbehavior.w_getrectfn = fatom_getrect, ! slider_widgetbehavior.w_displacefn = fatom_displace, ! slider_widgetbehavior.w_selectfn = fatom_select, ! slider_widgetbehavior.w_activatefn = fatom_activate, ! slider_widgetbehavior.w_deletefn = fatom_delete, ! slider_widgetbehavior.w_visfn= fatom_vis, #if PD_MINOR_VERSION < 37 ! slider_widgetbehavior.w_savefn = slider_save, ! slider_widgetbehavior.w_propertiesfn = NULL, ! #endif ! slider_widgetbehavior.w_clickfn = NULL, ! ! fatom_setup_common(slider_class); ! class_setwidget(slider_class,&slider_widgetbehavior); ! #if PD_MINOR_VERSION >= 37 class_setsavefn(slider_class,&slider_save); #endif ! class_setpropertiesfn(slider_class,&fatom_properties); }
Index: envgen.c =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/gui/envgen.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** envgen.c 8 Feb 2005 09:28:44 -0000 1.9 --- envgen.c 1 Jul 2005 07:51:03 -0000 1.10 *************** *** 8,12 **** #define NONE 0 #define ATTACK 1 ! #define SUSTAIN 3 #define STATES 100
--- 8,12 ---- #define NONE 0 #define ATTACK 1 ! #define SUSTAIN -1 #define STATES 100
*************** *** 188,191 **** --- 188,202 ---- }
+ void envgen_release(t_envgen* x) { + t_atom a[2]; + float del = x->duration[x->x_state] - x->duration[x->x_state-1]; + if (x->x_state <= x->sustain_state) { + x->x_state = x->sustain_state+1; /* skip sustain state */ + clock_delay(x->x_clock,del); + SETFLOAT(a,x->finalvalues[x->x_state]*(x->max-x->min)); + SETFLOAT(a+1,del); + OUT_LIST(x,2,a); + } + }
static void envgen_sustain(t_envgen *x, t_floatarg f) *************** *** 200,204 **** t_atom a[2]; x->x_state++; ! if (x->x_state <= x->last_state) { float del = x->duration[x->x_state] - x->duration[x->x_state-1]; clock_delay(x->x_clock,del); --- 211,215 ---- t_atom a[2]; x->x_state++; ! if (x->x_state <= x->last_state && x->x_state != x->sustain_state) { float del = x->duration[x->x_state] - x->duration[x->x_state-1]; clock_delay(x->x_clock,del); *************** *** 207,212 **** OUT_LIST(x,2,a); } ! else ! clock_unset(x->x_clock); }
--- 218,223 ---- OUT_LIST(x,2,a); } ! // else ! // clock_unset(x->x_clock); }
*************** *** 322,326 **** class_addmethod(envgen_class,(t_method)envgen_setresize,gensym("resize"),A_FLOAT,A_NULL);
! envgen_widgetbehavior.w_getrectfn = envgen_getrect; envgen_widgetbehavior.w_displacefn = envgen_displace; envgen_widgetbehavior.w_selectfn = envgen_select; --- 333,338 ---- class_addmethod(envgen_class,(t_method)envgen_setresize,gensym("resize"),A_FLOAT,A_NULL);
! class_addmethod(envgen_class,(t_method)envgen_release,gensym("release"),A_NULL); ! envgen_widgetbehavior.w_getrectfn = envgen_getrect; envgen_widgetbehavior.w_displacefn = envgen_displace; envgen_widgetbehavior.w_selectfn = envgen_select;