How can I keep the sum of the three relative to each other, keeping the sum of them always equal to 1?
let’s say that with a knob I would like to move the weight of the probabilities, from the first to the second and then to the third value etc…
Any strategie?
when the knob is full left = .wchoose([1.0, 0.0, 0.0])
when the knob is halfway = .wchoose([0.0, 1.0, 0.0])
when the knob is full right = .wchoose([0.0, 0.0, 1.0])
don’t know what the values for the knob are. you would need to normalize it to 0 < val >1. you could add a test to the function to be safe. or just scale it in the function e.g. val.linlin(0, 126, 0, 1)
Thanks, I remember this method in the documentation, but probably I just made a mistake in the thinking, and asking.
My idea it is :
using a midi knob 0-127 how could I change the wights in the array .wchoose([0.0, 0.0, 0.0])
having the possibility to say :
if you are at 0 on the midi .wchoose([1.0, 0.0, 0.0])
if you are at 32 on the midi .wchoose([0.5, 0.5, 0.0])
if you are at 64 on the midi .wchoose([0.5, 0.5, 0.5])
if you are at 96 on the midi .wchoose([0.0, 0.5, 0.5])
if you are at 127 on the midi .wchoose([0.0, 0.0, 1.0])
and everything in beetween …
just to speculate, I don’t know if they are correct rescaled like this
if you are at 45 on the midi .wchoose([0.4, 0.3, 0.2])