Forums > MaxMSP

multislider and vexpr problem

December 13, 2006 | 6:47 am


December 13, 2006 | 11:00 am


December 13, 2006 | 11:15 am


December 13, 2006 | 11:50 am


December 13, 2006 | 1:00 pm

or, if you have jitter:

#P window setfont Geneva 9.;
#P window linecount 1;
#P hidden message 23 160 34 9961481 set 0.;
#P hidden newex 296 206 103 9961481 bgcolor 192 192 192;
#N vpatcher 25 70 336 258;
#P window setfont Geneva 9.;
#P newex 50 50 189 9961481 t b f;
#P newex 50 109 189 9961481 jit.op @op + @val 0.;
#P newex 50 80 140 9961481 jit.matrix values 1 float32 12;
#P inlet 50 30 15 0;
#P outlet 50 131 15 0;
#P connect 1 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P connect 4 1 3 1;
#P pop;
#P newobj 142 173 38 9961481 p math;
#N vpatcher 159 243 486 475;
#P window setfont Geneva 9.;
#P hidden newex 179 29 45 9961481 loadbang;
#P hidden newex 179 51 186 9961481 jit.noise 1 float32 12 @out_name values;
#P newex 50 121 27 9961481 t b f;
#P newex 50 145 73 9961481 pack set 0 0.;
#P newex 81 111 27 9961481 + 1;
#P newex 50 85 73 9961481 jit.iter;
#P inlet 50 30 15 0;
#P outlet 50 167 15 0;
#P hidden fasten 6 0 2 0 184 76 55 76;
#P lcolor 1;
#P connect 1 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 0 0;
#P connect 2 1 3 0;
#P connect 3 0 4 1;
#P connect 5 1 4 2;
#P hidden connect 7 0 6 0;
#P pop;
#P newobj 142 209 118 9961481 p iter&set for multislider;
#P flonum 142 138 48 9 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 23 135 61 9961481 jit.fill values;
#P user multiSlider 23 35 386 86 -1. 1. 12 2681 47 0 1 1 0 8 0;
#M frgb 240 126 58;
#M brgb 79 75 70;
#M rgb2 127 127 127;
#M rgb3 160 144 138;
#M rgb4 255 188 9;
#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 comment 191 138 100 9961481 offset;
#P hidden fasten 7 0 3 0 28 181 104 181 104 130 147 130;
#P hidden connect 2 0 7 0;
#P connect 1 0 2 0;
#P fasten 4 0 1 0 147 230 15 230 15 30 28 30;
#P lcolor 2;
#P connect 5 0 4 0;
#P connect 3 0 5 0;
#P window clipboard copycount 8;


December 13, 2006 | 1:55 pm


December 13, 2006 | 1:57 pm

> Of course. When you move a slider of your multislider (which has
> new values you changed with set), you will perform the addition in
> [vexpr] again, and have a jump. One trick is to substract the
> master fader’s previous value, so that you just add a 0 to your
> list. As my text is not clear, here is a patch that works better
> than yours (well, I hope so!).

great thanks for hint!

so far it still jumps but your idea makes sense.

ingvo

> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 350 430 48 196617 loadbang;
> #P newex 945 425 27 196617 t b i;
> #P newex 414 491 27 196617 t b i;
> #P newex 945 457 27 196617 – 0;
> #P newex 945 394 27 196617 0;
> #P newex 945 362 20 196617 t b;
> #P newex 1091 428 20 196617 t b;
> #P message 1112 54 39 196617 set $1;
> #P window linecount 2;
> #P message 350 640 728 196617 set 1 42 2 71 3 68 4 64 5 60 6 56 7
> 50 8 40 9 33 10 25 11 22 12 21 13 21 14 21 15 21 16 21 17 23 18 25
> 19 28 20 58 21 36 22 38 23 40 24 42 25 43 26 45 27 67 28 51 29 52
> 30 58 31 63 32 71;
> #P newex 350 547 722 196617 sprintf 1 %i 2 %i 3 %i 4 %i 5 %i 6 %i 7
> %i 8 %i 9 %i 10 %i 11 %i 12 %i 13 %i 14 %i 15 %i 16 %i 17 %i 18 %i
> 19 %i 20 %i 21 %i 22 %i 23 %i 24 %i 25 %i 26 %i 27 %i 28 %i 29 %i
> 30 %i 31 %i 32 %i;
> #B color 5;
> #P window linecount 1;
> #P newex 350 597 79 196617 prepend set set;
> #P message 350 455 70 196617 scalarmode 1;
> #P newex 351 521 82 196617 vexpr $i1 + $i2;
> #P user uslider 1078 119 36 128 101 1 0 12;
> #P objectname uslider;
> #P number 1078 93 36 9 0 0 36 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname GRUPPE_A[1];
> #P number 427 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[1];
> #P number 984 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[36];
> #P number 953 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[37];
> #P number 922 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[38];
> #P number 891 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[39];
> #P number 860 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[40];
> #P number 830 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[10];
> #P number 799 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[16];
> #P number 768 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[17];
> #P number 737 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[18];
> #P number 706 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[19];
> #P number 675 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[20];
> #P number 644 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[21];
> #P number 613 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[22];
> #P number 582 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[23];
> #P number 551 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[24];
> #P number 520 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[25];
> #P number 489 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[26];
> #P number 458 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[27];
> #P number 396 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[11];
> #P number 365 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[12];
> #P number 334 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[13];
> #P number 303 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[14];
> #P number 272 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[15];
> #P number 241 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[7];
> #P number 210 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[8];
> #P number 179 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[9];
> #P number 148 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[6];
> #P number 117 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[4];
> #P number 86 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[3];
> #P number 55 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[2];
> #P number 24 257 28 9 0 100 39 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[41];
> #P window linecount 2;
> #P newex 48 307 417 196617 pack 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32;
> #P window linecount 1;
> #P newex 26 218 554 196617 unpack 1 2 3 4 5 6 7 8 9 10 11 12 13 14
> 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32;
> #P user multiSlider 26 79 1003 128 0. 100. 32 2665 47 1 2 3 2 20 0;
> #M frgb 58 58 58;
> #M brgb 255 255 255;
> #M rgb2 127 127 127;
> #M rgb3 38 38 62;
> #M rgb4 0 33 15;
> #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 objectname gruppe_a;
> #P comment 1124 121 63 196617 Gropupslider;
> #P fasten 37 0 47 0 1083 449 950 449;
> #P fasten 37 0 46 1 1083 379 967 379;
> #P fasten 37 0 44 0 1120 290 1120 402;
> #P fasten 37 0 43 0 1083 267 1053 267 1053 37 1117 37;
> #P connect 3 0 38 0;
> #P fasten 3 0 45 0 53 350 950 350;
> #P connect 46 0 49 0;
> #P fasten 47 0 48 0 950 482 419 482;
> #P connect 50 0 39 0;
> #P connect 49 0 47 0;
> #P connect 49 1 47 1;
> #P connect 4 0 3 0;
> #P connect 5 0 3 1;
> #P connect 6 0 3 2;
> #P connect 7 0 3 3;
> #P connect 8 0 3 4;
> #P connect 9 0 3 5;
> #P connect 10 0 3 6;
> #P connect 11 0 3 7;
> #P connect 12 0 3 8;
> #P connect 13 0 3 9;
> #P connect 14 0 3 10;
> #P connect 15 0 3 11;
> #P connect 16 0 3 12;
> #P connect 35 0 3 13;
> #P connect 17 0 3 14;
> #P connect 18 0 3 15;
> #P connect 19 0 3 16;
> #P connect 20 0 3 17;
> #P connect 21 0 3 18;
> #P connect 22 0 3 19;
> #P connect 23 0 3 20;
> #P connect 24 0 3 21;
> #P connect 25 0 3 22;
> #P connect 26 0 3 23;
> #P connect 27 0 3 24;
> #P connect 28 0 3 25;
> #P connect 29 0 3 26;
> #P connect 30 0 3 27;
> #P connect 31 0 3 28;
> #P connect 32 0 3 29;
> #P connect 33 0 3 30;
> #P connect 34 0 3 31;
> #P connect 48 0 38 1;
> #P connect 48 1 38 1;
> #P fasten 45 0 46 0 950 388 950 388;
> #P fasten 44 0 42 0 1096 625 355 625;
> #P fasten 36 0 37 0 1083 113 1083 113;
> #P fasten 43 0 36 0 1117 85 1083 85;
> #P connect 2 31 34 0;
> #P connect 2 30 33 0;
> #P connect 2 29 32 0;
> #P connect 2 28 31 0;
> #P connect 2 27 30 0;
> #P connect 2 26 29 0;
> #P connect 2 25 28 0;
> #P connect 2 24 27 0;
> #P connect 2 23 26 0;
> #P connect 2 22 25 0;
> #P connect 2 21 24 0;
> #P connect 2 20 23 0;
> #P connect 2 19 22 0;
> #P connect 2 18 21 0;
> #P connect 2 17 20 0;
> #P connect 2 16 19 0;
> #P connect 2 15 18 0;
> #P connect 2 14 17 0;
> #P connect 2 13 35 0;
> #P connect 2 12 16 0;
> #P connect 2 11 15 0;
> #P fasten 40 0 42 0 355 629 355 629;
> #P connect 41 0 40 0;
> #P connect 38 0 41 0;
> #P fasten 39 0 38 0 355 494 356 494;
> #P connect 2 10 14 0;
> #P connect 2 9 13 0;
> #P connect 2 8 12 0;
> #P connect 2 7 11 0;
> #P connect 2 6 10 0;
> #P connect 2 5 9 0;
> #P connect 2 4 8 0;
> #P connect 2 3 7 0;
> #P connect 2 2 6 0;
> #P connect 2 1 5 0;
> #P connect 1 0 2 0;
> #P fasten 42 0 1 0 355 678 14 678 14 114 31 114;
> #P connect 2 0 4 0;
> #P window clipboard copycount 51;
>
>
> _____________________________
> Patrick Delges
>
> Centre de Recherches et de Formation Musicales de Wallonie asbl
> http://users.skynet.be/crfmw/max
>
>


