Forums > MaxMSP

Very simple [dial] behavior…

Dec 01 2010 | 7:53 am

I’m not seeing something here. I went back to the tutorial and am still not seeing. When I change the min/max of the [dial], and it is connected to the number box as in the patch below, why does it not respond correctly? As soon as the number box is out of the way, it works fine. There are no limits or attributes of the number box I can see that would be causing a problem…

Sorry, this is *basic*, I know!

-- Pasted Max Patch, click to expand. --

Dec 01 2010 | 10:32 am

Regardless of the minmax settings, 0 at the inlet always represents the lowest value. I don’t know the background of this design choice. Anyhow, some simple math solves this.


-- Pasted Max Patch, click to expand. --

Dec 01 2010 | 3:42 pm

The terms "min" and "max" and the message "setminmax" are misnomers in the case of [dial] and [slider]. Try out the following way of thinking. Instead of thinking of the object having a "minimum" and a "maximum", think of it as having a "range", an "offset", and a "multiplier" (these terms were used in Max 4 and before), or, if you prefer (as in Max 5), a "size", "min", and "mult" attribute. The terms are different in the two versions of Max, but the objects behave the same in both versions. (And in Max 4 there were three different sliders — [slider], [uslider], and [vslider] — which were all merged into [slider] in Max 5.) The [slider] or [dial] itself has a range ("size") which is 128 by default, and its value is restricted from 0 to range-minus-1 (0 to 127 initially). The number that you choose on the dial, or send in the inlet, is first clipped to stay within that range, then multiplied by the multiplier "mult", then has the offset "min" added to it, and that’s the number that gets sent out. See the demo patch below.

-- Pasted Max Patch, click to expand. --

Dec 03 2010 | 6:38 am

Hmmm…A little more involved than I thought, after all, I guess. Thanks, I was a little confused by the terminology-maze here!

Dec 03 2010 | 7:01 am

I’m not sure I’m seeing why the [prepend set] object is causing [dial] not to obey the attributes that were sent to it. Especially since the number box being used has no min/max, so it shouldn’t be changing anything, right? I want a (hopefully) single number box to display the current [dial] value, and that allows a new value to be typed into it, and that tracks correctly when the size/offset/mult of the dial have been changed. Am I not seeing something in the reply or patch that was posted?

Many thanks,

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

Forums > MaxMSP