Hi,
> if it is possible to write externals that generate structs/templates?
Yes, actually Pd itself does this for the private templates needed by [array] and [text], have a look at garray_init() in g_array.c or text_template_init() in x_text.c.
The patch is just a C string which you put into a binbuf which gets evaluated with pd_canvasmaker as the target.
You can also create patches programmatically:
1) create the canvas: https://git.iem.at/pd/vstplugin/blob/develop/pd/src/vstplugin~.cpp#L521
2) fill it with stuff: https://git.iem.at/pd/vstplugin/blob/develop/pd/src/vstplugin~.cpp#L649
Christof
Gesendet: Montag, 05. August 2019 um 21:10 Uhr
Von: "x nor" <x37v.alex@gmail.com>
An: pd-dev <pd-dev@lists.iem.at>
Betreff: [PD-dev] can externals create data structures/templates?
I'm starting to work with data structures and I'm curious if it is possible to write externals that generate structs/templates?
Are there any examples of this?
I guess I can do dynamic patching if not?
Thanks!
_______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev