abs_weighted_randomizer-help.pd
abs_weighted_randomizer.pd
between_ex.pd
I'm in the mood to share something so worked this up to presentable form.
It's pretty straight fwd, but highly effective at giving preference to one possible random value over another.
I really don't want to be tweaking bells-and-whistles while I play (guitar) so using this "Chaos with a slight nudge" I can improvise along with my computer (solo).
Values are set using the array and then clicking the "set" bang.
It has two inlets: left: a list/msg of the array values and right: a bang to "roll" another random number.
(The hradio and number at the bottom are only there to show the result, i.e. not to set any values.)
And has one outlet: the resultant (weighted) random value.
It sets a dynamic range/random for the sum of all the Y-values and then if the random value falls into the X's range (it's Y as a percentage of the sum) it is considered to be "rolled".
I have included several examples to experiment with.
The most entertaining concept (and how I intend to use it) is the one on the right of the help file, which sets each bang according to how high the Y is for each X (the greater the Y, the greater the range of possible random values for the [del] (given a selecte-able max value)) .
As to uses?
I think if would be cool for those folks using 1) random values, 2) noise in their work or 3) those wanting to improvise in a semi-random way, "Playing to The Machine" so to speak. (or those who want to work "with" their machines, not against them)
Happy Pd-ing!
Hope you and yours are well. And from that love we might All be made a bit brighter.
Sincerely,
Scott
p.s. while it is predetermined as 10 slots, it could, by just copying the logic, be expanded to many more.