Hi everyone,
I'm working on two externals for a personal project, and being new to writing these I have two questions. I'm working on Mac OS 10.8 in Xcode 5, and I've worked through the standard tutorial.
First, is there some way to take a list as an inlet? In the external, would this read to an array?
Second, I have a bunch of sends in a patch that need to be manipulated in a certain way which is easy to do in C, but tough to do in pd. Is there some way to retrieve sends of a certain format (e.g., data1, data2, ... dataN) into an external?
Thanks!
-
List inlet and retrieve data from patch?
-
idk if this http://pdstatic.iem.at/externals-HOWTO/pd-externals-HOWTO_de.pdf is the tutorial you're talking about but it's great for reference, you may be interested in the class_addanything function:
void class_addanything(t_class *c, t_method fn);
Adds a method fn for an arbitrary message to the class c.
The arguments of the anything-method are apart from a pointer to the class-dataspace a pointer to the selector-symbol, the number of atoms and
a pointer to the list of atoms:
void my_any_method(t_mydata *x,
t_symbol *s, int argc, t_atom *argv);as for sends/receives there seems to be a way to do it but I'm not sure, something having to do with the functions of pd_<datatype> (pd_float()) etc and the function pd_bind() to bind a class to a symbol? this is how send/receive seem to do it, see x_connective.c