Forums > MaxMSP

how to create unique scripting names, inside multiple bpatchers

September 11, 2012 | 3:11 am

I made 8 GUI’s using bpatchers, to control the different voices of a drum machine. The problem is when I try to save (in the main patch) with pattrstorage, the scripting names in each bpatcher are exactly the same. I thought I could solve this using args, for example "#1fader" as a scripting name, but that doesn’t work. Any other ideas greatly appreciated.


September 11, 2012 | 7:32 am

#0

Attachments:
  1. bpatcher.zip

September 11, 2012 | 8:17 am

I don’t have this problem with identical bpatchers (12 of them) and autopattr inside each


September 11, 2012 | 8:49 am

Thank tobiasros! The #0 works great. I changed my scripting names like your example, to "#0slider", and unique numbers appeared before each name in the pattrstorage. Should be a big time saver.

Ploki, sorry for the vague question, but basically I need each bpatcher to store different values. Since one bpatcher will be for the kick drum, one for the snare drum…etc


September 11, 2012 | 9:18 am

One problem though… because unique numbers are generated each time the patch is opened, pattrstorage won’t save correctly.


September 11, 2012 | 9:55 am

yeah, then you don’t can use #0;

but have a look here: just give the bpatcher different scripting names…


September 11, 2012 | 10:39 pm

You are right, and so was Ploki. I think I misdiagnosed the problem, my bad. Instead the issue was with setting the args in the inspector, which I assumed could be used to send poly~ a message like "target #1, $1 $2". When I moved the target message outside the bpatcher, it worked fine. And maybe that target message with the args could still work, but this method works for now.

Even though I posted the wrong question, you guys still helped me figure it out, which is super cool…thanks again.


Viewing 7 posts - 1 through 7 (of 7 total)