cauchy
Prev | Orchestra Opcodes and Operators | Next

## 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 file cauchy.csd.

Example 90. Example of the cauchy opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac     ;;;RT audio out
    ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o cauchy.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 32
    nchnls = 2
    0dbfs = 1

    instr 1  	; every run time same values

    kalpha	cauchy	100
    	printk	.2, kalpha		; look
    aout	oscili	0.8, 440+kalpha, 1	; & listen
    	outs	aout, aout
    endin

    instr 2		; every run time different values

    	seed 0
    kalpha	cauchy	100
    	printk	.2, kalpha		; look
    aout	oscili	0.8, 440+kalpha, 1	; & listen
    	outs	aout, aout
    endin
    </CsInstruments>
    <CsScore>
    ; sine wave
    f 1 0 16384 10 1

    i 1 0 2
    i 2 3 2
    e

    </CsScore>
    </CsoundSynthesizer>

Its output should include lines like:

     i   1 time     0.00267:    -0.20676
     i   1 time     0.20267:    -0.28814
     i   1 time     0.40267:     0.61651
     i   1 time     0.60267:   -18.18552
     i   1 time     0.80267:     1.18140
     i   1 time     1.00000:    -0.75432
     i   1 time     1.20267:    -0.02002
     i   1 time     1.40267:     0.01785
     i   1 time     1.60267:    -0.48834
     i   1 time     1.80000:     9.69401
     i   1 time     2.00000:    -0.41257
    Seeding from current time 3112109827
     i   2 time     3.00267:    -0.46887
     i   2 time     3.20267:     0.06189
     i   2 time     3.40267:    -0.40303
     i   2 time     3.60000:     0.89312
     i   2 time     3.80267:    -0.40374
     i   2 time     4.00000:     0.86557
     i   2 time     4.20000:     0.09192
     i   2 time     4.40267:    -0.16748
     i   2 time     4.60267:     0.30133
     i   2 time     4.80267:     0.31657
     i   2 time     5.00000:     0.44681

## See Also

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

## Credits

Author: Paris Smaragdis
MIT, Cambridge
1995

Existed in 3.30

Prev | Up | Next
cabasa | Home | ceil