Dear Guenter,
First of all thank you for answering to my midi question.
Thank you also for the excellent ggee externals!
As for ticker.c I wonder if you could not consider a ticker_draw() invocation after setting x_on flag in a ticker_set() routine. Now in order to see the difference I must emulate the `set' message by turning off a spigot on ticker output first, then using a float on input -- not a big deal, but anyway...
As for toddle.c my suggestion would be to use one color to draw the toddle oval and another to draw a bang. It is perfectly possible one would need a panel with quite a lot of toddle-buttons and would want to differentiate them with colors.
Unfortunately this second modification would corrupt all of the Pd patches currently using toddles, since it would require having two symbol arguments to toddles in .pd files instead of only one. Therefore this needs a broad consent among the users or some witty upgrading solution.
Nevertheless, just to demonstrate the idea, I am attaching a very crude patchfile against toddle.c (as of ggee-0.16.tar.gz). Note that ovals can no longer be transparent (this could easly be done).
All the best,
Krzysztof
11c11,12
#define DEFAULTCOLOR "grey" #define DEFAULTBANGCOLOR "black"
21a23
t_symbol* x_bang_color;
36c38,39
x->x_obj.te_ypos + x->x_height -1, x->x_bang_color->s_name,x);
59c62
%d %d %d %d -fill %s -tags %xP\n",glist_getcanvas(glist),
62,63c65,66 < x->x_obj.te_ypos + x->x_height -1,x);
x->x_obj.te_ypos + x->x_height -1, x->x_color->s_name,x);
209c212
binbuf_addv(b, "ssiisssii", gensym("#X"),gensym("obj"),
211c214,215
gensym("toddle"),x->x_color,x->x_bang_color, x->x_width,x->x_height);
277c281
void toddle_color(t_toddle* x,t_symbol* col,t_symbol* bcol)
279a284,285
x->x_bang_color = bcol; toddle_drawme(x, x->x_glist, 1);
288c294
static void *toddle_new(t_symbol* col,t_symbol* bcol,t_floatarg h,t_floatarg o)
304a311,314
if (bcol != &s_) x->x_bang_color = bcol; else x->x_bang_color = gensym(DEFAULTBANGCOLOR);
314c324
sizeof(t_toddle),0, A_DEFSYM,A_DEFSYM,A_DEFFLOAT,A_DEFFLOAT,0);
325c335
A_SYMBOL, A_SYMBOL, 0);
As for toddle.c my suggestion would be to use one color to draw the toddle oval and another to draw a bang. It is perfectly possible one would need a panel with quite a lot of toddle-buttons and would want to differentiate them with colors.
Unfortunately this second modification would corrupt all of the Pd patches currently using toddles, since it would require having two symbol arguments to toddles in .pd files instead of only one. Therefore this needs a broad consent among the users or some witty upgrading solution.
why, why ?
since the normal background-colour would be only optional, it would be the second symbol argument that defines the colour. eg "toddle blue" would do a normal toddle that get's blue when banged and "toddle blue red" would get a red toddle, getting blue when banged.
or check whether there are 1 or 2 symbol arguments: "toddle blue" would do a normal... "toddle blue red" would get a blue toddle, getting red when banged
no problem ?
mfg.asd.gtr iohannes
Of course there is no problem with creating new objects!
The problem, as I see it, is with loading existing .pd files containing toddle lines in the current form: `toddle color width height'. This could be resolved by appending second color argument after height argument, but such an order is messy.
Krzysztof
Johannes M Zmoelnig wrote:
why, why ?
since the normal background-colour would be only optional, it would be the second symbol argument that defines the colour. eg "toddle blue" would do a normal toddle that get's blue when banged and "toddle blue red" would get a red toddle, getting blue when banged.
or check whether there are 1 or 2 symbol arguments: "toddle blue" would do a normal... "toddle blue red" would get a blue toddle, getting red when banged
no problem ?
mfg.asd.gtr iohannes
On Mon, 13 Nov 2000, Krzysztof Czaja wrote:
Of course there is no problem with creating new objects!
The problem, as I see it, is with loading existing .pd files containing toddle lines in the current form: `toddle color width height'. This could be resolved by appending second color argument after height argument, but such an order is messy.
Krzysztof
ja,ja
fault of course) 2. but since you can check the type of atoms that are passed (e.g. check whether there are 2 symbols and 2 floats) you can always take [the one symbol to be "active colour"] vs [the first of 2 symbols to be background and the second to be foreground], regardless where the floats are passed. 3. this is what you might call "tricky" (of course it is not, but mykes the code a little bit more unreadable)
mfg.asd.rw
True.
OK, I have never coded Pd externals so I made a fool of myself by only taking a brief look at toddle.c file and reasoning by example. Simply was not aware of A_GIMME atomtype.
sorry, sorry,
Krzysztof
ja,ja
- i really did not remember the correct invocation of the "toddler" (my
fault of course) 2. but since you can check the type of atoms that are passed (e.g. check whether there are 2 symbols and 2 floats) you can always take [the one symbol to be "active colour"] vs [the first of 2 symbols to be background and the second to be foreground], regardless where the floats are passed. 3. this is what you might call "tricky" (of course it is not, but mykes the code a little bit more unreadable)
mfg.asd.rw