Save patcher state upon saving Live set

    Jun 20 2010 | 7:08 pm
    I built a little M4L MIDI device and want to add the following behaviour: If I save the Live set then all instances of the M4L device should save their state (number boxes, toggles, etc.) as they would do in plain Max/MSP using [autopattr @autoname 1] and upon opening the Live set the state should be restored. What would be the best/easiest way to achieve this?

    • Jun 21 2010 | 12:15 am
      All live.* objects are saved and restored automatically with the Live set.
      (provided that 'Parameter Visibility' is not 'Hidden')
      Other objects must be connected to [pattr] with 'Parameter Mode' enabled.
    • Jun 21 2010 | 9:48 am
      Just wanted to mention that [pattr] in subpatchers is currently NOT working.
      It's supposed to be fixed with the next update.
    • Jun 21 2010 | 2:49 pm
      Thanks, broc. Using pattr with 'Parameter Mode' works as aspected. But it is very tedious to use even with a moderate number of control elements. Isn't there some way to at least partly automate the process like with autopattr? Or is there perhaps some addition planned in a future update to allow autopattr or something similar to work as expected in M4L? Perhaps there is even a way to write an external that does this? I have no problems with writing some C code.
    • Jun 21 2010 | 3:17 pm
      the reason for using individual pattrs is so that the bound objects can be exposed to the LIVE automation system.
      using 'autopattr' still works fine - it just does not expose its clients to the live system. you can use autopattr to talk to a pattrstorage and then save a recall state of that with the set. be careful with the clientlist of pattrstorage of course. i know 'cos i've done it, using the andrew pask (panukul) method posted here:
      personally though i find it usually much more worth the effort to use lots of pattrs - the above method was just a specific circumstance of mine. (bring on max 5.1.5 !)