help! – multiple identical bpatchers, not saving different state in parent patch
I am having some trouble doing what must be a common operation. I have a re-usable control that I am using multiple times in a parent patch, by including multiple bpatchers that point at the control’s saved patch. I’d like it if the current settings of each of the controls could be saved and recalled with the parent patch. Instead, when I load the parent patch, each of the bpatchers using the control, are reset to the values stored in the control’s patch — in other words, they all get set to the same original (template) values, instead of the values that were on the control instances the last time the parent patch was saved.
I feel like I have tried just about everything to make this happen, and must be missing something fundamental.
Could anyone describe or send a basic example of the right way to do this?
I am using Max 5.14 on MacOs 10.6.4.
YOU WILL ROCK MY WORLD if you can help this newby (me) get this working!!!
one question: how do you store your recent setting for objects in the main patcher?
what works for objects should work for subpatchers and bpatchers, too.
You need to look into pattr attributes and pattrstorage. Typically this is done by putting an autopattr object in your subpatch and then placing a pattrstorage object in the parent patch.
bpatchers will always revert back to the original, template settings. When you load the main patch it loads the bpatcher instances from the master bpatcher file, so there’s no way it can remember what you changed last time. If you put a preset into the master bpatcher, you can store some presets, but each bpatcher will still have the same default settings (and stored presets). However, you could have a write/read command for your preset, then if you save them as separate preset files, you can load them into each instance. So each bpatcher would have its own unique bank of presets. But just saving presets while the main patch is running won’t change the presets in the bpatcher master.
For the most options you’ll want pattrstorage @greedy 1, and an autopattr in the bpatcher master file. Then you can store different slots for each and they’ll be reloaded when you re-open the main file.
Thanks everyone… I’ve tried to do everything each of you said, and I still can’t get it to work. I’ve attached a simple test case.
In particular, what I want is to be able to open the parent_patch, change the two values, click the save button in the patch (if I must), then save the parent patch from Max menu ‘File->Save.’ Then, when I reopen the parent_patch, I’d like the last values that I saved to appear, rather than the initial values from the test_control.
Can anyone spot what I’m doing wrong?
You’re trying to load preset one before the settings file is done reading. Here’s your top level patch with a possible solution.
----------begin_max5_patcher---------- 1526.3oc0Zs0biZCE9YmeELNy9Vpit.BX6S6ztSmNS611Io8kLY7fsUbzN1f GPdSZ2Y+uWIc.arsHljBxtODHHvnuymN2Ee8hACmj8LuXn268tyavfudwfAl gzCLn75ACWl77zEIElGa3z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CRd4jqvvNaTXJS9Mfv5KMlFnmU47UJW8MsKX9nSpVCNv GTWLm.NxMFR+fBiIhTd96u9OK34EWOcxxq+0jmC9cSzxhq0ICqFExLVA40E7 wR0XWWKY4WpZBJ8rfY8oPCVc3V3z+TKtGnVyN1q.tTjkVOPHzrxHHKrCSP80 6BHFxnCcLWjVvUO4a3obgzVGNHwm1B+.BiAYvAsPzUavRUdr1piRlWtEtd6+ T04NxosvJHBLKBZ2Ltk0On27Hk9l9v9MFXiA4nOWrsXYcAGyFqDX0LOVSMBU wzv2QyfMjtFg4JYUxyGySSlrfWKm+Aka4a8EdseKca+hTPOjTA4AUacd8zNh nZoTWBIUmQbLa6SalTQpPtLaFLilaXzQ9+iutygdRQf8pggP8PyW1qL7crBE KWs.3qwk7U0ikjOu7q0ZKTdge1H0bplHaFpubEo112WvsjIvPbXY8QMvHn9m QtCeemSJ3WOo.eP.f9RrQcghaCqXdByWB2de8clIQO9tTUQ157oU5zUeARda mnYJATjtIb4caqBu1C8nX1LdZcQZoX1pLQpbC+Ycgq0XJrEXRGhvkXhc9gIc I8d3ifIclztDSmgqcgsYsSmVrqwzwV61iL6aLoKm8basaO0W6XZOf22XhDeF xS31foX2xSsYsi3V6NRq7OEsiwYuiIbK7EPbaL38ltF7YddBI2sx0FEb5YHj vNERswcI1stvMSG4XlbgtGSG0M.08X5nkG33vJryOL0lnJ6kFZuSSj1DoywY N0F0IriW5h5gr4HAg5M8MD5fHA91L18JF7ALSBX5mzb0NRh5hucw+Bzoyl2I -----------end_max5_patcher-----------
THANK YOU EVERYONE!!! Chris, that was the lurking error! Everyone else, thanks for getting me to where I needed to get!
YOU ALL ROCK!