bexprnd

bexprnd — Générateur de nombres aléatoires de distribution exponentielle.

Description

Générateur de nombres aléatoires de distribution exponentielle. C'est un générateur de bruit de classe x.

Syntaxe

ares bexprnd krange
ires bexprnd krange
kres bexprnd krange

Exécution

krange -- l'intervalle des nombres aléatoires (-krange à +krange)

Pour des explications plus détaillées sur ces distributions, consulter :

  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.

Exemples

Voici un exemple de l'opcode bexprnd. Il utilise le fichier bexprnd.csd.

Exemple 57. Exemple de l'opcode bexprnd.

Voir les sections Audio en Temps Réel et Options de la Ligne de Commande pour plus d'information sur l'utilisation des options de la ligne de commande.

<CsoundSynthesizer>
<CsOptions>
-odac           -iadc    ;;;RT audio I/O
; -o bexprnd.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

; Initialize the global variables.
sr = 44100
ksmps = 10
nchnls = 1

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

  i1 bexprnd 1

  print i1
endin

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

  ; *** Set seed from time system
  seed 0

  ; *** Every run time different value
  i1 bexprnd 1

  print i1
endin

</CsInstruments>
<CsScore>

; Play Instrument #1 for one second.
i 1 0 1
; Play Instrument #2 for one second.
i 2 1 1
e


</CsScore>
</CsoundSynthesizer>


Sa sortie contiendra une ligne comme celle-ci :

instr 1:  i1 = 1.141

Voir Aussi

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

Crédits

Auteur : Paris Smaragdis
MIT, Cambridge
1995

Exemple écrit par Kevin Conder.