Forums > MaxMSP

saving settings

February 26, 2008 | 12:58 am

alright gang this code is really starting to annoy me now im sure theres some magical object that can make it work perfectly. im trying to write in settings with the big multi slider into the little ones. and when the bang is sent back round to 1 the setting are recalled. so 3 effects can be shown just using one multi slider. if someone can give me a hand it would really help me out.

max v2;
#N vpatcher -746 369 -146 769;
#P origin -3 16;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 445 331 91 196617 saved settings;
#P window linecount 2;
#P comment 381 49 91 196617 change to save setting;
#P window linecount 3;
#P comment 246 267 97 196617 needs to be turned off before next setting can be saved;
#P window linecount 1;
#P newex 275 204 49 196617 delay 15;
#P button 74 239 15 0;
#P button 205 241 15 0;
#P button 136 244 15 0;
#P user gswitch 294 232 41 32 0 0;
#P user gswitch 342 232 41 32 1 0;
#P newex 171 196 43 196617 delay 6;
#P newex 171 216 49 196617 delay 10;
#P newex 172 175 43 196617 delay 5;
#P newex 105 196 43 196617 delay 6;
#P newex 105 220 49 196617 delay 10;
#P newex 105 174 43 196617 delay 5;
#P newex 38 195 43 196617 delay 6;
#P newex 38 217 49 196617 delay 10;
#P newex 38 175 43 196617 delay 5;
#P user multiSlider 149 309 291 18 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P toggle 171 239 15 0;
#P newex 171 258 29 196617 gate;
#P newex 172 147 32 196617 sel 3;
#P user multiSlider 149 328 291 21 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P toggle 105 241 15 0;
#P newex 105 264 29 196617 gate;
#P user gswitch 391 231 41 32 1 0;
#P user multiSlider 149 350 291 17 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P toggle 38 236 15 0;
#P newex 38 257 29 196617 gate;
#P newex 105 150 32 196617 sel 2;
#P newex 38 149 32 196617 sel 1;
#P number 38 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 1 3;
#X flags 0 0;
#P newobj 37 103 66 196617 counter 1 3;
#P button 47 65 15 0;
#P user multiSlider 78 27 301 56 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window linecount 2;
#P comment 436 238 91 196617 need to be changed manually;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 18 0;
#P connect 5 0 20 0;
#P connect 5 0 19 0;
#P connect 18 0 8 0;
#P connect 19 0 8 0;
#P connect 8 0 7 0;
#P connect 9 0 7 1;
#P connect 20 0 31 0;
#P connect 11 0 1 0;
#P connect 15 0 1 0;
#P fasten 7 0 1 0 43 280 83 280;
#P fasten 4 0 6 0 43 145 110 145;
#P connect 6 0 21 0;
#P connect 6 0 23 0;
#P connect 6 0 22 0;
#P connect 21 0 12 0;
#P connect 22 0 12 0;
#P connect 12 0 11 0;
#P connect 13 0 11 1;
#P connect 23 0 29 0;
#P connect 30 0 17 0;
#P connect 26 0 17 0;
#P connect 29 0 13 0;
#P connect 23 0 13 0;
#P connect 28 0 9 0;
#P connect 31 0 9 0;
#P connect 14 0 26 0;
#P connect 14 0 25 0;
#P connect 24 0 16 0;
#P connect 25 0 16 0;
#P connect 16 0 15 0;
#P fasten 4 0 14 0 43 145 177 145;
#P connect 14 0 24 0;
#P connect 17 0 15 1;
#P connect 26 0 30 0;
#P connect 5 0 32 0;
#P connect 32 0 28 0;
#P connect 1 0 28 1;
#P connect 1 0 27 1;
#P connect 1 0 10 1;
#P pop;


February 26, 2008 | 9:53 am

If you don’t mind not being able to view the different presets at the same time, i would use [pattrstorage] to do this.

But maybe it’s even easier to use the [preset] object, it supports multislider as well and it’s very easy to set up.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 63 80 14 196617 2;
#P message 62 57 14 196617 1;
#N vpreset 4;
#X append 1 2 0 84 212 multiSlider list 20 29 48 57 75 93 104 118 122 127 127 127 127 127 127 127 ;;
#X append 2 2 0 84 212 multiSlider list 98 86 77 73 66 61 59 57 57 54 52 52 48 43 41 39 ;;
#P preset 13 131 79 28;
#P message 8 80 43 196617 store 2;
#P message 8 57 43 196617 store 1;
#P user multiSlider 212 84 301 56 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P connect 4 0 3 0;
#P connect 5 0 3 0;
#P connect 1 0 3 0;
#P connect 2 0 3 0;
#P window clipboard copycount 6;


February 26, 2008 | 12:09 pm

yeah i tried using preset in a similar way but i can get it to write in the setting with the multi slider then go onto the second setting with out effecting the other two…

