Simple question about managing [rslider]…

Jan 4, 2013 at 8:56am

Simple question about managing [rslider]…

I have this problem a lot with interface objects (slider, dial, etc.): Their min, range, and mult attributes affect *output* when changed with the mouse, but not when feeding it *input* with a number box. So inputting a number produces a totally different number at the output, which makes it hard to set the slider that make sense in context. I don’t quite get why it’s that way (affects output only) in the first place– but is the most efficient way just to ignore that functionality in the objects and use + – * / all the time? Obviously, there are different ways to do this, but I’m wondering what the general approach to managing this kind of thing is, when there are a bunch of these in a patch. It appears my lack of ability of foresee wrinkles like this end-up sending me down rabbit holes…

Hope that makes some sense,

– Pasted Max Patch, click to expand. –
Jan 4, 2013 at 8:22pm

Wouldn’t the min and size messages to rslider work? If not, I don’t understand the problem.

Jan 5, 2013 at 2:09am

Hope this helps… not sure if this is what you were asking.

– Pasted Max Patch, click to expand. –
Jan 5, 2013 at 2:34am

That’s what I’m doing. It seems like it doesn’t like negative numbers, maybe that’s the problem? If you feed a number in the L inlet and watch the output, they track together until a negative number is set for the object minimum, then they’re offset from each other. Is this what’s expected? I’m getting confused here…

Jan 6, 2013 at 12:31am

Yes, thanks! I was thinking (hoping) it wouldn’t be necessary, and I didn’t see anything in the docs about a ‘native’ range for [rslider]. I guess, to my logic, when the range of the object changes in the inspector, it should respond to number boxes accordingly. If I’m missing some basic piece of logic, please enlighten…


You must be logged in to reply to this topic.