Forums > MaxMSP

best way to save presets ?

December 27, 2006 | 9:28 pm

I would like to know how people save their preset parameters for effects. For example, I have a granular synth patch, and I need to use different parameters for different cues in a piece. I also would like to copy the preset to some other pieces without problem.

The preset object in Max/MSP lose all the stored info if it is copied and pasted to another patch if I do not save all the info in a text file.

Are there other convieniet or better ways to save and load presets of different parameters ?

Thanks.


December 27, 2006 | 9:52 pm

pattr, pattrstorage.

On Dec 27, 2006, at 4:28 PM, Cheng Chien-Wen wrote:

>
> I would like to know how people save their preset parameters for
> effects. For example, I have a granular synth patch, and I need to
> use different parameters for different cues in a piece. I also
> would like to copy the preset to some of my piece without problem.
>
> The preset object in Max/MSP lose all the stored info if it is
> copied and pasted to another patch if I do not save all the info in
> a text file.
>
> Are there other convieniet or better ways to save and load presets
> of different parameters ?
>
> Thanks.

v a d e //

http://www.vade.info
abstrakt.vade.info


December 27, 2006 | 11:36 pm

Coll.

b

Cheng Chien-Wen wrote:
> I would like to know how people save their preset parameters for effects. For example, I have a granular synth patch, and I need to use different parameters for different cues in a piece. I also would like to copy the preset to some of my piece without problem.
>
> The preset object in Max/MSP lose all the stored info if it is copied and pasted to another patch if I do not save all the info in a text file.
>
> Are there other convieniet or better ways to save and load presets of different parameters ?
>
> Thanks.
>


barry threw :: sound | (if you would see the stars clearly,
http://www.barrythrew.com | look hard at the surrounding darkness)
bthrew(at)gmail(dot)com | -Ooka Makoto
857-544-3967 |


December 29, 2006 | 7:48 pm

Definitely use coll or pattr. I usually use coll and can then use the preset object (as a selector only) to pick which coll I’m storing/accessing/clearing. With some fiddling you can have a huge number of presets to select from, and upon choosing between them (like when you unpack a list of parameter values) you can run them through a line object for glide/portamento/interpolation. Of course, pattr gives you even more options for interpolation.

Note that colls inside bpatchers (i.e., naming them #1coll_foo etc.) will NOT be saved. They need to be in a bona fide patch, not an instance. (If anyone has info on this I’d like to hear it, I had thought they would be saved if they were given unique names….) To save these individual instance colls you need to send them out to the parent patch and prepend an index number to them, then store them in a "supercoll" which is a coll of your colls.

I only use preset for development and testing stuff, and in any final project, only for boolean settings like a string of gates (where interpolation won’t matter). There, they can be easy and helpful.

–CJ


December 30, 2006 | 11:50 am

I’ve been doing it using preset objects. It works fine for me but maybe that’s because the only settings I need to save are from user interface objects like dials and rsliders.
Because it was all happening inside a poly~ in which every voice had different settings and a unique preset file and I wanted to be able to add more voices conveniently I saved the settings from one normal-ish voice and then used that as a default for any voice that found itself without a preset file to load.
This is the bit that does it. It will only work inside a poly~ and it is set up to only save and load preset 1.

max v2;
#N vpatcher 42 114 642 514;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 336 121 43 196617 store 1;
#P message 360 173 14 196617 1;
#P newex 381 146 48 196617 loadbang;
#N vpatcher 241 115 841 515;
#P outlet 60 239 15 0;
#P inlet 60 37 15 0;
#P button 114 157 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 60 216 90 196617 sprintf read 1 %s;
#P message 60 184 162 196617 /path/to/presets/default_preset;
#P message 240 187 138 196617 /path/to/presets/preset_0;
#P newex 240 112 62 196617 prepend set;
#P newex 60 134 64 196617 sel notfound;
#P newex 60 112 66 196617 absolutepath;
#P newex 60 82 182 196617 sprintf /path/to/presets/preset_%ld;
#P newex 60 60 52 196617 thispoly~;
#P window linecount 4;
#P comment 132 106 100 196617 If there is a preset file for this voice load it , if there isn’t load default_preset;
#P connect 10 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 7 0;
#P fasten 6 0 8 0 245 208 65 208;
#P connect 7 0 8 0;
#P connect 8 0 11 0;
#P connect 4 1 9 0;
#P fasten 2 0 5 0 65 104 245 104;
#P connect 5 0 6 0;
#P fasten 9 0 6 0 119 177 245 177;
#P pop;
#P newobj 381 173 67 196617 p get_preset;
#P newex 60 120 219 196617 sprintf write 1 /path/to/presets/preset_%ld;
#P button 60 60 15 0;
#P newex 60 98 52 196617 thispoly~;
#N vpreset 1;
#P preset 336 200 47 27;
#P window linecount 2;
#P comment 84 60 139 196617 Click here to save the preset to disk;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P fasten 3 0 8 0 65 90 341 90;
#P connect 8 0 1 0;
#P fasten 7 0 1 0 365 191 341 191;
#P fasten 5 0 1 0 386 195 341 195;
#P fasten 4 0 1 0 65 145 341 145;
#P fasten 6 0 7 0 386 169 365 169;
#P connect 6 0 5 0;
#P pop;


January 1, 2007 | 7:40 am

Thank you very much for sharing ideas.


Viewing 6 posts - 1 through 6 (of 6 total)