Forums > MaxMSP

ubumenu pattrmode 1: inexpected behavior

June 3, 2008 | 8:51 am

Hi,

It seems I can’t recall an ubumenu state (put in subpatcher) from a [pattr @bindto] when this ubu is set in pattrmode 1. works fine in pattr mode 0

What do you think about this?
any idea?

max v2;
#N vpatcher 49 44 770 457;
#P window setfont "Sans Serif" 20.;
#P window linecount 1;
#P comment 417 288 21 196628 3;
#P comment 53 137 21 196628 2;
#P window setfont "Sans Serif" 9.;
#P comment 438 294 100 196617 look at pattrstorage;
#P comment 83 143 74 196617 change;
#P comment 378 90 287 196617 fine !!: ubumenu in [p pat2] is set to pattrmode 0 , so it works;
#P newex 216 71 48 196617 loadbang;
#P newex 447 311 67 196617 pattrstorage;
#X client_rect 200 560 840 800;
#X storage_rect 0 0 640 240;
#P objectname u239000093;
#N vpatcher 774 236 1114 442;
#P window setfont "Sans Serif" 9.;
#P newex 58 66 48 196617 loadbang;
#P message 64 99 65 196617 pattrmode 1;
#P user ubumenu 64 147 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname ubu1;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 320 167 38 196617 p pat1;
#P objectname pat1;
#P message 216 92 89 196617 bindto pat2::ubu2;
#P message 216 166 89 196617 bindto pat1::ubu1;
#P user ubumenu 33 110 100 196617 0 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname transpo-notranspo[1];
#N vpatcher 773 44 1123 213;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 21 28 48 196617 loadbang;
#P message 33 69 65 196617 pattrmode 0;
#P user ubumenu 33 118 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname ubu2;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 323 90 38 196617 p pat2;
#P objectname pat2;
#P message 120 320 164 196617 2 0;
#P newex 120 298 61 196617 prepend set;
#P newex 120 268 95 196617 pattr transposition;
#X prestore 2 0 2 0;
#P objectname transposition;
#P window linecount 2;
#P comment 379 163 271 196617 [pattr] object doesn’t want ubumenu to be in pattrmode 1 for showing its content as symbol ? (look in pattrstorage);
#P window linecount 1;
#P comment 229 130 74 196617 choose binding;
#P window setfont "Sans Serif" 20.;
#P comment 206 122 21 196628 1;
#P connect 9 0 3 0;
#P connect 7 0 3 0;
#P connect 8 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P fasten 12 0 9 0 221 90 221 90;
#P pop;


June 3, 2008 | 9:17 am

I think it’s user error :)

pattrmode 1 is content-based, not index-based. You’re sending the index of the item you want (left outlet of ubumenu), rather than the name of the item in the menu (middle outlet of ubumenu).

jb


June 3, 2008 | 4:20 pm

No, sorry, not so simple, look at the patch below.

For me [pattr] object doesn’t want ubumenu to be in pattrmode 1 for showing its content as symbol when @bindto subpatcher ?

Could it be a software limitation ?

… Perhaps it is time for to run Max5.
But I’m still expecting for a max4 to max5 translator (even if it seems difficult).

thank you for reading.

max v2;
#N vpatcher 49 44 770 457;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 9 90 100 196617 0 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0 0;
#P objectname transpo-notranspo[2];
#P window setfont "Sans Serif" 20.;
#P window linecount 1;
#P comment 417 288 21 196628 3;
#P comment 66 158 21 196628 2;
#P window setfont "Sans Serif" 9.;
#P comment 438 294 100 196617 look at pattrstorage;
#P comment 96 164 74 196617 change;
#P comment 378 90 287 196617 fine !!: ubumenu in [p pat2] is set to pattrmode 0 , so it works;
#P newex 216 71 48 196617 loadbang;
#P newex 447 311 67 196617 pattrstorage;
#X client_rect 200 560 840 800;
#X storage_rect 0 0 640 240;
#P objectname u021000592;
#N vpatcher 774 236 1114 442;
#P window setfont "Sans Serif" 9.;
#P newex 58 66 48 196617 loadbang;
#P message 64 99 65 196617 pattrmode 1;
#P user ubumenu 64 147 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname ubu1;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 320 167 38 196617 p pat1;
#P objectname pat1;
#P message 216 92 89 196617 bindto pat2::ubu2;
#P message 216 166 89 196617 bindto pat1::ubu1;
#P user ubumenu 46 132 100 196617 0 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname transpo-notranspo[1];
#N vpatcher 773 44 1123 213;
#P window setfont "Sans Serif" 9.;
#P newex 21 28 48 196617 loadbang;
#P message 33 69 65 196617 pattrmode 0;
#P user ubumenu 33 118 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname ubu2;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 323 90 38 196617 p pat2;
#P objectname pat2;
#P message 120 320 164 196617 "no transpo" 1;
#P newex 120 298 61 196617 prepend set;
#P newex 120 268 95 196617 pattr transposition;
#X prestore 2 0 "no transpo" 1;
#P objectname transposition;
#P window linecount 2;
#P comment 379 163 271 196617 [pattr] object doesn’t want ubumenu to be in pattrmode 1 for showing its content as symbol ? (look in pattrstorage);
#P window linecount 1;
#P comment 229 130 74 196617 choose binding;
#P window setfont "Sans Serif" 20.;
#P comment 206 122 21 196628 1;
#P connect 18 0 3 0;
#P connect 7 1 3 0;
#P connect 8 0 3 0;
#P connect 9 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P fasten 12 0 9 0 221 90 221 90;
#P pop;


