#0 in main patcher?


    Jun 03 2010 | 2:39 am
    Hi,
    Is it possible to run multiple instances of the same patcher, using a #0 prefix for send and receive objects? I know I could save the patcher as an abstraction, and instanciate it several times inside a parent patcher. But I'd rather avoid this solution.
    Anyone knows a trick?
    Thanks!

    • Jun 03 2010 | 3:00 am
      The [patcherargs] object works with subpatchers, so you can give them arguments.
    • Jun 03 2010 | 6:11 am
      Hi Chris, thank you for your answer. Although I'm not sure it's solving this problem. Maybe my lessage was confusing.
      I'm looking for a way to prefix the send and receive objects in a patcher with an id that is unique to this instantiation of the patcher. For exemple, if you run two instances of the attached patch, I would like the send receives in the two instances not to interfer, by replacing the #0 with a specific unique ID. I know this works if they were instantiated as abstractions in a parent patcher, but I don't know how to do this on two instances of the same patcher.
      Thanks
    • Jun 03 2010 | 6:52 am
      So you want to open multiple copies of a top level patch? I guess you'd have to generate your own unique symbols.
    • Jun 03 2010 | 7:27 am
      Yes, that's exactly the idea (but I'm not sure the urn object is consistently providing a unique ID through multiple instances of a patch). I'm looking for a solution with not as much code overhead. Something like the #0 mecanism would be just perfect. I don't really understand why it's not implemented for a top-level patch.
      Cheers!
    • Jun 03 2010 | 7:47 am
      Yeah, you're probably right about urn. I wouldn't worry about the code overhead much though. This just gets executed at load time. How about just incrementing a number and stashing it in [value]
    • Jun 03 2010 | 7:51 am
      Or better yet, save this as an abstraction, and put it in your top level patch:
    • Jun 03 2010 | 7:56 am
      How about using the ticks output of date to create a unique number based on the time each patcher is launched? cheers Roger
    • Jun 03 2010 | 6:32 pm
      Maybe I'm missing the point, but...
      You can use a #0-prefix for send/receive in any patch, no matter if it's an abstraction or a top-level patched, opened multiple times.
      I don't see the problem.
    • Jun 03 2010 | 7:01 pm
      Mudang - I bet you didn't try it. It doesn't seem to get substituted in a top-level patch.
    • Jun 03 2010 | 7:11 pm
      whooops. I've tried by opening a new patcher window and copy/paste. I never was of aware of this "feature".. hm...
    • Jun 03 2010 | 10:14 pm
      you get an #0 argument in a top leve patcher by calling a subpatcher which contains the #0.
    • Jun 03 2010 | 10:41 pm
      Hi Roman,
      Maybe I'm missing the point, but your proposition seems pretty similar to Chris's last posted patch. Were you thinking about something different?
    • Jun 03 2010 | 10:57 pm
      The [groupid] object in the Jasch bundle might be useful for generating unique names using the [forward] object and "set" message to [receive].
      lh