[PD-dev] can externals create data structures/templates?

x nor x37v.alex at gmail.com
Mon Aug 5 21:55:18 CEST 2019


Great, Thanks Christof!
That reminds me, is there documentation for what binbufs are and how
they're used? It is something I haven't worked with and `m_pd.h` lacks
documentation.

On Mon, Aug 5, 2019 at 12:52 PM Christof Ressi <christof.ressi at gmx.at>
wrote:

> 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 at gmail.com>
> *An:* pd-dev <pd-dev at 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 at lists.iem.at https://lists.puredata.info/listinfo/pd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20190805/ac423ba8/attachment.html>


More information about the Pd-dev mailing list