QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next Section 

x-class noise

        xlinrand        krange 
        xtrirand        krange
        xexprand        krange
        xbexprnd        krange
        xcauchy         kalpha
        xpcauchy        kalpha
        xpoisson        klambda
        xgauss          krange
        xweibull        ksigma, ktau
        xbeta           krange, kalpha, kbeta
        xuniform        krange

DESCRIPTION

All of the following opcodes operate in i-, k- and a-rate. The output rate depends on the first letter of the opcode, a for a-rate, k for k- rate and i for i-rate.

xlinrand krange - Linear distribution random number generator. krange is the range of the random numbers [0 - krange). Outputs only positive numbers.

xtrirand krange - Same as above only ouputs both negative and positive numbers.

xexprand krange - Exponential distribution random number generator. krange is the range of the random numbers [0 - krange). Outputs only positive numbers.

xbexprnd krange - Same as above, only extends to negative numbers too with an exponential distribution.

xcauchy kalpha -Cauchy distribution random number generator. kalpha controls the spread from zero (big kalpha => big spread). Outputs both positive and negative numbers.

xpcauchy kalpha - Same as above, ouputs positive numbers only.

xpoisson klambda - Poisson distribution random number generator. klambda is the mean of the distribution. Outputs only positive numbers.

xgauss krange - Gaussian distribution random number generator. krange is the range of the random numbers (-krange - 0 - krange). Outputs both positive and negative numbers.

xweibull 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.

xbeta 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.

xuniform krange - Uniform distribution random number generator. krange is the range of the random numbers [0 - krange).

For more detailed explanation of these distributions, see:
1. C. Dodge - T.A. Jerse 1985. Computer music. Schirmer books. pp.265 - 286
2. D. Lorrain. A panoply of stochastic cannons. In C. Roads, ed. 1989. Music machine . Cambridge, Massachusetts: MIT press, pp. 351 - 379.

EXAMPLE:

a1  atrirand    32000         ; Audio noise with triangle distribution
k1  kcauchy     10000         ; Control noise with Cauchy dist.
i1  ibetarand   30000, .5, .5 ; i-time random value, beta dist.
AUTHOR:

Paris Smaragdis
MIT, Cambridge
1995 


QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next Section 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97