bpatcher inside of bpatcher recall issue with pattrstorage
hello friends -
i have an issue i'd like perspective on. i've attached example patches. the unzipped folder must be in your max search path for this to work.
(1.) open the patch "top level patch" inside of the "pattrstorage_recall_issue" folder.
you will see a bpatcher containing a patch that functions somewhat like an insert in a DAW. it loads with an empty "insert" patch as default. click on "empty insert" to open the patch.
(2.) the top level patch preset UI is controlling the pattrstorage. in slot 2 of the UI i have saved a preset. the desired function of this preset is to (1.) load a new insert into the insert slot and (2.) restore the values to the UI objects inside of that insert.
(3.) when you click the preset slot 2 for recall, the correct insert loads (click on the insert slot to see the UI objects), but the UI values are not restored.
(4.) click on the preset slot 2 again, and the UI values are restored as intended.
(5.) click on preset slot 1 to re-load the empty insert again.
(6.) click on preset slot 2 to reload the patch with UI.... the correct values appear...
if you close the top level patch and repeat this process, you'll get the same issue.
my current work around is to connect the "preset number when recalled" outlet of the preset UI to the pattrstorage inlet, so that it basically loads each preset twice, immediately. not super elegant, but seems to work fine in context of using this system with larger patches / inserts etc. (particularly because changemode 1 is on, i think ....)
please let me know of any ideas you have.
thx
Ideas anyone?
On my phone so I haven’t looked at the patch. I would suspect you might need to use other direct messages to pattrstorage for your storage and recall. With the “preset” object linked to pattrstorage, you don’t get control over what order things are recalled in.
for example if you recall something that instantiated a different bpatcher after the values for said bpatcher were recalled by pattrstorage, you’re out of luck. That would be my guess about what’s happening.
pattrstorage has lots of more precise messages you can use for this kind of thing (getstoredvalue I think is what you might need).
ah yes, i was worried it was an issue using preset as UI...
ill look into doing it all pattrstorage thx!
I haven't glanced at the patch because I was on my phone. You might need to utilise additional direct messages to pattrstorage for your storage and recall, in my opinion. You have no control over the sequence in which items are recalled when using the "preset" object linked to pattrstorage.
You're out of luck, for instance, if you try to recall something that used a different bpatcher after pattrstorage has already recalled its values for that bpatcher. That would be my best estimate as to what is taking place.