Hi,
Is it possible to get Pd GUI through Pd API in order to be able to display it in a “wrapper program” for Pd? We’re looking to develop a wrapper over Pd and we’d like to be able to display the Pd Editor as well.
-Matti
Hi Matti,I've been porting Pd-l2ork to a different GUI toolkit, and I now have the core Pd functionality up and running with an abstract API to communicate with the GUI. In other words, all the tcl commands inside sys_gui and sys_vgui have been replaced with a parameterized function call that sends strings, numbers, floats, and arrays to the GUI. Even so, Pd is still way too chatty with the GUI-- for example, creating a new object doesn't just send a single message to the GUI. It sends at least 13 messages in Pd Vanilla, more if your object has multiple inlets and outlets. It's not impossible to wrap that, but it is certainly will slow down the process. This is especially true given that Pd has no HIG or spec regarding GUI behavior. You're going to hit some counter-intuitive features of GOP, garrays, font sizing, and a lot else in the midst of wrapping. -Jonathan
On Tuesday, February 9, 2016 12:18 PM, Matti Viljamaa mviljamaa@kapsi.fi wrote:
Hi,
Is it possible to get Pd GUI through Pd API in order to be able to display it in a “wrapper program” for Pd? We’re looking to develop a wrapper over Pd and we’d like to be able to display the Pd Editor as well.
-Matti _______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at http://lists.puredata.info/listinfo/pd-dev
libpds can do this:
void libpds_show_gui(pd_t *pd); void libpds_hide_gui(pd_t *pd);
https://github.com/kmatheussen/libpd Only linux though.
On Tue, Feb 9, 2016 at 7:05 PM, Jonathan Wilkes via Pd-dev < pd-dev@lists.iem.at> wrote:
Hi Matti, I've been porting Pd-l2ork to a different GUI toolkit, and I now have the core Pd functionality up and running with an abstract API to communicate with the GUI. In other words, all the tcl commands inside sys_gui and sys_vgui have been replaced with a parameterized function call that sends strings, numbers, floats, and arrays to the GUI.
Even so, Pd is still way too chatty with the GUI-- for example, creating a new object doesn't just send a single message to the GUI. It sends at least 13 messages in Pd Vanilla, more if your object has multiple inlets and outlets. It's not impossible to wrap that, but it is certainly will slow down the process.
This is especially true given that Pd has no HIG or spec regarding GUI behavior. You're going to hit some counter-intuitive features of GOP, garrays, font sizing, and a lot else in the midst of wrapping.
-Jonathan
On Tuesday, February 9, 2016 12:18 PM, Matti Viljamaa mviljamaa@kapsi.fi wrote:
Hi,
Is it possible to get Pd GUI through Pd API in order to be able to display it in a “wrapper program” for Pd? We’re looking to develop a wrapper over Pd and we’d like to be able to display the Pd Editor as well.
-Matti _______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at http://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@lists.iem.at http://lists.puredata.info/listinfo/pd-dev
Hi Matti,
On 10/02/16 01:18, Matti Viljamaa wrote:
Is it possible to get Pd GUI through Pd API in order to be able to
display it in a “wrapper program” for Pd?
We’re looking to develop a wrapper over Pd and we’d like to be able
to display the Pd Editor as well.
In the past the way I did this was in the host language simply call Pd with -nogui or without, depending on the user's requirements. Of course, it requires a restart of the Pd process which can be annoying depending on the requirements of your application.
The host language I was using was Python, which managed the Pd process. There is some code here:
https://mccormick.cx/projects/PyPd/index.shtml
I'll get this converted to a git repo if it's useful to somebody.
I think I built this ridiculous thing with it, but I don't remember:
https://github.com/chr15m/phonon
Oh wait, no, that was nodejs and somebody else built a nodejs module for doing the same as PyPd above but in nodejs.
Cheers,
Chris.