Request for advice on storing state

    Nov 30 2009 | 3:19 am
    Hi all,
    I'm working on a fairly complex patch which is used as a SysEx editor for an external MIDI device. The number of parameters it has to manage is in the hundreds.
    There is a requirement to sync from the external device. I have built a mechanism which sends a dump request, and in response I get about 1500 bytes of closely packed information which represents the state of the edit buffer in the external device.
    I have built a state machine in Javascript which parsing the incoming data stream extracting the parameters (they are of varying length and type) and placing the results into a coll object.
    My coll object stores the name (which the Javascript state engine provides for each parameter) and the value of each parameter, along with its type of course.
    So far so good.
    Now what I want to do is to take the output of a dump from the coll object and use all the parameters in that list (several hundred) to initialize the controls on my max patch with the right values.
    My proposed solution is to use pattr as my distribution mechanism.
    Does this approach seem reasonable, or is there a better tried and tested method for doing this kind of thing? My lack of experience with Max (less than 3 weeks) is something that could end up costing me a lot of wasted time if I find somewhere down the line I started in the wrong direction.