inlet_new apparently redirects elsewhere, so one could potentially do what list_append does (if I am understanding the code correctly), but is there an easier way to do this?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-07-18 18:41, Ivica Ico Bukvic wrote:
inlet_new apparently redirects elsewhere, so one could potentially do what list_append does (if I am understanding the code correctly), but is there an easier way to do this?
basically you ahve two options: - - allow "lists" at the second inlet, and check whether the list has only one argument of type A_FLOAT or A_SYMBOL:
/* creating the inlet */ inlet_new((t_object*)x, (t_pd*)x, gensym("list"), gensym("list2"));
/* adding a method for the 2nd inlet */ class_addmethod(classptr, list2Method, gensym("list2"), A_GIMME, 0);
- - if you want to allow *any* message, you need to create a proxy object that will act as a receiver for the messages sent to the given inlet. this is what the [list] family does (but also some other objects, e.g. iemlib's [any])
- - IIRC, when using flext, you get inlets that allow any message for free (that is: proxy objects are handled transparently)
gasrd IOhannes
PS: i was having troubles understanding your actual question. would you mind putting a the question itself into the body of the email? my MUA only displays part of the subject, at least where i usually look for it.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-07-18 19:04, IOhannes m zmoelnig wrote:
basically you ahve two options: - allow "lists" at the second inlet, and check whether the list has only one argument of type A_FLOAT or A_SYMBOL:
/* creating the inlet */ inlet_new((t_object*)x, (t_pd*)x, gensym("list"), gensym("list2"));
ah i forgot: this obviously will only work if the first inlet of the object need not accept all messages on it's own behalf, as the "list2" selector will be reserved for the 2nd inlet.
fgmasdr IOhannes
On 07/18/2013 12:41 PM, Ivica Ico Bukvic wrote:
inlet_new apparently redirects elsewhere, so one could potentially do what list_append does (if I am understanding the code correctly), but is there an easier way to do this?
I believe I changed [select] to do this with a proxy inlet in Pd-l2ork. The right inlet takes both symbols and floats.
I don't think there's another way to do this from within Pd.
-Jonathan