[PD] GUI plugins questions

IOhannes m zmoelnig zmoelnig at iem.at
Tue Dec 6 10:02:45 CET 2016


On 2016-12-06 09:17, Roman Haefeli wrote:
> I'm considering making a GUI plugin part of distributable Pd project.
> Now, I wonder if:
> 
>   * a GUI plugin from the project's path instead of a Pd's standard
>     search path.

although the verb is missing, i am pretty sure that the answer is "yes"
(not a problem).

> 
>   * there is way for the main patch to communicate with the GUI plugin.
>     I'd like to allow some configurations to be done in the patch, so
>     that it will affect the behavior of the GUI plugin. 

there's a mechanism that allows for easy sending from core to a plugin.

- in the plugin, call
> ::pd_connect::register_plugin_dispatch_receiver <myplugin> <callback>
(where "<myplugin>" is a unique ID for your plugin, and <callback> is
the name of the callback function in your gui-plugin.

- on the patch side, send a message [plugin-dispatch <myplugin> ...( to
the "pd" receiver.
this will call the <callback> function on the Pd-GUI with the "..." args.

see attachments for a trivial example.


iirc, this has been introduced with the GUI rewrite (so it has been here
for quite some time).
however, older versions (<0.47 ?) of Pd would complain bitterly, if you
sent something to an unregistered receiver (e.g. the GUI plugin did not
load)


fgmasdr
IOhannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: to-gui.pd
Type: text/x-puredata
Size: 306 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161206/0fc2bfc6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: to-gui-plugin.tcl
Type: text/x-tcl
Size: 266 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161206/0fc2bfc6/attachment.tcl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161206/0fc2bfc6/attachment.sig>


More information about the Pd-list mailing list