distribute float list to increase and decrease for the same percentage.

Wil's icon

I am trying to distribute floats so that --

-0.77 , -0.55 , -0.33 , -0.11 , 0.11 , 0.33 , 0.55 , 0.77

can become

-0.84 , 0.6, 0.36 , -0.12 , 0.12 , 0.36, 0.6 , 0.84

or become

-0.7 , -0.5 , -0.3 , -0.1 , 0.1 , 0.3 , 0.5 , 0.7

so the formula takes the sum of the middle 2 numbers and adds/subtracts to the growing list positive and negative

like this but one expression?

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

Source Audio's icon

in dynamic list length , you first need to find that 2 middle IDs.

if list length is 5, 9, or 22 ?

TFL's icon

If that can help:


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

Source Audio's icon

I don't see where this here takes place in the calculation.:

"so the formula takes the sum of the middle 2 numbers and adds/subtracts to the growing list positive and negative"

I would understand that if list is :

-25 -22 - 18 -12 0 1 7 8 22.4 33.5 28.1 (11 values)

one should sum 5th & 6th values, or 6th & 7th ?

in this case 0 & 1 = 1, or 1 & 7 = 8, to start with.

and then what ?

Maybe Will means abs. distance between 2 middle numbers, which would be

0.22 for example list -0.77 , -0.55 , -0.33 , -0.11 , 0.11 , 0.33 , 0.55 , 0.77

that should become addition factor in both directions...

Wil's icon

TFL what I was lookin for.

Don't really need [round]

Juts let it fly

More refined



Roman Thilenius's icon

i see that all the values are increased or decreased for the same percentage.

Wil's icon

I changed the topic title @ROMAN THILENIUS

Roman Thilenius's icon

-0.11 is the anchor point
-0.77 is 7.0 times -0.11
when -0.11 is changed to -0.12 that is a change of -0.01
-0.77 will have to be changed for 7 times * -0.01