The Alternative Csound Reference Manual
Previous |  | Next

# pcauchy

pcauchy -- Cauchy distribution random number generator (positive values only).

## Description

Cauchy distribution random number generator (positive values only). This is an x-class noise generator.

## Syntax

ar pcauchy kalpha

ir pcauchy kalpha

kr pcauchy kalpha

## Performance

pcauchy kalpha -- controls the spread from zero (big kalpha = big spread). Outputs positive numbers only.

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 pcauchy opcode. It uses the files pcauchy.orc and pcauchy.sco.

Example 1. Example of the pcauchy opcode.

    /* pcauchy.orc */
    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      ; Generate a random number between 0 and 1.
      ; kalpha = 1

      i1 pcauchy 1

      print i1
    endin
    /* pcauchy.orc */

    /* pcauchy.sco */
    ; Play Instrument #1 for one second.
    i 1 0 1
    e
    /* pcauchy.sco */

Its output should include a line like this:

    instr 1:  i1 = 0.012

## See Also

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

## Credits

Author: Paris Smaragdis
MIT, Cambridge
1995

Example written by Kevin Conder.

Previous | Home | Next
pareq | Up | pchbend