Forums > MaxMSP

Multislider pixel problem

February 2, 2006 | 10:23 pm

Hi, i have noticed that the multislider is not correctly adding pixels to the height of individual sliders. Eventhough multislider’s height is around 130pixels, and its value range is 0-127 integer, the smallest value+1 is displayed smae as the smallest value unless the sliders height (pixels) is approximately double the number of possible values.

here is the patch:

max v2;
#N vpatcher 15 55 1028 769;
#P origin -55 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P comment 272 199 100 9109513 bad , first and second slider show the same value.;
#P window linecount 1;
#P message 47 323 37 9109513 0 1 2 3;
#P newex 72 292 45 9109513 loadbang;
#P user multiSlider 92 323 644 245 0. 127. 4 2665 35 1 4 1 1 40 0;
#M frgb 88 242 90;
#M brgb 25 86 145;
#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 objectname 64D1-A[1];
#P comment 752 352 100 9109513 128x128pixels;
#P user panel 735 323 128 128;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P message 67 58 37 9109513 0 1 2 3;
#P newex 92 27 45 9109513 loadbang;
#P user multiSlider 119 71 646 121 0. 127. 4 2665 35 1 4 1 1 40 0;
#M frgb 88 242 90;
#M brgb 25 86 145;
#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 objectname 64D1-A[4];
#P comment 786 90 100 9109513 128x128pixels;
#P user panel 763 71 128 128;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window linecount 2;
#P comment 745 520 100 9109513 ok but wasting space!!!;
#P connect 9 0 10 0;
#P connect 4 0 5 0;
#P connect 10 0 8 0;
#P connect 5 0 3 0;
#P pop;


February 6, 2006 | 1:28 pm

I see your problem, It does change very slightly, but not so you’d notice, Might best way might be to times all the numbers by 5 or whatever, and make the multislider 5 times bigger, (not nessiserily 5 of course). Then / by 5 on the other side, as I presume you need the multislider as a visual thing. hope this helps
T


February 6, 2006 | 3:20 pm

ok i managed to find a solution. however i dont think it should be necessary. i understand multislider max is not designed for high quality user interfaces, but it is important that all values are displayed properly:

—————————————

max v2;
#N vpatcher 53 21 1009 596;
#P origin -55 0;
#P window setfont "Sans Serif" 9.;
#P number 207 334 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 90 321 19 9109513 t 0;
#P newex 121 301 47 9109513 split -3 -1;
#P newex 120 272 27 9109513 – 2;
#P message 194 430 28 9109513 clear;
#P newex 74 413 19 9109513 t b;
#P message 17 442 46 9109513 sort -1 -1;
#P number 124 484 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 124 405 44 9109513 t length l;
#N coll ;
#P newobj 124 459 53 9109513 coll;
#P newex 124 377 57 9109513 append test;
#P newex 125 346 65 9109513 prepend store;
#P newex 120 237 43 9109513 zl nth 64;
#P window linecount 3;
#P comment 778 143 100 9109513 values between 0 and 2 are hidden behind the black panel;
#P user panel 121 198 768 4;
#X brgb 0 0 0;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window linecount 6;
#P comment 313 226 205 9109513 values out of the slider have to be offset and any value of 0 , 1and2 mapped to zero. CAN THIS NOT BE IMPLEMENTED IN THE OBJECT ITSELF? ie a function "invisible zero" which would "hide" all sliders that display zero , the lowest value??;
#P window linecount 1;
#P message 67 58 37 9109513 0 1 2 3;
#P newex 92 27 45 9109513 loadbang;
#P window linecount 3;
#P comment 786 90 100 9109513 128x127pixels..proper height for 1-127 values..;
#P user panel 760 71 128 127;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user multiSlider 121 71 639 129 0. 129. 4 2665 35 1 4 1 1 40 0;
#M frgb 88 242 90;
#M brgb 25 86 145;
#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 objectname 64D1-A[4];
#P window linecount 5;
#P comment 168 486 100 9109513 proove that all values between 0-127 can be set using sliders. also that every value has its vertical pixel..;
#P connect 16 0 15 0;
#P connect 4 0 5 0;
#P fasten 13 0 16 0 73 424;
#P connect 19 0 20 0;
#P connect 1 0 9 0;
#P connect 9 0 18 0;
#P connect 5 0 1 0;
#P connect 18 0 19 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 12 0;
#P connect 17 0 12 0;
#P connect 13 1 12 0;
#P connect 15 0 12 0;
#P connect 12 0 14 0;
#P connect 20 0 10 0;
#P connect 19 1 10 0;
#P connect 20 0 21 0;
#P connect 19 1 21 0;
#P pop;

———————————————-


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