[PD] bugs and question

Krzysztof Czaja czaja at chopin.edu.pl
Mon Sep 2 16:03:54 CEST 2002


using an atom type unknown to the outside world is possible, but
without any way of plugging a specialized method handling this
type.  One would need to use a generic typedmess() interface --
declare A_GIMME method on a receiving side, and pass it ordinary
messages with a symbol selector prefix.

I am not sure, if relying on every foreign class ignoring unknown
atom type is a good idea.  If not, one could filter foreign
receivers, i.e. directly use outlet traversal routines, bypassing
the standard outlet_anything() mechanism.

Of course, there are also simple but dirty hacks for passing
C-pointers around, like converting their hex representation into
either symbols (this could result in a Pd's symbol table lookup
slowdown), or lists of ascii codes (floats).  The other hack could
be passing indices to a ``dispatch table'', or, more generally,
establishing a well-known base address, and passing the offsets
(small floats).


Mathieu Bouchard wrote:
 > How do I add a new type of Atom? If not, what may I use to pass void*
 > around? You see, I used to use integers to pass around pointers, because
 > my methods always knew beforehand what were function pointers and what
 > were int pointers and what were just integers. However there is no integer
 > type in PureData. What should I do?

More information about the Pd-list mailing list