From 167e3f18f8fafec75c77fe54b6637d3a12f28a89 Mon Sep 17 00:00:00 2001 From: Ed Kelly Date: Fri, 14 Sep 2007 15:24:11 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r8722, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/ekext/; revision=8723 --- cup/cup.c | 9 ++++++++- cup/help-cup.pd | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cup/cup.c b/cup/cup.c index 6aca214..4211c59 100644 --- a/cup/cup.c +++ b/cup/cup.c @@ -20,6 +20,13 @@ void cup_bang(t_cup *y) y->f_count += 1; } +void cup_setbang(t_cup *y, t_floatarg f) +{ + y->f_count = f; + outlet_float(y->count, y->f_count); + y->f_count += 1; +} + void *cup_new(t_floatarg f) { t_cup *y = (t_cup *)pd_new(cup_class); @@ -39,4 +46,4 @@ void cup_setup(void) class_sethelpsymbol(cup_class, gensym("help-cup")); class_addbang(cup_class, cup_bang); class_addfloat(cup_class, cup_float); -} + class_addmethod(cup_class, (t_method)cup_setbang, gensym("setbang"), A_DEFFLOAT, 0);} diff --git a/cup/help-cup.pd b/cup/help-cup.pd index eae2603..ea1a27f 100644 --- a/cup/help-cup.pd +++ b/cup/help-cup.pd @@ -13,9 +13,35 @@ #X text 184 70 why waste cpu power on counting?; #X text 106 236 Ed; #X text 71 198 someday I may write a haiku poem about it; +#X msg 280 119 setbang 198; +#X text 278 103 set and output; +#N canvas 0 0 450 300 simplecounter 0; +#X obj 107 147 cup; +#X msg 138 147 0; +#X msg 107 80 1; +#X floatatom 107 191 5 0 0 0 - - -; +#X obj 107 63 loadbang; +#X obj 107 97 metro 200; +#X text 228 190 don't forget the delay 0!; +#X obj 174 172 select 10; +#X obj 174 189 delay 0; +#X text 80 233 cup counts up from float; +#X text 79 248 simplicity helps me think; +#X text 80 263 organise my patch; +#X text 81 218 ______A_CUP_HAIKU_______; +#X connect 0 0 3 0; +#X connect 0 0 7 0; +#X connect 1 0 0 0; +#X connect 2 0 5 0; +#X connect 4 0 2 0; +#X connect 5 0 0 0; +#X connect 7 0 8 0; +#X connect 8 0 1 0; +#X restore 230 158 pd simplecounter; #X connect 0 0 8 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 6 0 0 0; #X connect 7 0 6 0; +#X connect 14 0 0 0; -- cgit v1.2.1