Packing multislider index with value

Jul 18, 2007 at 7:37pm

Packing multislider index with value

Hey,

Is there a more elegant way to pack indexes from a multislider with their respective values? I just want to get the index/value pairs while dragging.

max v2;
#N vpatcher 10 59 889 649;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 178 500 32 196617 print;
#P user multiSlider 119 72 219 97 0. 127. 16 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#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 newex 544 373 30 196617 pack;
#P newex 513 373 30 196617 pack;
#P newex 482 373 30 196617 pack;
#P message 394 351 20 196617 16;
#P message 373 351 20 196617 15;
#P message 352 351 20 196617 14;
#P message 331 351 20 196617 13;
#P message 310 351 20 196617 12;
#P message 289 351 20 196617 11;
#P message 268 351 20 196617 10;
#P message 247 351 20 196617 9;
#P message 226 351 20 196617 8;
#P message 205 351 20 196617 7;
#P message 184 351 20 196617 6;
#P message 163 351 20 196617 5;
#P message 142 351 20 196617 4;
#P message 121 351 20 196617 3;
#P message 100 351 20 196617 2;
#P message 79 351 20 196617 1;
#P newex 451 373 30 196617 pack;
#P newex 420 373 30 196617 pack;
#P newex 389 373 30 196617 pack;
#P newex 358 373 30 196617 pack;
#P newex 327 373 30 196617 pack;
#P newex 296 373 30 196617 pack;
#P newex 265 373 30 196617 pack;
#P newex 234 373 30 196617 pack;
#P newex 203 373 30 196617 pack;
#P newex 172 373 30 196617 pack;
#P newex 141 373 30 196617 pack;
#P newex 110 373 30 196617 pack;
#P newex 79 373 30 196617 pack;
#P newex 79 328 209 196617 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P connect 33 0 0 0;
#P connect 0 0 14 0;
#P connect 14 0 1 0;
#P connect 0 0 1 1;
#P connect 0 1 15 0;
#P connect 15 0 2 0;
#P connect 0 2 16 0;
#P connect 0 1 2 1;
#P connect 16 0 3 0;
#P connect 0 3 17 0;
#P connect 0 2 3 1;
#P connect 0 4 18 0;
#P connect 17 0 4 0;
#P connect 32 0 34 0;
#P connect 31 0 34 0;
#P connect 30 0 34 0;
#P connect 13 0 34 0;
#P connect 12 0 34 0;
#P connect 11 0 34 0;
#P connect 10 0 34 0;
#P connect 9 0 34 0;
#P connect 8 0 34 0;
#P connect 7 0 34 0;
#P connect 6 0 34 0;
#P connect 5 0 34 0;
#P connect 4 0 34 0;
#P connect 3 0 34 0;
#P connect 2 0 34 0;
#P connect 1 0 34 0;
#P connect 0 5 19 0;
#P connect 0 3 4 1;
#P connect 18 0 5 0;
#P connect 0 6 20 0;
#P connect 0 4 5 1;
#P connect 0 7 21 0;
#P connect 19 0 6 0;
#P connect 0 8 22 0;
#P connect 0 5 6 1;
#P connect 20 0 7 0;
#P connect 0 9 23 0;
#P connect 0 6 7 1;
#P connect 0 10 24 0;
#P connect 21 0 8 0;
#P connect 0 11 25 0;
#P connect 0 7 8 1;
#P connect 22 0 9 0;
#P connect 0 12 26 0;
#P connect 0 8 9 1;
#P connect 0 13 27 0;
#P connect 23 0 10 0;
#P connect 0 14 28 0;
#P connect 0 9 10 1;
#P connect 24 0 11 0;
#P connect 0 15 29 0;
#P connect 0 10 11 1;
#P connect 25 0 12 0;
#P connect 0 11 12 1;
#P connect 26 0 13 0;
#P connect 0 12 13 1;
#P connect 27 0 30 0;
#P connect 0 13 30 1;
#P connect 28 0 31 0;
#P connect 0 14 31 1;
#P connect 29 0 32 0;
#P connect 0 15 32 1;
#P pop;

#32940
Jul 18, 2007 at 8:21pm

listfunnel is what you look for, i guess…

max v2;
#N vpatcher 10 59 443 440;
#P window setfont “Sans Serif” 9.;
#P newex 52 260 32 196617 print;
#P newex 52 200 52 196617 listfunnel;
#P user multiSlider 52 53 219 97 0. 127. 16 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#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 connect 0 0 1 0;
#P connect 1 0 2 0;
#P pop;

Best!
Lars

#109075
Jul 18, 2007 at 8:25pm

On 18 juil. 07, at 21:37, Jason wrote:

> Hey,
>
> Is there a more elegant way to pack indexes from a multislider with
> their respective values? I just want to get the index/value pairs
> while dragging.

You mean something like [multislider 1]? ;-)

ej

#109076
Jul 18, 2007 at 8:45pm

I knew there was, thanks for the listfilter suggestion.

#109077
Jul 18, 2007 at 9:21pm

At 1:37 PM -0600 7/18/07, Jason wrote:
>Hey,
>
>Is there a more elegant way to pack indexes from a multislider with their respective values? I just want to get the index/value pairs while dragging.

I use this abstraction called LastSlider:

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 205 324 78 196617 Position of last changed slider;
#N comlet Position of last changed slider;
#P outlet 188 331 15 0;
#N comlet Value of last changed slider;
#P outlet 65 331 15 0;
#N comlet Sliders In;
#P inlet 65 47 15 0;
#P comment 82 324 71 196617 Value of last changed slider;
#P window linecount 1;
#P newex 65 263 30 196617 Llist;
#P newex 65 286 38 196617 zl mth;
#P newex 93 167 30 196617 Labs;
#P newex 94 112 27 196617 t l l;
#P newex 93 147 38 196617 Lcomp;
#P newex 93 191 44 196617 Lpeak 0;
#P window linecount 2;
#P comment 139 193 100 196617 Find position of the latest changed value;
#P window linecount 1;
#P comment 81 47 100 196617 Sliders In;
#P connect 2 0 6 1;
#P connect 2 0 11 0;
#P connect 4 0 3 1;
#P connect 9 0 7 0;
#P connect 9 0 4 0;
#P connect 5 0 2 0;
#P connect 3 0 5 0;
#P connect 4 1 3 0;
#P connect 6 0 10 0;
#P connect 7 0 6 0;
#P window clipboard copycount 13;


Chris Muir | “There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue.” – Brian Eno

#109078

You must be logged in to reply to this topic.