urd
A discrete user-defined-distribution random generator that can be used as a function.
Syntax
Initialization
itableNum -- number of table containing the random-distribution function. Such table is generated by the user. See GEN40, GEN41, and GEN42. The table length does not need to be a power of 2.
Performance
ktableNum -- number of table containing the random-distribution function. Such table is generated by the user. See GEN40, GEN41, and GEN42. The table length does not need to be a power of 2.
urd is the same opcode as duserrnd, but can be used in function fashion.
For a tutorial about random distribution histograms and functions see:
- D. Lorrain. "A panoply of stochastic cannons". In C. Roads, ed. 1989. Music machine. Cambridge, Massachusetts: MIT press, pp. 351 - 379.
Examples
Here is an example of the urd opcode. It uses the file urd.csd.
Its output should include lines like these:
i1 184.61538
i1 130.76923
i1 169.23077
i1 12.00000
.......
WARNING: Seeding from current time 3751086165
i2 138.46154
i2 12.00000
i2 123.07692
i2 161.53846
i2 123.07692
i2 153.84615
......
See also
Credits
Author: Gabriel Maldonado
New in Version 4.16