I want to choose randomly* between two alternatives with unequal probability.
For instance, when the user presses a button, 25% of the time it would make sound A and
if (random() % (A+B) < A) do_A() else do_B();