Skip to content

weightedRandom

weightedRandom takes a list of alternating elements and weights, then outputs a random element according to those weights. Supply the list in the form elem1 weight1 elem2 weight2 ..., for example A 4 B 3 C 1 D 2.


AI Generated

This content was generated with the assistance of AI. If you notice any errors, please report them or submit a fix using Submit. Check the prompt used here.


  • Download via Deken.

    Open Pd and go to ToolsFind Externals. Search for easyflow and install it. Then create an object with declare -lib easyflow -path easyflow. Finally, use weightedRandom or any other object from easyflow.


Similar


    Comments

    Contributors