need help with sliders
when using a slider, How can I scale the output to be between 0 and 1, instead of 0 to 128? (for example .05, .5, .8, etc.)
In edit mode select the slider and if on mac hit apple + i, if on
windows hit cntrl + i. Should bring up the inspector for that object
where you can change the range of the slider.
On Sep 4, 2006, at 6:47 PM, David wrote:
> when using a slider, How can I scale the output to be between 0 and
> 1, instead of 0 to 128? (for example .05, .5, .8, etc.)
The best way to do this is to right click on the slider then click ‘get info’.Change the range to 101. then connect that to a multiply object and times by 0.01…type ‘* 0.01′ into the object box.then connect that into a dotted number box…this will give you a smooth scale between 0 and 1 of 100 increments rather than just a step or a system using the scale object.
here is the text…
#N vpatcher 15 55 696 614;
#P window setfont "Sans Serif" 9.;
#P flonum 215 183 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 215 140 32 9109513 * 0.01;
#P user hslider 215 95 18 128 101 1 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
hope this helps,
i don’t think any way is better than the other ?
why not just [/ 127.] ? (then you don’t need to inspect the slider)
or [scale 0 127 0. 1.] ? (increase the ease of change, if you suddenly need other values or an exponential curve…)
in the end it’s almost the same… but i guess the simple divider is the most CPU efficient… but i haven’t tested, since both methods is pretty cheap..
by best i meant the best for me…there are many different ways to do things in max, thats whats so great about it…
thats just the system i use and i like it because i never forget the decimal and i like dealing in hundreds.i built a large subtractive polysynth a while ago for a degree major project and it had hundreds of controls…it made it easier to know that all sliders had a range of 100, especially when routing LFOs,XY pads and mod envelopes to them via drop down menus.
when you get down to this level it is spliting hairs really – but it is worth it with these little methods that one does over and over again throughout a project.
try them all,find the best for you!