Re: [PD-dev] how to create second inlet that accepts both floats and symbols

2013-07-18 Thread IOhannes m zmoelnig
-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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlHoKzcACgkQkX2Xpv6ydvSi9gCeLnp6wsE644eaYsmwFYPAGrfP
wosAnRUCr9jOJ6ho++oBIYoSNHA36NV+
=Q4WI
-END PGP SIGNATURE-

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] how to create second inlet that accepts both floats and symbols

2013-07-18 Thread Jonathan Wilkes

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] how to create second inlet that accepts both floats and symbols

2013-07-18 Thread IOhannes m zmoelnig
-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 SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlHoIBwACgkQkX2Xpv6ydvSWDACeONzcol5Hbx1LPHyTg3MzKLw6
TO8AnjJOeRZ4XnSXffbBbwpitnilHb7F
=U1t+
-END PGP SIGNATURE-

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] how to create second inlet that accepts both floats and symbols

2013-07-18 Thread Ivica Ico Bukvic
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?


--
Ivica Ico Bukvic, D.M.A
Composition, Music Technology
Director, DISIS Interactive Sound & Intermedia Studio
Director, L2Ork Linux Laptop Orchestra
Head, ICAT IMPACT Studio
Virginia Tech
Department of Music
Blacksburg, VA 24061-0240
(540) 231-6139
(540) 231-5034 (fax)
disis.music.vt.edu
l2ork.music.vt.edu
ico.bukvic.net


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev