Forums > MaxMSP

active foo 0 not working for pattrstorage+autopattr

March 5, 2008 | 7:12 pm

Here’s a small demonstration.

Notice that if you turn some LED’s on and off, then save the patch, they’ll restore right back to where they were when you load the file. You can see clearly in pattr window that those settings are disabled. The "active foo 0" is not having any impact at all on restores, even with @autorestore 0!

What’s going on?

- Glot

#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P newex 156 219 53 9109514 autopattr;
#X prestore led1 1 0 1;
#X prestore led2 1 0 0;
#X prestore led3 1 0 0;
#X prestore led4 1 0 0;
#X prestore led5 1 0 0;
#X prestore led6 1 0 1;
#P objectname u553000171;
#P newex 144 80 53 9109514 loadbang;
#P newex 144 144 53 9109514 append 0;
#P newex 144 122 45 9109514 _ active;
#P message 144 102 164 9109514 led1 , led2 , led3 , led4 , led5 , led6;
#P newex 52 198 157 9109514 pattrstorage zoo @autorestore 0;
#X active led1 0;
#X active led2 0;
#X active led3 0;
#X active led4 0;
#X active led5 0;
#X active led6 0;
#X client_rect 15 55 655 295;
#X storage_rect 0 0 640 240;
#P objectname zoo;
#P user led 94 111 17 17 0 150;
#P objectname led6;
#P user led 72 122 17 17 0 150;
#P objectname led5;
#P user led 87 86 17 17 0 150;
#P objectname led4;
#P user led 63 97 17 17 0 150;
#P objectname led3;
#P user led 81 61 17 17 0 150;
#P objectname led2;
#P user led 56 70 17 17 0 150;
#P objectname led1;
#P connect 9 0 6 0;
#P connect 10 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P window clipboard copycount 12;


March 5, 2008 | 11:30 pm

I think that it comes from [autopattr].
I realized that with [autopattr] in a patch, the states of all named
objects are saved with the patch as default values.
It does the same even without [pattrstorage] (see patch below: tweak all
objects, save, reopen…).

(I find this very handy sometimes ;)

#P window setfont "Sans Serif" 9.;
#P user ubumenu 148 92 100 196617 0 1 1 0;
#X add 1;
#X add 2;
#X add 3;
#X prefix_set 0 0 0;
#P window linecount 1;
#P comment 166 153 100 196617 named ubu;
#P user ubumenu 153 172 100 196617 0 1 1 0;
#X add 1;
#X add 2;
#X add 3;
#X prefix_set 0 0
0;
#P objectname ubu;
#P toggle 421 95 15 0;
#P comment 433 162 100 196617 named oh;
#P toggle 429 177 15 0;
#P objectname oh;
#P user led 314 182 17 17 0 150;
#P objectname ah;
#P user led 314 94 17 17 0 150;
#P newex 57 162 53 196617 autopattr;
#X prestore ah 1 0 1;
#X prestore oh 1 0 1;
#X prestore ubu 1 0 2;
#P objectname u831000018;
#P comment 323 165 100 196617 named ah;
#P window clipboard copycount 10;


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