pickrand - return a random choice from a specified set of numbers
value = pickrand(number1 [, number2, ... numberN ])
Call pickrand to choose randomly among several numbers that you specify as its arguments.
It's a good idea to call srand once to seed the random number generator before using pickrand. Otherwise, a seed of 1 will be used.
One of the arguments to pickrand, selected randomly.
srand(1) for (i = 0; i < 10; i = i + 1) { pitch = pickrand(8.00, 8.02, 8.04, 8.05, 8.07, 8.09, 8.11) print(pitch) }
prints 10 pitches from a C major scale, selected randomly. There's no guarantee that this will print each of the arguments at least once. Use the spray mechanism for that (spray_init, get_spray).
srand, random, rand, irand, pickwrand, spray_init, get_spray, gen20
Douglas Scott <dscott at netscape net>