max v2;
#N vpatcher 10 59 662 595;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 125 208 14 196617 0;
#P message 85 207 14 196617 0;
#P message 46 206 14 196617 0;
#P newex 357 204 49 196617 delay 10;
#P newex 269 204 49 196617 delay 10;
#P newex 211 204 49 196617 delay 10;
#P number 64 125 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 1 3;
#X flags 0 0;
#P newobj 64 102 66 196617 counter 1 3;
#P button 64 81 15 0;
#P toggle 357 224 15 0;
#P newex 357 245 37 196617 metro;
#P toggle 272 224 15 0;
#P newex 273 248 37 196617 metro;
#P toggle 211 228 15 0;
#P newex 212 249 37 196617 metro;
#P newex 103 183 32 196617 sel 3;
#P newex 63 184 32 196617 sel 2;
#P newex 24 185 32 196617 sel 1;
#P message 104 207 14 196617 3;
#P message 357 269 43 196617 store 3;
#P message 63 207 14 196617 2;
#P message 24 206 14 196617 1;
#N vpreset 4;
#X append 1 2 0 103 162 multiSlider list 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;;
#X append 2 2 0 103 162 multiSlider list 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 ;;
#X append 3 2 0 103 162 multiSlider list 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 ;;
#P preset 107 419 79 28;
#P message 274 270 43 196617 store 2;
#P message 212 276 43 196617 store 1;
#P user multiSlider 162 103 301 56 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P connect 19 0 8 0;
#P connect 8 0 4 0;
#P connect 8 1 23 0;
#P connect 19 0 9 0;
#P connect 9 0 5 0;
#P connect 17 0 18 0;
#P connect 3 2 19 0;
#P connect 18 0 19 0;
#P connect 9 1 24 0;
#P connect 19 0 10 0;
#P connect 10 0 7 0;
#P connect 4 0 3 0;
#P connect 6 0 3 0;
#P connect 2 0 3 0;
#P connect 1 0 3 0;
#P connect 5 0 3 0;
#P connect 7 0 3 0;
#P connect 10 1 25 0;
#P connect 8 0 20 0;
#P connect 3 2 12 0;
#P connect 23 0 12 0;
#P connect 20 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 1 0;
#P fasten 9 0 21 0 68 203 274 203;
#P connect 3 2 14 0;
#P connect 24 0 14 0;
#P connect 21 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 2 0;
#P fasten 10 0 22 0 108 203 362 203;
#P connect 3 2 16 0;
#P connect 25 0 16 0;
#P connect 22 0 16 0;
#P connect 16 0 15 0;
#P connect 15 0 6 0;
#P pop;


February 26, 2008 | 12:49 pm

If i were you i’d refrain from using delays and metros, those are timing objects which i don’t think you need here. It’s much easier to only store when there is input.

Unless you want to be able to see multiple presets for the multislider at the same time, i don’t see why this wouldn’t work. Or is it something else you’re after?

#P window setfont "Sans Serif" 9.;
#P number 37 105 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#N counter 1 3;
#X flags 0 0;
#P newobj 37 80 66 196617 counter 1 3;
#P button 37 59 15 0;
#P newex 113 162 72 196617 prepend store;
#P newex 113 114 23 196617 t b;
#P newex 113 140 27 196617 i;
#N vpreset 4;
#X append 1 2 0 38 113 multiSlider list 39 84 116 45 0 0 0 2 29 79 86 95 100 104 0 0 ; 7 105 37 number int 1 ;;
#X append 2 2 0 38 113 multiSlider list 20 23 23 23 29 109 109 109 109 29 34 34 34 32 32 32 ; 7 105 37 number int 2 ;;
#X append 3 2 0 38 113 multiSlider list 45 45 43 43 43 43 43 43 43 43 43 43 43 43 45 45 ; 7 105 37 number int 3 ;;
#P preset 37 195 79 28;
#P user multiSlider 113 38 301 56 0. 127. 16 2665 0 0 1 2 0 35 0;
#M frgb 214 0 0;
#M brgb 70 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P connect 7 0 1 0;
#P connect 7 0 2 1;
#P connect 6 0 7 0;
#P connect 5 0 6 0;
#P connect 4 0 1 0;
#P connect 2 0 4 0;
#P connect 3 0 2 0;
#P connect 0 0 3 0;
#P window clipboard copycount 8;


February 26, 2008 | 1:07 pm

ah thats it exactly! i was really taking the long way round! thanks helps a lot!


February 26, 2008 | 1:49 pm

> ah thats it exactly! i was really taking the long way round! thanks helps a lot!

Small addition is to use leftmost outlet of preset box. Otherwise the number from the counter might give unexpected results.

_
johan


February 26, 2008 | 2:04 pm

Quote: jvkr wrote on Tue, 26 February 2008 14:49
—————————————————-
> > ah thats it exactly! i was really taking the long way round! thanks helps a lot!
>
> Small addition is to use leftmost outlet of preset box. Otherwise the number from the counter might give unexpected results.
>
> _
> johan
—————————————————-

Good one, forgot about that…i’ve never actually used preset myself, objects like these are way too powerful for me :)


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