pattr autorestore bpatcher


    Oct 19 2020 | 9:18 am
    Hey folks,
    I've been trying to get values of number objects saved in a bpatcher. I have a bunch of number objects which are in a bpatcher. I would like to autosave the values of these number boxes and restore them when the patcher is reloaded to whatever state they were in when the patcher was closed. I can't figure out why the "autorestore" feature of the pattr-object does not work when used in a bpatcher? If that's really no option are there any other simple and effective ways to autosave 12 numbers and recall them automatically? I tried using pattrstorage which made me want to throw my laptop out of the window...

    • Oct 19 2020 | 12:31 pm
      You'll need to provide a patcher/bpatcher pair which illustrates the problem you're describing to know for sure.
      But in general, bpatcher loads an external file. And the pattr/autopattr autorestore feature saves values inside of that file. When the file is reloaded by a parent patcher, no matter what you've done in that parent patcher, the values which you saved in the external file will be restored. That's why you need an object like pattrstorage, which can manage values for the entire patcher hierarchy.
      The alternative would be to use parameters & snapshots, which will kind of do the same thing as pattr & pattrstorage in a more general, but less flexible way.