cauchy

cauchy — Cauchy distribution random number generator.

Description

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

Syntax

ares cauchy kalpha
ires cauchy kalpha
kres cauchy kalpha

Performance

kalpha -- controls the spread from zero (big kalpha = big spread). Outputs both positive and negative numbers.

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

Example 57. Example of the cauchy opcode.

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

; Instrument #1.
instr 1
  ; Generate a random number, spread from 10.
  ; kalpha = 10

  i1 cauchy 10

  print i1
endin
/* cauchy.orc */

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

        

Its output should include lines like:

instr 1:  i1 = -0.106
      

See Also

seed, betarand, bexprnd, exprand, gauss, linrand, pcauchy, poisson, trirand, unirand, weibull

Credits

Author: Paris Smaragdis
MIT, Cambridge
1995

Example written by Kevin Conder.