Another new release for pd2jack (v0.1.9):
https://github.com/GModal/pd2jack
New with v0.1.9, enabling interactive mode (-i) interprets a "live stream" of parameter pairs (in the console), which are passed on as "param" messages to the Pd patch. These work like the startup "parameter pairs," except for:
- No quotes are required
- Passed in real time during run
- Each pair is terminated with a newline
A stream of pairs might look something like this:
1 89
1 88
1 87
1 86
3 2180
3 2200
3 2221
3 2241
3 2261
4 19
NOTE: this has some cool implications -- a separate GUI application can act as a front-end, and "pipe" data into pd2jack.
So ANY GUI api could be used...just convert any input to parameter pairs and print them to the console. This isn't a crazy as it sounds -- two applications connected with a pipe are separate processes, and if the numeric char strings aren't actually printed to the console (the are not, with pipe), the CPU load is pretty small.
Here's a example of how it's invoked:
./revUI | pd2jack -i -p rev_i.pd
(where revUI is the GUI, and pd2jack is running the "rev_i.pd" patch in interactive mode.)
Simple video demo:
There are other options for IPC with Pd (netsend, netreceive & some custom objects) and piping the console might feel like a hack, but it is simple and quick. An additional method (sockets?) might be added to pd2jack in the future...(yeah, I'm thinking maybe a plugin interface).
It's also been suggested this mode might be useful for people with disabilities. I've also successfully piped the output of pd2jack to a speech synthesis module, sending text via Pure Data's [print] object, as well as any info output in "verbose" mode. Of course, that could probably be done in a normal "headless" Pure Data.
Interactive Mode Special Commands (w/ "@" prefix)
Interactive mode also includes a set of special cmds, for controlling some internal operations. Each of these cmds is preceeded with an "at" symbol (@), to differentiate the cmds from the parameter stream. Here's a list:
- @openPatch <name> : load a different patch into the LibPd space (closes current patch first).
- @closePatch : closes the current patch
- @reopenPatch : reopens the last valid patch (patch can be closed or already open)
- @im_sleepTime <int> : sleep time (ms, 5-500) between data fetches for interactive mode.
Invoking "@reopenPatch" on an already open patch will reload the patch.
I expect more cmds will be added in the future.