2 questions about multislider

Mar 17, 2006 at 11:59am

2 questions about multislider

Hi there.

Is there a way to to retrieve the value of any given slider and possibly the number of that slider when selecting that slider with the mouse. This can be done with pack but what if I have say…500 sliders? I think the answer might involve [zl] but I’m not to familiar with this object.

Also, What would I do to send random numbers to 500+ sliders?

Thanks guys.

#24935
Mar 17, 2006 at 2:34pm

On 17 mars 06, at 12:59, Christopher wrote:

> Hi there.
>
> Is there a way to to retrieve the value of any given slider

Hi,

the fetch message will do that for you.

> and possibly the number of that slider when selecting that slider
> with the mouse. This can be done with pack but what if I have say…
> 500 sliders? I think the answer might involve [zl] but I’m not to
> familiar with this object.

I’m not sure I understand correctly what you’d like to achieve. The
patch bellow will give you the index number of the slider you’re
manipulating, and its value. zl objects won’t work if you have more
than 256 sliders. You’ll need the ejies to make the patch work.

Best,
ej

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 173 314 229 196617 if the delta is not 0 output the index
of the slider;
#P comment 164 221 79 196617 for smaller list;
#P newex 165 236 77 196617 vexpr $f1-$f2;
#P comment 324 359 100 196617 slider value;
#P number 226 358 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 70 352 71 196617 prepend fetch;
#P flonum 284 357 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 70 311 100 196617 if $f2 != 0. then $i1;
#P newex 70 274 61 196617 listfunnel 1;
#P newex 53 203 27 196617 t l l;
#P user multiSlider 53 93 241 73 0. 1. 2048 2681 47 0 0 2 0 30 0;
#M frgb 174 185 192;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 116 116 116;
#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 70 237 85 196617 mxj ej.lop @op -;
#P comment 158 359 100 196617 slider number;
#P comment 132 277 161 196617 listfunnel works with 2048 items;
#P connect 6 0 8 0;
#P connect 6 0 9 0;
#P fasten 8 0 3 0 75 384 32 384 32 72 58 72;
#P connect 5 0 6 0;
#P connect 3 1 7 0;
#P connect 2 0 5 0;
#P connect 4 0 2 1;
#P connect 4 1 2 0;
#P connect 3 0 4 0;
#P window clipboard copycount 14;

#72796
Mar 17, 2006 at 4:12pm

Thanks for the reply. This brings up another question. When someone posts a patch in text form, what do you do when the first two lines are missing? I see this all the time. I have no problem loading other patches but what do I have to fill those first two lines with?

Thanks..

#72797
Mar 18, 2006 at 1:31am

you can copy it to a text file, then delete the ‘space’ in front of each…. then copy the text and New From Clipboard…. than it works ;)

#72798
Mar 18, 2006 at 2:38pm

Just copy the posted text in the forum, then go to max and make a new patcher then just press paste! You do not have to add the missing lines.

best,

john.

#72799

You must be logged in to reply to this topic.