Forums > MaxMSP

Single Out (Solo) efficiency

March 9, 2006 | 7:00 pm

I am trying to program a way in which to solo certain objects, in this case 8 select buttons and corresponding pictctrl "leds". The patch I have posted does what I want it to, which is to have only ever have one "led" on. But theres alot of wires and I was just wondering if there was a more efficient way of doing the same thing.

Will

(P.S Only first two select and leds are hooked up)

max v2;
#N vpatcher 5 40 605 440;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 285 79 38 9109513 "LEDS";
#P newex 216 169 79 9109513 if $i1 == 1 then 0;
#P newex 119 168 79 9109513 if $i1 == 1 then 0;
#P toggle 266 79 15 0;
#P toggle 266 118 15 0;
#P toggle 235 79 15 0;
#P toggle 235 118 15 0;
#P toggle 202 79 15 0;
#P toggle 202 118 15 0;
#P toggle 169 79 15 0;
#P toggle 169 118 15 0;
#P toggle 449 123 15 0;
#P newex 449 99 27 9109513 == 0;
#P toggle 449 77 15 0;
#P comment 228 142 69 9109513 Select Buttons;
#P fasten 4 0 12 0 174 150 124 150;
#P fasten 13 0 5 0 221 239 366 239 366 40 174 40;
#P fasten 4 0 5 0 174 137 158 137 158 75 174 75;
#P fasten 13 0 4 0 221 195 313 195 313 98 174 98;
#P lcolor 6;
#P fasten 6 0 7 0 207 137 191 137 191 75 207 75;
#P fasten 12 0 7 0 124 213 57 213 57 62 207 62;
#P lcolor 3;
#P fasten 12 0 6 0 124 198 109 198 109 110 207 110;
#P lcolor 8;
#P fasten 6 0 13 0 207 152 221 152;
#P fasten 13 0 9 0 221 224 339 224 339 56 240 56;
#P fasten 12 0 9 0 124 220 52 220 52 54 240 54;
#P lcolor 3;
#P fasten 8 0 9 0 240 138 224 138 224 76 240 76;
#P fasten 13 0 8 0 221 195 303 195 303 108 240 108;
#P lcolor 6;
#P fasten 12 0 8 0 124 198 103 198 103 106 240 106;
#P lcolor 8;
#P fasten 13 0 11 0 221 219 316 219 316 65 271 65;
#P fasten 12 0 11 0 124 226 46 226 46 46 271 46;
#P lcolor 3;
#P fasten 10 0 11 0 271 137 255 137 255 74 271 74;
#P fasten 13 0 10 0 221 195 299 195 299 113 271 113;
#P lcolor 6;
#P fasten 12 0 10 0 124 198 98 198 98 102 271 102;
#P lcolor 8;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P pop;


March 9, 2006 | 8:21 pm

while many of my jscripts are buggy… one that isn’t is solomute.js

estatesound.com/matsui

-matt

. . . . . . . . . . . .
http://www.EstateSound.com
http://ideasforstuff.blogspot.com
. . . . . . . . . . . .


March 9, 2006 | 8:40 pm

> I am trying to program a way in which to solo certain objects, in this case 8 select buttons and corresponding pictctrl "leds". The patch I have posted does what I want it to, which is to have only ever have one "led" on. But theres alot of wires and I was just wondering if there was a more efficient way of doing the same thing.
>
> Will

i usually send lists to the objects to be solo ed
aka (1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) to enable
2 of 16 … it works okay with up to 24 aims or so ..
and is more flexible as it allows different combinations.

