Repeating bpatcher elements as individual instances?

    Feb 01 2011 | 10:07 am
    I have an interface I'm working on. It is basically a synth voice that I want to repeat 16 times as individually controllable GUIs. So I built the main synth patch and made a perf view for it. Then I made a new patcher and opened the synth in a bpatcher. Next I simply copied the bpatcher 15 more times.
    The first thing I noticed is that the entire patcher responds to input as a group. The dials and some other controls change individually - but [buffer~] for instance seems to globally change all 16 voices to the same file rather than individually. Some other functions like MIDI input range also change globally.
    So I guess my question is this: How can I repeat bpatchers so that each one is individually contained and behaves on its own?

    • Feb 01 2011 | 10:24 am
      You should probably make the buffer names dynamic (different names per bpatcher). If they share the same name they share the same spot in memory.
    • Feb 01 2011 | 6:44 pm
      Take a look at the patcherargs object - this will help you with assigning unique buffer names by using arguments you've entered in the bpatcher inspector.
    • Feb 01 2011 | 7:36 pm
      use #0 in front of any name like "#0_mybuffer" to generate a unique random number inside an abstraction/bp.
      otherwise go with what Jesse said. Although you don't necessarily need the patcherargs obect. #1, #2, #3 etc. will do the trick as well ;)
    • Feb 01 2011 | 8:44 pm
      you can give arguments in the bpatcher's info window, look for the "arguments" tab. place the #1, #2, #3... where your arguments need to show in the original instance.
    • Feb 02 2011 | 1:42 am
      Having a little trouble figuring this out. If my buffer is inside a subpatcher can/should I add #0 to the subpatcher name? Is this all documented somewhere?
    • Feb 02 2011 | 1:50 am
      You add it to the name of the buffer in each subpatcher.
    • Feb 02 2011 | 4:06 am
      I found the documentation for this in the encapsulation section. I think I want to make it as dynamic as possible. I don't want to have to add fixed attributes or variables to each individual bpatcher element as the whole point is that it be reusable in any number of instances. Still a little hazy on this, but will try to figure it out - thanks.
    • Feb 02 2011 | 5:24 am
      Ha! I think I figured out the problem and it's not directly related to the buffer~. It's the send and receive objects conflicting with my hierarchy.
      My original patch has a number of send and receive objects in it. So when it is multiplied within the bpatcher ALL of the send and receives are responding to the same messages rather to the individual subpatchers.
      The subpatcher has like 30 send and receive objects. Is there a way to make them respond only to their level without completely reassigning objects?
    • Feb 02 2011 | 8:25 am
      Prefix all your send and receive names with #0 for example #0_my_name. The #0 will be replaced with a unique number per instance.
    • Feb 02 2011 | 12:16 pm
      Oh, so it works with those objects too? Wow, what a trick this #0 thing. It should be documented somewhere. Maybe it is and i just didn't see it.
      Thanks all!
    • Feb 02 2011 | 6:05 pm
      I'm sure that it's it the doc, but I couldn't find it with a couple searches. Looking for stuff like this was much easier when the doc was a .pdf file.
    • Feb 04 2011 | 11:53 am
      One problem I'm having now. It seems that the random number generated changes between a patcher and poly~. So I cannot get the send objects in the parent patcher to communicate with the receive objects in the poly~ as their numbers are different.
    • Feb 04 2011 | 7:10 pm
      It's unique for each patch, and poly~ makes new patches. You'll have to pass in #0 into poly~