[bug] slider offset misbehaves with negative values.

kjg's icon

hello,

I just noticed a problem with slider when opening a Max 4 patch containing a slider using an offset.

max 4 inspector values:
slider range 128
offset -127
multiplier 1
output -127 - 0, as expected

imported in max 5, these are the values displayed in inspector:
output minimum -127.
output multiplier 1.
range 128.
seems right, but output is -126 - 0

When I create a new slider in Max 5 the behavior is the same. When using a negative value, the output minimum in inspector needs to be set 1 smaller then the output wanted.

Regards,
kjg

Emmanuel Jourdan's icon

On 3 mai 08, at 17:05, Klaas-Jan Govaart wrote:

> hello,
>
> I just noticed a problem with slider when opening a Max 4 patch
> containing a slider using an offset.
>
> max 4 inspector values:
> slider range 128
> offset -127
> multiplier 1
> output -127 - 0, as expected
>
> imported in max 5, these are the values displayed in inspector:
> output minimum -127.
> output multiplier 1.
> range 128.
> seems right, but output is -126 - 0
>
> When I create a new slider in Max 5 the behavior is the same. When
> using a negative value, the output minimum in inspector needs to be
> set 1 smaller then the output wanted.

Good catch! This has been fixed for the forthcoming incremental. Thanks,

ej

bwagner's icon

I believe there's still something wrong with slider.
See the patch: The range and minimum setting locate the value 0 at the middle of the slider. However when setting the slider with a "set 0" message, it jumps to the bottom (which would in fact represent -128).
Funnier still, when you send it a "0", the slider outputs -128.

Max Patch
Copy patch and select New From Clipboard in Max.

Emmanuel Jourdan's icon

This is actually the "correct" behavior. The minimum value is an offset applied at the output.

ayberk's icon

Today i faced the same problem. I can understand how the offset should behave, however, i think there should be a 'message' option which would enable the input value to determine the output value, directly. Is there a chance you to add this option?