[PD] Dev question
mark at junklight.com
Wed Jan 30 16:56:59 CET 2002
Thats spot on cheers.
I've updated the metro plus object in my libray so that it also works
just like a metro object as well if it gets a float.
You can see Krzysztof's code in action in metroplus.c..
> -----Original Message-----
> From: krzYszcz at suita.chopin.edu.pl
> [mailto:krzYszcz at suita.chopin.edu.pl]On Behalf Of Krzysztof Czaja
> Sent: 30 January 2002 13:38
> To: Orm Finnendahl
> Cc: pd-list at iem.kug.ac.at
> Subject: Re: [PD] Dev question
> hi Orm,
> append (and prepend) has only one inlet, and I do not know about join.
> But anyway having other than leftmost inlet to accept various messages
> is not that difficult. To give you a clue how this may be done, here
> is an excerpt from my `spying' code:
> static void *spy_new(...)
> t_spy *x = (t_spy *)pd_new(spy_class);
> t_spy *x1 = (t_spy *)pd_new(s2y_class); /* proxy for 2nd
> inlet messages */
> ... (there are more...)
> /* here goes something like: x->x_shadow = x1 */
> inlet_new(&x->x_ob, &x1->x_ob.ob_pd, 0, 0); /* create
> 2nd inlet */
> static void spy_free(t_spy *x)
> /* here goes something like: x1 = x->x_shadow */
> pd_free(&x1->x_ob.ob_pd); /* this has to be done
> explicitly */
> void spy_setup(void)
> spy_class = class_new(gensym("spy"), (t_newmethod)spy_new,
> (t_method)spy_free, sizeof(t_spy), 0, ..., 0);
> s2y_class = class_new(gensym("spy (second inlet)"), 0, 0,
> sizeof(t_spy), /* this may need to be
> changed */
> CLASS_PD | CLASS_NOINLET, 0);
> class_addmethod(spy_class, ...
> class_addmethod(s2y_class, ...
> Orm Finnendahl wrote:
> > I would like to know, how to implement the proxy, your're
> > mentioning. I had the same problem, trying to mimik the list objects
> > from Max/MSP like join and append. There is a way around that, like
More information about the Pd-list