Closed AndrewBelt closed 3 years ago
We can implement multi-instance support once this merge request goes into libpd.
instead of breaking multi-instance support in prototype, why not use a fork of libpd in the short term? you can make the change back to the canonical repo once the PR is merged. we had to do that for quickjs due to how it handles stack length checks (and are still using the fork).
that seems to me to be a good solution in the short term, and could end up being a good (and stable) solution in the long term as well, depending on how it is handled.
I agree that @JerrySievert's is the best idea you're willing to fork libpd on your own GitHub account, merge the PR, and use it as a submodule.
I'm optimistic Miller is tackling this issue soon rendering this discussion obsolete. Multi-instance support is coming either way. Because I'm not sure if Miller will accept the pull request as is or solve the issue his way, I'd rather not fork Pd and Libpd now with these changes. The linked to libpd pull request only works if the companion core-pd patch is applied to, and that's still marked as WIP by Dan.
Pull/Merge request here: https://github.com/VCVRack/VCV-Prototype/pull/35
I've only tested this partially, but most things look great! I've given @mxa and @clwe write access to this repo, so commit all future changes to this master branch. I'll assign issue(s) to both of you to solve before releasing. I still need to finalize testing across all OSs and solve https://github.com/VCVRack/VCV-Prototype/issues/32 before releasing.
LibPDEngine
has been released in VCV Prototype 1.3.0. https://twitter.com/vcvrack/status/1286313958715068416
https://github.com/libpd/libpd
Advantages:
ScriptEngine
subclass can simply fail with an error message if libpd is already in use.