December 13, 2006 | 2:42 pm

that version looks perfect, thank you. And the offset way of looking
at it is very logical.
thanks for this!
ingvo

Am 13.12.2006 um 14_00 schrieb nesa:

> or, if you have jitter:
>
> #P window setfont Geneva 9.;
> #P window linecount 1;
> #P hidden message 23 160 34 9961481 set 0.;
> #P hidden newex 296 206 103 9961481 bgcolor 192 192 192;
> #N vpatcher 25 70 336 258;
> #P window setfont Geneva 9.;
> #P newex 50 50 189 9961481 t b f;
> #P newex 50 109 189 9961481 jit.op @op + @val 0.;
> #P newex 50 80 140 9961481 jit.matrix values 1 float32 12;
> #P inlet 50 30 15 0;
> #P outlet 50 131 15 0;
> #P connect 1 0 4 0;
> #P connect 4 0 2 0;
> #P connect 2 0 3 0;
> #P connect 3 0 0 0;
> #P connect 4 1 3 1;
> #P pop;
> #P newobj 142 173 38 9961481 p math;
> #N vpatcher 159 243 486 475;
> #P window setfont Geneva 9.;
> #P hidden newex 179 29 45 9961481 loadbang;
> #P hidden newex 179 51 186 9961481 jit.noise 1 float32 12 @out_name
> values;
> #P newex 50 121 27 9961481 t b f;
> #P newex 50 145 73 9961481 pack set 0 0.;
> #P newex 81 111 27 9961481 + 1;
> #P newex 50 85 73 9961481 jit.iter;
> #P inlet 50 30 15 0;
> #P outlet 50 167 15 0;
> #P hidden fasten 6 0 2 0 184 76 55 76;
> #P lcolor 1;
> #P connect 1 0 2 0;
> #P connect 2 0 5 0;
> #P connect 5 0 4 0;
> #P connect 4 0 0 0;
> #P connect 2 1 3 0;
> #P connect 3 0 4 1;
> #P connect 5 1 4 2;
> #P hidden connect 7 0 6 0;
> #P pop;
> #P newobj 142 209 118 9961481 p iter&set for multislider;
> #P flonum 142 138 48 9 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 23 135 61 9961481 jit.fill values;
> #P user multiSlider 23 35 386 86 -1. 1. 12 2681 47 0 1 1 0 8 0;
> #M frgb 240 126 58;
> #M brgb 79 75 70;
> #M rgb2 127 127 127;
> #M rgb3 160 144 138;
> #M rgb4 255 188 9;
> #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 comment 191 138 100 9961481 offset;
> #P hidden fasten 7 0 3 0 28 181 104 181 104 130 147 130;
> #P hidden connect 2 0 7 0;
> #P connect 1 0 2 0;
> #P fasten 4 0 1 0 147 230 15 230 15 30 28 30;
> #P lcolor 2;
> #P connect 5 0 4 0;
> #P connect 3 0 5 0;
> #P window clipboard copycount 8;
>
>


December 13, 2006 | 2:54 pm


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