a pattrstorage that manages pattrstorages
dear community,
i'm having a struggle with the pattrstorage object and i can't find decent (enough) documentation on it.
i have a parent patcher with 12 bpatchers inside.
each bpatcher has its own pattrstorage, managing some numboxes, sliders etc
each of these bpatcher-pattrstorages has 10 presets for these (his own) objects
is there a way to manage the presets of the (bpatcher) pattrstorages from the parent pattrstorage? like: changing the (10) presets of the bpatchers from the parent pattrstorage – basically recalling a new set of presets for them?
any help would be greatly appreciated!
Yes! This is how pattrstorage is designed. The top-level pattrstorage (not in greedy mode) will see the child pattrstorage objects. You can set the values of those pattrstorages (the presets) from the master. What isn't working for you?
Jeremy
thanks as always, jeremy!
i think i still don't really get pattrstorage :) for my current understanding:
if i *recall 1* from the parent's pattrstorage, all bpatcher pattrstorages recall (the settings of) their first preset.
i how ever would like to find a way to store e.g. 10 different presets of a bpatcher pattrstorage to one preset of a parent pattrstorage. so:
> i *recall 1* at parent level – a set of 10 presets if recalled for the bpatchers.
> i *recall 2* at parent leven – a set of 10 other presets is recalled for the bpatchers
is anything as such possible? a simple transfer:
parent pattrstorage manages my "songs" – bpatcher pattrstorages manage my parts in each song. i want to recall a new "song" and therefore the 10 according "parts" of this song :)
thanks again
Maybe it's easier to show than to tell. See attached project. The master stores the "preset of presets", the children store their own presets. You can change the state of the children all at once (by recalling a preset in the master), or individually (by recalling a preset for a named child). Hope this helps...
Jeremy
EDIT: sorry the website doesn't allow us to upload Max documents at the moment... here's a dropbox link.
awww! you're incredible! thanks you so much :)
dude... Maxzip?!
.maxzip files are created when you make a snapshot of a project. They're just zip files, of course, but since you want them associated with Max, well... .maxzip!
Jeremy
yeah, I'm just stunned at how cool it is. I love a simple solution that's "just" something yet still killer.
Bumping this for a further strategy question:
say I have 4-5 areas of my patch, and I want to be able to save and recall presets for these areas separately or at times collectively, would placing these areas in their own bpatcher with their own pattrstorage be the way to go? Even if that means having nested bpatchers?
Thanks for any input - trying to clear up some of my max "blind spots" for my current performance patch.
That's how I would do it. Nested bpatchers are nothing to be afraid of. :-)
Jeremy
Cool. Thanks again, Jeremy. Your help is making a huge difference for me.
Hi! it is the exact problema i am fighting to, but the dropbox link is down!!!!!!
could you please post it again or explain how the patch was made??
@jeremy could you please re-upload the file? Would be really useful!
Thanks
I'll look for it or come up with something new (or maybe someone who downloaded the old file can repost it??)
Sorry to resurrect an old thread - but this helped me a tonne. So many thanks.
I have one further question though. What if I needed to add one more nest of bpatchers? I can't seem to get my head around arguments to make it work.
I'll try explain a little better. In top.maxpat your bpatchers save their pattrstorage into the associated json file using the argument. But what if I wanted say three complete copies of your top.maxpat - so there's 3 x the data to store.
I was thinking something along the lines of ending up with "ThemeOne_LayerOne.json" "ThemeOne_LayerTwo.json" all the way to "ThemeThree_LayerTen.json"
However, try as I might, I can't seem to make this work. Can you suggest another way?
(My actual use case needs 6 different "themes" with 10 layers of preset data. So 60 sets - and doing it in a modular way just seems the most practical way of doing it - but its got me completely stumped.)
Many thanks. B.
that's great, I'm looking for an inverse solution so:
collecting all the presets for several bpatchers in one single json/pattrstorage
but being able to send different presets to each bpatchers, so like
Bpatcher 1 grabs data from preset 13
Bpatcher 2 grabs data from preset 47
Bpatcher 3 grabs data from preset 5
Bpatcher 4 grabs data from preset 7
is that possible or dealing with dicts is mandatory?
thanks!