ir linrand krange ir linrand krange kr linrand krange ar linrand krange ir trirand krange kr trirand krange ar trirand krange ir exprand krange kr exprand krange ar exprand krange ir bexprnd krange kr bexprnd krange ar bexprnd krange ir cauchy kalpha kr cauchy kalpha ar cauchy kalpha ir pcauchy kalpha kr pcauchy kalpha ar pcauchy kalpha ir poisson klambda kr poisson klambda ar poisson klambda ir gauss krange kr gauss krange ar gauss krange ir weibull ksigma, ktau kr weibull ksigma, ktau ar weibull ksigma, ktau ir betarand krange, kalpha, kbeta kr betarand krange, kalpha, kbeta ar betarand krange, kalpha, kbeta ir unirand krange kr unirand krange ar unirand krange
All of the following opcodes operate in i-, k- and a-rate.
linrand krange - Linear distribution random number generator. krange is the range of the random numbers (0 - krange). Outputs only positive numbers.
trirand krange - Same as above only outputs both negative and positive numbers.
exprand krange - Exponential distribution random number generator. krange is the range of the random numbers (0 - krange). Outputs only positive numbers.
bexprnd krange - Same as above, only extends to negative numbers too with an exponential distribution.
cauchy kalpha -Cauchy distribution random number generator. kalpha controls the spread from zero (big kalpha = big spread). Outputs both positive and negative numbers.
pcauchy kalpha - Same as above, outputs positive numbers only.
poisson klambda - Poisson distribution random number generator. klambda is the mean of the distribution. Outputs only positive numbers.
gauss krange - Gaussian distribution random number generator. krange is the range of the random numbers (-krange - 0 - krange). Outputs both positive and negative numbers.
weibull ksigma, ktau - Weibull distribution random number generator. ksigma scales the spread of the distribution and ktau, if greater than one numbers near ksigma are favored, if smaller than one small values are favored and if t equals 1 the distribution is exponential. Outputs only positive numbers.
betarand krange, kalpha, kbeta - Beta distribution random number generator. krange is the range of the random numbers (0 - krange). If kalpha is smaller than one, smaller values favor values near 0. If kbeta is smaller than one, smaller values favor values near krange. If both kalpha and kbeta equal one we have uniform distribution. If both kalpha and kbeta are greater than one we have a sort of Gaussian distribution. Outputs only positive numbers.
unirand krange - Uniform distribution random number generator. krange is the range of the random numbers (0 - krange).
For more detailed explanation of these distributions, see:
a1 trirand 32000 ; Audio noise with triangle distribution k1 cauchy 10000 ; Control noise with Cauchy dist. i1 betarand 30000, .5, .5 ; i-time random value, beta dist.
These opcode names originally started with i, k, or a to denote the rate at which the opcode operated. These names are deprecated as of Csound version 3.49. The current form should now be used; the previous form will not work.
Paris Smaragdis
MIT, Cambridge
1995