Multislider to Always Add to 1

Morgan Sutherland's icon

I'd like to have an array[n] of flonums/sliders that will always add
up to a given number.
For instance, I could have 4 flonums and when one value is modified,
the other 3 values would adjust to keep the total equal to 1.
Ultimately I'd like a multi-slider whose outputs always add up to 1
(so that each slider is a percentage).

--
Morgan Sutherland

volker böhm's icon

On 18 Apr 2008, at 19:10, Morgan Sutherland wrote:
> I'd like to have an array[n] of flonums/sliders that will always add
> up to a given number.
> For instance, I could have 4 flonums and when one value is modified,
> the other 3 values would adjust to keep the total equal to 1.
> Ultimately I'd like a multi-slider whose outputs always add up to 1
> (so that each slider is a percentage).

divide each element by the sum.

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

Morgan Sutherland's icon
teeshirtguy5's icon

Hi

sorry to dig up a 9 year old (:O )thread

this works well but is there also a way of doing this so that you can actually have 1 as a multislider value?

this appears to always approach 1 but never quite get there (due to i guess it always updating itself)

thank