multiple different preset objects on the UI using pattrstorage @subscribemode 1

    Feb 01 2014 | 3:18 am
    Good Evening to all Max Magicians.
    I am building a M4L patch that allows me to store different LED colors for the individual buttons on a Livid controller, on the 4 different banks it has. Hence I am looking to store presets for four different banks of the controller.
    The current problem is linked with the subscribemode of the [pattrstorage] objects and its related [preset] objects. I have combed through threads here already.
    I have come round to use 4 identical bpatchers for the 4 banks, with 81 identical bpatchers hosting all 81 buttons — so every button (with its MIDI assignment) can store its 3 LED settings using 3 different [pattr] objects. We're basically talking about 1 bpatcher with its 81 bpatchers inside x 4. The bank bpatcher has no [autopattr] or [pattrstorage] objects, it just contains the button patchers.
    One [pattrstorage] object is able to access all the LED settings in the child patchers as well as several other [pattr] objects in the main UI — if it is set to '@subscribemode 0'. Logically, setting all [pattrstorage] objects to @subscribemode 1, removes all clients from their subscriptionlists for them to be manually subscribed to individual [pattrstorage] objects — if there is no other pattrstorage in the patch with automatic subscription.. This however, fails — the client windows remain vacant.
    I have sent
    1. msg: 'send pattrstorage subscribemode 0' —> [universal] (no pattrstorage in bpatchers) 2. msg: 'send pattrstorage subscribemode 1' —> [universal] 3. msg: 'subscribe [bpatcher 1 scripting name]' —> [pattrstorage 1] (it has worked before) 4. msg: 'subscribe [bpatcher 2 scripting name]' —> [pattrstorage 2] etc.
    the client windows are empty though, and printing all subscription lists reveals the [pattrstorage] objects are apparently linked to the desired clients. Other [pattrstorage] objects keep their clients, !! but their presets won't save !! ('Save Preset in Patcher' is of course ticked).
    Perhaps things have got too messy with adding, removing, changing pattrstorages and presets when testing the best methods (I came up with the weirdest work arounds in the meantime)… Ableton and Max have both crashed and broken patches during saving ever so often, it's unbearable.
    —> is there a way to clean up the entire pattrstorage assignments? (I have sent 'purge' to all relevant objects individually, no change)
    What's more, whenever I save the patch I am prompted to open… something — but I don't know what to open nor why to open it. This is all really bizarre, and I need my presets to work before I can do anything with the buttons!
    Sorry for this mega text, I hope someone actually read it and is able to help.
    Best & thanks everyone! S

    • Sep 23 2014 | 11:16 am
      Hi, I was having the same problem with the subscribemode of pattrstorage trying to keep two different sets of independent presets in the same patch using two pattrstorage objects. I was wondering why sending the message "subscribemode 1" plus "subscribe " didn't seem to work. After doing some trial and error tests I discovered the key: you need to drop an "autopattr" object to the same patch; it will allow the subscribemode to work properly in every pattrstorage objects. Whenever you send to them "subscribemode 1" after having dropped an autopattr, all client objects of every pattrstorage will be removed, and now you can add them by means of the subscribe message. I hope this help to everyone having the same problem. Now it's possible to keep several set of presets in the same patch, which is really useful for some situations. Cheers, Alberto
    • Sep 23 2014 | 1:33 pm
      Hey Shogun,
      Theres a new remote script on the way that makes Max4Live integration even easier ;-)
      I avoid pattrstorage wherever possible as i've had a lot of issues with recalling states and crashes, i'm not sure what it is i've done so i simply store the previous lighting states in messages and fire these when switching between banks, it's pretty instant!
      Cheers D