cuserrnd
Prev | Orchestra Opcodes and Operators | Next

## cuserrnd

cuserrnd — Continuous USER-defined-distribution RaNDom generator.

## Description

Continuous USER-defined-distribution RaNDom generator.

## Syntax

    aout cuserrnd kmin, kmax, ktableNum

    iout cuserrnd imin, imax, itableNum

    kout cuserrnd kmin, kmax, ktableNum

## Initialization

imin -- minimum range limit

imax -- maximum range limit

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

kmin -- minimum range limit

kmax -- maximum range limit

cuserrnd (continuous user-defined-distribution random generator) generates random values according to a continuous random distribution created by the user. In this case the shape of the distribution histogram can be drawn or generated by any GEN routine. The table containing the shape of such histogram must then be translated to a distribution function by means of GEN40 (see GEN40 for more details). Then such function must be assigned to the XtableNum argument of cuserrnd. The output range can then be rescaled according to the Xmin and Xmax arguments. cuserrnd linearly interpolates between table elements, so it is not recommended for discrete distributions (GEN41 and GEN42).

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.

## See Also

duserrnd, urd

## Credits

Author: Gabriel Maldonado

New in Version 4.16

Prev | Up | Next
ctrlinit | Home | dam