June 3, 2008 | 5:02 pm

On Jun 3, 2008, at 9:20 AM, Derrick Giscloux wrote:
> But I’m still expecting for a max4 to max5 translator (even if it
> seems difficult).

Max 5 already does a pretty good job of importing Max 4 patchers.

Perhaps you mean a Max 5 to Max 4 translator? (which I would wager
never gets created)

-C

Chris Muir
cbm@well.com

http://www.xfade.com


June 3, 2008 | 5:19 pm

There appears to be a minor difference in the two modes: in pattrmode 1, you need to explicitly send the ubumenu’s toggle state, whereas you can leave it unspecified in pattrmode 0. Here’s a workaround.

jb

#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P newex 354 387 61 196620 pack s 0;
#B color 6;
#P newex 354 319 65 196620 tosymbol;
#B color 6;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 69 150 100 196617 0 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0 0;
#P objectname transpo-notranspo[2];
#P window setfont "Sans Serif" 20.;
#P comment 477 348 21 196628 3;
#P comment 126 218 21 196628 2;
#P window setfont "Sans Serif" 9.;
#P comment 498 354 100 196617 look at pattrstorage;
#P comment 156 224 74 196617 change;
#P comment 438 150 287 196617 fine !!: ubumenu in [p pat2] is set to pattrmode 0 , so it works;
#P newex 276 131 48 196617 loadbang;
#P newex 507 371 67 196617 pattrstorage;
#X client_rect 200 560 840 800;
#X storage_rect 0 0 640 240;
#P objectname u231000003;
#N vpatcher 774 236 1114 442;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 58 66 48 196617 loadbang;
#P message 64 99 65 196617 pattrmode 1;
#P user ubumenu 64 147 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname ubu1;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 380 227 38 196617 p pat1;
#P objectname pat1;
#P message 276 152 89 196617 bindto pat2::ubu2;
#P message 276 226 89 196617 bindto pat1::ubu1;
#P user ubumenu 106 192 100 196617 0 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname transpo-notranspo[1];
#N vpatcher 773 44 1123 213;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 21 28 48 196617 loadbang;
#P message 33 69 65 196617 pattrmode 0;
#P user ubumenu 33 118 100 196617 1 1 1 0;
#X add no transpo;
#X add transpo A;
#X add transpo B;
#X prefix_set 0 0
0;
#P objectname ubu2;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P pop 1;
#P newobj 383 150 38 196617 p pat2;
#P objectname pat2;
#P message 180 397 164 196617 0 0;
#P newex 180 358 61 196617 prepend set;
#P newex 180 328 95 196617 pattr transposition;
#X prestore 2 0 0 0;
#P objectname transposition;
#P window linecount 2;
#P comment 439 223 271 196617 [pattr] object doesn’t want ubumenu to be in pattrmode 1 for showing its content as symbol ? (look in pattrstorage);
#P window linecount 1;
#P comment 289 190 74 196617 choose binding;
#P window setfont "Sans Serif" 20.;
#P comment 266 182 21 196628 1;
#P connect 19 0 20 0;
#P lcolor 7;
#P connect 4 0 5 0;
#P fasten 4 0 20 0 185 381 359 381;
#P lcolor 7;
#P connect 7 1 19 0;
#P lcolor 7;
#P fasten 12 0 9 0 281 150 281 150;
#P connect 3 0 4 0;
#P connect 9 0 3 0;
#P connect 8 0 3 0;
#P connect 18 0 3 0;
#P fasten 20 0 3 0 359 420 156 420 156 315 185 315;
#P lcolor 7;
#P window clipboard copycount 21;


June 4, 2008 | 4:35 pm

Fine, thank you !


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