The Alternative Csound Reference Manual
Previous |  | Next

# bexprnd

bexprnd -- Exponential distribution random number generator.

## Description

Exponential distribution random number generator. This is an x-class noise generator.

## Syntax

ar bexprnd krange

ir bexprnd krange

kr bexprnd krange

## Performance

krange -- the range of the random numbers (-krange to +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.

## Examples

Here is an example of the bexprnd opcode. It uses the files bexprnd.orc and bexprnd.sco.

Example 1. Example of the bexprnd opcode.

    /* bexprnd.orc */
    /* Written by Kevin Conder */
    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      ; Generate a random number between -1 and 1.
      ; krange = 1

      i1 bexprnd 1

      print i1
    endin
    /* bexprnd.orc */

    /* bexprnd.sco */
    /* Written by Kevin Conder */
    ; Play Instrument #1 for one second.
    i 1 0 1
    e
    /* bexprnd.sco */

Its output should include lines like:

    instr 1:  i1 = 1.141

## See Also

betarand, cauchy, exprand, gauss, linrand, pcauchy, poisson, trirand, unirand, weibull

## Credits

Author: Paris Smaragdis
MIT, Cambridge
1995

Previous | Home | Next
betarand | Up | biquad