[L2Ork-dev] json?

Jonathan Wilkes jon.w.wilkes at gmail.com
Sun Jan 24 18:09:05 EST 2021


On Sun, Jan 24, 2021 at 4:51 PM Marc Lavallée <marc at hacklava.net> wrote:
>
> Le 21-01-24 à 12 h 38, Jonathan Wilkes a écrit :
>
> >> So I'll create a carefully crafted $HOME/.pdsettings
> > Here's a tip-- when you right-click on an object and choose "Help",
> > the title bar for the help patch should show the full path to the
> > external.
> >
> > If you run into any problems, first check if you can instantiate the
> > object. Then right click "Help" and check the path to make sure you're
> > loading the correct one. The most recurring problem I've seen is that
> > someone is loading a different version of an external than they think
> > they are loading.
> >
> > For sanity, you can navigate to the directory that holds an external
> > binary and start with "-noprefs" and "-nostdpath" flags. Now if you
> > try to instantiate the binary it will *only* load from that directory.
> >
> > -Jonathan
>
> Thanks for the tip, it will help with both Pd Vanilla and Purr-Data.
>
> I will build simple patches, not large projects, and once I'll know
> which extensions I need, I'll load them via a dedicated config.
>
> I was hoping to manage a large json file, but it'd be much better to do
> it from some other software. I was planning to use pyext (as I did in
> 2003), but sadly the latest version is not built with python3.
>
> I was also hoping to use the Purr-Data GUI like a web browser with
> HTML5, WebGL and all the rest, but I'm not sure it's possible.

You can do that manually by going to "Help" and choosing "open
DevTools". That will give you a console from which you can open a new
window with whatever HTML you want.

I don't have a menu option to open an html page, but it probably
wouldn't be hard to add that.

Anyway, in your web page you can just do a `pdgui =
require("pdgui.js")` to use the little Purr Data gui node.js singleton
context. To send messages use pdgui.pdsend("blah", "blah", blah"). To
post, use pdgui.post("blah").

Unfortunately, Chromium tries to make untold numbers of random
connections to the internet. So in Purr Data I had to block it
completely and rely on node.js to send and receive between GUI<-->Pd.
So if you want your html page to have net access (or if you want to
load a page from the web), you have to go in to Purr Data's
package.json and remove the proxy command in "--chromium-args" entry
that blocks Chromium from chattering. (The package.json is in the same
directory as pdgui.js, pd_canvas.js, etc.)

Best,
Jonathan

>
> Marc
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev


More information about the L2Ork-dev mailing list