| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac -iadc ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o rnd.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Andres Cabrera 2010 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 4410 |
| 15 |
nchnls = 1 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
instr 1 |
| 19 |
; Generate a random number from 0 to 10. |
| 20 |
irand = rnd(10) |
| 21 |
print irand |
| 22 |
endin |
| 23 |
|
| 24 |
instr 2 |
| 25 |
klimit init 10 |
| 26 |
krand = rnd(klimit) |
| 27 |
printk 0, krand |
| 28 |
endin |
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
|
| 33 |
i 1 0 1 ; Generate 1 number |
| 34 |
i 1 0 1 ; Generate another number |
| 35 |
i 1 0 1 ; yet another number |
| 36 |
|
| 37 |
i 2 2 1 ; 1 second prints 9 values (kr = 10) |
| 38 |
e |
| 39 |
|
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |