Forums > MaxMSP

ubumenu-toggle

March 9, 2006 | 12:58 pm

hi

I can’t find a way to recall the (color)state of a ubumenu in
toggle-mode using the preset-object

example below

any suggestions

Jurgen

max v2;
#N vpatcher 252 157 852 557;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 312 174 100 9109513 to set toggle to 0 after recalling preset
1 you have to hit the ubumenu twice;
#P window linecount 1;
#P message 330 110 14 9109513 2;
#P message 312 110 14 9109513 1;
#N vpreset 5;
#X append 1 2 4 141 219 ubumenu int 0 ; 5 188 219 toggle int 1 ;;
#X append 2 2 4 141 219 ubumenu int 0 ; 5 188 219 toggle int 0 ;;
#X append 5 2 4 141 219 ubumenu int 0 ; 5 188 219 toggle int 0 ;;
#P preset 312 139 47 27;
#P toggle 219 188 15 0;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 219 141 68 9109516 1 0 1 1;
#X setrgb 255 255 255 140 140 140 234 234 234 4 4 4 254 154 26 112 112 112;
#X add depth;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window setfont "Sans Serif" 9.;
#P newex 219 165 62 9109513 route toggle;
#P window linecount 6;
#P comment 312 27 100 9109513 changing presets doesnt affect the
color-state of the ubumenu. It does recall the right state for the toggle;
#P window linecount 4;
#P comment 204 260 100 9109513 is there a way to recall the correct
state of the ubumenu with the presetobject?;
#P window linecount 1;
#P comment 348 111 100 9109513 presets;
#P connect 4 2 3 0;
#P connect 3 0 5 0;
#P hidden connect 8 0 6 0;
#P hidden connect 7 0 6 0;
#P pop;

Visual Kitchen vzw
Office:
Onderwijsstraat 51
B-1070 Brussel
Belgium
t: +32(0)2 410 80 45
f: +32[0]2 520 07 82
e: info@visualkitchen.org
http://www.visualkitchen.org
http://www.cimatics.com
subscribe to our newsletter at:

http://userlists.all2all.org/mailman/listinfo/visualkitchen


March 9, 2006 | 2:04 pm

Hello Jurgen!

On 9 mars 06, at 13:58, jurgen van gemert wrote:

> I can’t find a way to recall the (color)state of a ubumenu in
> toggle-mode using the preset-object
>
> example below
>
> any suggestions

Maybe something like this :

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 133 129 62 196617 prepend set;
#P message 224 89 52 196617 toggle $1;
#P toggle 229 54 15 0;
#P newex 125 203 32 196617 print;
#P window linecount 4;
#P comment 312 174 114 196617 to set toggle to 0 after recalling preset
1 you have to hit the ubumenu twice;
#P window linecount 1;
#P message 330 110 14 196617 2;
#P message 312 110 14 196617 1;
#N vpreset 8;
#X append 1 1 11 54 229 toggle int 0 ;;
#X append 2 1 11 54 229 toggle int 1 ;;
#X append 5 2 4 141 219 ubumenu int 0 ; 5 231 236 toggle int 0 ;;
#X append 7 1 4 141 219 ubumenu int 0 ;;
#X append 8 1 4 141 219 ubumenu int 0 ;;
#P preset 312 139 47 27;
#P toggle 236 231 15 0;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 219 141 68 196620 1 0 1 1;
#X setrgb 255 255 255 140 140 140 234 234 234 4 4 4 254 154 26 112 112
112;
#X add depth;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window setfont "Sans Serif" 9.;
#P newex 227 194 62 196617 route toggle;
#P window linecount 6;
#P comment 312 27 100 196617 changing presets doesnt affect the
color-state of the ubumenu. It does recall the right state for the
toggle;
#P window linecount 4;
#P comment 204 260 119 196617 is there a way to recall the correct
state of the ubumenu with the presetobject?;
#P window linecount 1;
#P comment 348 111 100 196617 presets;
#P connect 3 0 13 0;
#P connect 3 0 5 0;
#P connect 13 0 11 0;
#P connect 4 2 10 0;
#P connect 4 2 3 0;
#P connect 6 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 4 0;
#P hidden connect 7 0 6 0;
#P hidden connect 8 0 6 0;
#P window clipboard copycount 14;

I hope you’re well!
Best,

p

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://users.skynet.be/crfmw/max


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