i 5 – select 5 – (1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
binds this setting to "program number 5" then


March 9, 2006 | 8:42 pm

I think Jasch’s mtx might be what you’re looking for,
Cheers
Roger


March 9, 2006 | 10:40 pm

Roman Thilenius wrote:

> i usually send lists to the objects to be solo ed
> aka (1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) to enable

> i 5 – select 5 – (1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
> binds this setting to "program number 5" then

Roman,

Do you mean like this? The only problem now is I cant get the select toggles to switch off when a new one is select without getting a stock overflow.

max v2;
#N vpatcher 187 109 951 650;
#P user led 238 303 17 17 0 150;
#P user led 213 303 17 17 0 150;
#P user led 169 303 17 17 0 150;
#P user led 191 303 17 17 0 150;
#P user led 149 303 17 17 0 150;
#P user led 125 303 17 17 0 150;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 169 333 32 9109513 LEDS;
#P message 348 186 53 9109513 0 0 0 0 0 1;
#P message 282 186 53 9109513 0 0 0 0 1 0;
#P message 215 186 53 9109513 0 0 0 1 0 0;
#P message 150 186 53 9109513 0 0 1 0 0 0;
#P message 82 186 53 9109513 0 1 0 0 0 0;
#P newex 348 155 41 9109513 select 6;
#P newex 282 155 41 9109513 select 5;
#P newex 215 155 41 9109513 select 4;
#P newex 150 155 41 9109513 select 3;
#P newex 82 155 41 9109513 select 2;
#P newex 16 155 44 9109513 select 1;
#P newex 169 120 27 9109513 i 6;
#P message 16 186 53 9109513 1 0 0 0 0 0;
#P newex 282 280 26 9109513 print;
#P message 226 83 14 9109513 6;
#P message 184 83 14 9109513 4;
#P message 205 83 14 9109513 5;
#P message 164 83 14 9109513 3;
#P message 144 83 14 9109513 2;
#P message 120 83 14 9109513 1;
#P toggle 238 280 14 0;
#P toggle 213 280 15 0;
#P toggle 191 280 15 0;
#P toggle 169 280 15 0;
#P toggle 149 280 15 0;
#P toggle 125 280 15 0;
#P toggle 226 60 15 0;
#P toggle 205 60 15 0;
#P toggle 184 60 15 0;
#P toggle 164 60 15 0;
#P toggle 144 60 15 0;
#P toggle 120 60 15 0;
#P newex 148 222 94 9109513 unpack 0 0 0 0 0 0 0;
#P comment 149 37 69 9109513 Select Toggles;
#P fasten 22 0 23 0 174 147 21 147;
#P connect 23 0 21 0;
#P fasten 22 0 24 0 174 147 87 147;
#P connect 24 0 29 0;
#P connect 2 0 14 0;
#P fasten 1 0 8 0 153 256 130 256;
#P connect 8 0 35 0;
#P connect 3 0 15 0;
#P fasten 33 0 1 0 353 214 153 214;
#P fasten 32 0 1 0 287 214 153 214;
#P fasten 31 0 1 0 220 214 153 214;
#P fasten 30 0 1 0 155 214 153 214;
#P fasten 29 0 1 0 87 214 153 214;
#P fasten 21 0 1 0 21 214 153 214;
#P fasten 1 1 9 0 167 256 154 256;
#P connect 9 0 36 0;
#P fasten 22 0 25 0 174 147 155 147;
#P connect 25 0 30 0;
#P connect 4 0 16 0;
#P fasten 19 0 22 0 231 110 174 110;
#P fasten 17 0 22 0 210 110 174 110;
#P fasten 18 0 22 0 189 110 174 110;
#P fasten 16 0 22 0 169 110 174 110;
#P fasten 15 0 22 0 149 110 174 110;
#P fasten 14 0 22 0 125 110 174 110;
#P fasten 1 2 10 0 181 256 174 256;
#P connect 10 0 38 0;
#P connect 5 0 18 0;
#P fasten 1 3 11 0 195 256 196 256;
#P connect 11 0 37 0;
#P connect 6 0 17 0;
#P fasten 1 4 12 0 209 256 218 256;
#P connect 12 0 39 0;
#P fasten 22 0 26 0 174 147 220 147;
#P connect 26 0 31 0;
#P connect 7 0 19 0;
#P fasten 1 5 13 0 223 256 243 256;
#P connect 13 0 40 0;
#P fasten 22 0 27 0 174 147 287 147;
#P connect 27 0 32 0;
#P fasten 1 0 20 0 153 256 287 256;
#P fasten 22 0 28 0 174 147 353 147;
#P connect 28 0 33 0;
#P pop;


March 10, 2006 | 4:46 pm

I managed to get it so that there is only ever 1 select switch and led lit, but it might be a bit of a round about way. Anyone care to take a look? The working for it is the ‘p selects’ subpatch.

Will

max v2;
#N vpatcher 48 52 812 593;
#P window setfont "Sans Serif" 9.;
#N vpatcher 291 50 891 598;
#P outlet 492 250 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 492 166 78 9109513 unpack 0 0 0 0 0;
#P message 492 136 45 9109513 0 0 0 0 0;
#P inlet 492 108 15 0;
#P outlet 397 250 15 0;
#P newex 397 163 78 9109513 unpack 0 0 0 0 0;
#P message 397 136 45 9109513 0 0 0 0 0;
#P inlet 397 108 15 0;
#P outlet 302 250 15 0;
#P newex 302 163 78 9109513 unpack 0 0 0 0 0;
#P message 302 136 45 9109513 0 0 0 0 0;
#P inlet 302 108 15 0;
#P outlet 209 249 15 0;
#P newex 209 162 78 9109513 unpack 0 0 0 0 0;
#P message 209 135 45 9109513 0 0 0 0 0;
#P inlet 209 107 15 0;
#P outlet 114 249 15 0;
#P newex 114 162 78 9109513 unpack 0 0 0 0 0;
#P message 114 135 45 9109513 0 0 0 0 0;
#P inlet 114 107 15 0;
#P outlet 19 249 15 0;
#P newex 19 162 78 9109513 unpack 0 0 0 0 0;
#P message 19 135 45 9109513 0 0 0 0 0;
#P inlet 19 107 15 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P fasten 22 0 3 0 497 215 24 215;
#P fasten 18 0 3 0 402 215 24 215;
#P lcolor 15;
#P fasten 14 0 3 0 307 215 24 215;
#P lcolor 1;
#P fasten 10 0 3 0 214 215 24 215;
#P lcolor 13;
#P fasten 6 0 3 0 119 215 24 215;
#P lcolor 3;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P fasten 22 1 7 0 514 217 119 217;
#P fasten 18 1 7 0 419 215 119 215;
#P lcolor 15;
#P fasten 14 1 7 0 324 215 119 215;
#P lcolor 1;
#P fasten 10 1 7 0 231 215 119 215;
#P lcolor 13;
#P fasten 2 0 7 0 24 215 119 215;
#P lcolor 6;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P fasten 22 2 11 0 531 217 214 217;
#P fasten 18 2 11 0 436 215 214 215;
#P lcolor 15;
#P fasten 14 2 11 0 341 215 214 215;
#P lcolor 1;
#P fasten 6 1 11 0 136 215 214 215;
#P lcolor 3;
#P fasten 2 1 11 0 41 215 214 215;
#P lcolor 6;
#P connect 12 0 13 0;
#P connect 13 0 14 0;
#P fasten 22 3 15 0 548 217 307 217;
#P fasten 18 3 15 0 453 216 307 216;
#P lcolor 15;
#P fasten 10 2 15 0 248 215 307 215;
#P lcolor 13;
#P fasten 6 2 15 0 153 215 307 215;
#P lcolor 3;
#P fasten 2 2 15 0 58 215 307 215;
#P lcolor 6;
#P connect 16 0 17 0;
#P connect 17 0 18 0;
#P fasten 22 4 19 0 565 217 402 217;
#P fasten 14 3 19 0 358 216 402 216;
#P lcolor 1;
#P fasten 10 3 19 0 265 215 402 215;
#P lcolor 13;
#P fasten 6 3 19 0 170 215 402 215;
#P lcolor 3;
#P fasten 2 3 19 0 75 215 402 215;
#P lcolor 6;
#P connect 20 0 21 0;
#P connect 21 0 22 0;
#P fasten 18 4 23 0 470 216 497 216;
#P lcolor 15;
#P fasten 14 4 23 0 375 216 497 216;
#P lcolor 1;
#P fasten 10 4 23 0 282 215 497 215;
#P lcolor 13;
#P fasten 6 4 23 0 187 215 497 215;
#P lcolor 3;
#P fasten 2 4 23 0 92 215 497 215;
#P lcolor 6;
#P pop;
#P newobj 300 152 77 9109513 p selects;
#P newex 281 92 28 9109513 sel 1;
#P newex 243 92 28 9109513 sel 1;
#P newex 207 92 28 9109513 sel 1;
#P newex 168 92 28 9109513 sel 1;
#P newex 131 92 28 9109513 sel 1;
#P newex 93 92 28 9109513 sel 1;
#P user led 239 379 17 17 0 150;
#P user led 214 379 17 17 0 150;
#P user led 170 379 17 17 0 150;
#P user led 192 379 17 17 0 150;
#P user led 150 379 17 17 0 150;
#P user led 126 379 17 17 0 150;
#P comment 170 409 32 9109513 LEDS;
#P message 349 262 53 9109513 0 0 0 0 0 1;
#P message 283 262 53 9109513 0 0 0 0 1 0;
#P message 216 262 53 9109513 0 0 0 1 0 0;
#P message 151 262 53 9109513 0 0 1 0 0 0;
#P message 83 262 53 9109513 0 1 0 0 0 0;
#P newex 349 231 41 9109513 select 6;
#P newex 283 231 41 9109513 select 5;
#P newex 216 231 41 9109513 select 4;
#P newex 151 231 41 9109513 select 3;
#P newex 83 231 41 9109513 select 2;
#P newex 17 231 44 9109513 select 1;
#P newex 168 157 27 9109513 i 6;
#P message 17 262 53 9109513 1 0 0 0 0 0;
#P newex 283 356 26 9109513 print;
#P message 281 121 14 9109513 6;
#P message 207 121 14 9109513 4;
#P message 243 121 14 9109513 5;
#P message 168 121 14 9109513 3;
#P message 131 121 14 9109513 2;
#P message 93 121 14 9109513 1;
#P toggle 239 356 14 0;
#P toggle 214 356 15 0;
#P toggle 192 356 15 0;
#P toggle 170 356 15 0;
#P toggle 150 356 15 0;
#P toggle 126 356 15 0;
#P toggle 281 69 15 0;
#P toggle 243 69 15 0;
#P toggle 207 69 15 0;
#P toggle 168 69 15 0;
#P toggle 131 69 15 0;
#P toggle 93 69 15 0;
#P newex 151 303 94 9109513 unpack 0 0 0 0 0 0 0;
#P comment 312 72 69 9109513 Select Toggles;
#P fasten 22 0 23 0 173 224 22 224;
#P connect 23 0 21 0;
#P fasten 22 0 24 0 173 224 88 224;
#P connect 24 0 29 0;
#P fasten 47 0 2 0 305 182 68 182 68 64 98 64;
#P connect 2 0 41 0;
#P connect 41 0 14 0;
#P fasten 1 0 8 0 156 332 131 332;
#P connect 8 0 35 0;
#P fasten 47 1 3 0 318 185 63 185 63 60 136 60;
#P connect 3 0 42 0;
#P connect 42 0 15 0;
#P fasten 1 1 9 0 170 332 155 332;
#P connect 9 0 36 0;
#P fasten 22 0 25 0 173 224 156 224;
#P connect 25 0 30 0;
#P fasten 21 0 1 0 22 290 156 290;
#P fasten 29 0 1 0 88 290 156 290;
#P fasten 30 0 1 0 156 290 156 290;
#P fasten 31 0 1 0 221 290 156 290;
#P fasten 32 0 1 0 288 290 156 290;
#P fasten 33 0 1 0 354 290 156 290;
#P fasten 47 2 4 0 331 188 57 188 57 55 173 55;
#P connect 4 0 43 0;
#P connect 43 0 16 0;
#P fasten 19 0 22 0 286 145 173 145;
#P fasten 18 0 22 0 212 145 173 145;
#P fasten 17 0 22 0 248 145 173 145;
#P fasten 16 0 22 0 173 156 173 156;
#P fasten 15 0 22 0 136 145 173 145;
#P fasten 14 0 22 0 98 145 173 145;
#P fasten 1 2 10 0 184 332 175 332;
#P connect 10 0 38 0;
#P fasten 1 3 11 0 198 332 197 332;
#P connect 11 0 37 0;
#P fasten 47 3 5 0 344 191 52 191 52 49 212 49;
#P connect 5 0 44 0;
#P connect 44 0 18 0;
#P fasten 1 4 12 0 212 332 219 332;
#P connect 12 0 39 0;
#P fasten 22 0 26 0 173 224 221 224;
#P connect 26 0 31 0;
#P fasten 1 5 13 0 226 332 244 332;
#P connect 13 0 40 0;
#P fasten 47 4 6 0 357 195 46 195 46 44 248 44;
#P connect 6 0 45 0;
#P connect 45 0 17 0;
#P fasten 47 5 7 0 370 200 41 200 41 38 286 38;
#P connect 7 0 46 0;
#P connect 46 0 19 0;
#P fasten 22 0 27 0 173 224 288 224;
#P connect 27 0 32 0;
#P fasten 1 0 20 0 156 332 288 332;
#P fasten 14 0 47 0 98 145 305 145;
#P fasten 15 0 47 1 136 145 318 145;
#P fasten 16 0 47 2 173 145 331 145;
#P fasten 18 0 47 3 212 145 344 145;
#P fasten 22 0 28 0 173 224 354 224;
#P connect 28 0 33 0;
#P fasten 17 0 47 4 248 145 357 145;
#P fasten 19 0 47 5 286 145 370 145;
#P pop;


March 11, 2006 | 4:02 am

max v2;
#N vpatcher 337 131 489 355;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 27 125 49 196617 change 6;
#P newex 27 168 48 196617 pack 0 0;
#P newex 27 82 58 196617 unpack 0 0;
#P newex 27 25 79 196617 spray 6;
#P newex 36 147 22 196617 b 1;
#P newex 1 187 36 196617 zl reg;
#P newex 27 106 29 196617 gate;
#P user led 117 44 17 17 0 150;
#P user led 99 44 17 17 0 150;
#P user led 81 44 17 17 0 150;
#P user led 63 44 17 17 0 150;
#P user led 45 44 17 17 0 150;
#P user led 27 44 17 17 0 150;
#P newex 27 63 79 196617 funnel 6;
#P fasten 9 0 8 0 41 166 6 166;
#P fasten 8 0 10 0 6 206 135 206 135 23 32 23;
#P connect 10 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 11 0;
#P fasten 11 1 7 0 80 103 32 103;
#P connect 7 0 13 0;
#P connect 13 0 12 0;
#P connect 12 0 8 1;
#P connect 13 0 9 0;
#P connect 2 0 0 1;
#P connect 10 1 2 0;
#P connect 11 0 7 1;
#P connect 3 0 0 2;
#P connect 10 2 3 0;
#P connect 4 0 0 3;
#P connect 5 0 0 4;
#P connect 10 3 4 0;
#P connect 6 0 0 5;
#P connect 10 4 5 0;
#P connect 10 5 6 0;
#P pop;


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