Storing Values for use with MAX Runtime

Aug 2, 2007 at 3:13am

Storing Values for use with MAX Runtime

Hello good people,
Just made a nice patch that id like to have available free from my website. In the patch, I used a table to store ( number ) values for a session, then Loadbang them back to he proper places in the patch.
Great!
but after i made the path into a collective, it no longer is able to save the values for the current sesion and then loadbang them the next time the patch is opened – using MAX Runtime.
Im guessing this is due to the fact that nothing can be modified in a patch using the Runtime.
next I tried the Preset Object – same thing, no luck with the runtime.
Anyone have any suggestions on how to save simple intergers in Numberboxes with a patch so the next time a user opens it up, the most recent values xill be loaded up with the patch?
Thanks,
Mike

- oh yeah did a searchof the forum, checked through all MAX tutorials and documentation

#33123
Aug 2, 2007 at 3:44am

pattrstorage?
coll w/ some ui to save & read a file from disk?

-C

At 9:13 PM -0600 8/1/07, mHatsys wrote:
>Hello good people,
> Just made a nice patch that id like to have available free from my website. In the patch, I used a table to store ( number ) values for a session, then Loadbang them back to he proper places in the patch.
>Great!
>but after i made the path into a collective, it no longer is able to save the values for the current sesion and then loadbang them the next time the patch is opened – using MAX Runtime.
> Im guessing this is due to the fact that nothing can be modified in a patch using the Runtime.
>next I tried the Preset Object – same thing, no luck with the runtime.
> Anyone have any suggestions on how to save simple intergers in Numberboxes with a patch so the next time a user opens it up, the most recent values xill be loaded up with the patch?
>Thanks,
>Mike
>
>- oh yeah did a searchof the forum, checked through all MAX tutorials and documentation


Chris Muir | “There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue.” – Brian Eno

#109832
Aug 2, 2007 at 4:36am

Thanks for the reply. I was just looking for something simple, that would take little to no effort for the user to do. The way i had my patch work is it would just store the most recent values in a table, then the next time the user opened up the patch, those values would get loadbanged into a specific number box. So it just automatically saved the last user chosen values – without any interaction from the user. then i tried the same with a preset object. I just have a hunch once people see XML file, there gonna get scared? Then forget where they saved it
So theres no real way to have values stored in a subpatch or something? some storage area thats part of the patch file?
Guess il look into the coll object…
Thanks again!!
Michael

#109833
Aug 2, 2007 at 6:52am

OK, so i can just make a .plist or .ini file with the xml… that works…

#109834
Aug 3, 2007 at 7:44pm

Yu can also set your pattrstorage to automatically save the last
state into slot 1 with a [closebang], & hide the file inside your
collective — that’s how I do it.

M

On Aug 2, 2007, at 2:52, mHatsys wrote:

>
> OK, so i can just make a .plist or .ini file with the xml. that
> works…

#109835
Feb 1, 2012 at 3:25pm

how can you hide the pattrstorage file inside the collective ?

thanks !!
Frank

#109836
Feb 2, 2012 at 1:32am

I don’t think you can “hide” it, only “include” it when you build the collective. You can, however, save the contents of a [coll] with a patcher, which will bury it in the .mxf, though you can still find it using a text editor.

If you want to use [preset] in a collective and have the values persist to the next session, you can’t simply use the saved-in-patch [preset], because each time you open the standalone, [preset] will have the values it had when you made the collective (whatever was last saved with full Max). You need to write the values to a .maxpresets file and then read them back in when you re-load. So, you can do something similar with [pattrstorage].

#109837

You must be logged in to reply to this topic.