Dynamically created sub-patchers/bpatches
Hi all,
I would like to dynamically create a sub-patches/bpatches. How can I do this?
Lets' say I have a main window. I have a menu with 3 items in it. Choosing every single item would open (visually) the window and it will contain the same parameters, but for different layer. So I need to keep the parameters independent.
In this case, I can make 3 the very same sub-patchers and do everything static.
But the question is, how can I do it, if the number of the layers (items in the menu) would be dynamic? Then I want to make these sub-patchers dynamically. I don't expect I would need to create all objects and connections via scripting. I believe I can somehow just instantiate the same sub/b-patcher and use the only one source.
How to do this, please?
I attached small example with the static 3 layers, if it's not clear from my description.
Thanks in advice
You can dynamically create any object with javascript. This could be a bpatcher which on itself loads a patch with an embedded javascript of its own. Within this embedded javascript you could create another bpatcher, which loads another patch with an embedded javascript.
Something like patchception :-)
Hi,
Thank you for the reply.
How can I load the other patch to the bpatcher by using javascript, please?
perhaps you can use poly~ and route your parameters to different voices
Wow, very nice, FRANS-JAN WIND! Thank you very much!
the other three methods would be thispatcher-scripting, pcontrol, or using an OSX shell.
Hi,
Thank you Roman Thilenius. The pcontrol way is the one I developed before Frans-Jan Wind sent his solution. It works quite well too.
Because I prefer to open the controllers in the new window, I will probably go this way at the end.
Thanks!