Debian Codegraph @

examples/random.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o random.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 instr 1 ;same values every time
17
18 krnd random 100, 1000
19 printk .5, krnd ; look
20 aout oscili 0.8, 440+krnd, 1 ; & listen
21 outs aout, aout
22
23 endin
24
25 instr 2 ;different values every time
26
27 seed 0
28 krnd random 100, 1000 ; seed from system clock
29 printk .5, krnd ; look
30 aout oscili 0.8, 440+krnd, 1 ; & listen
31 outs aout, aout
32
33 endin
34 </CsInstruments>
35 <CsScore>
36 f 1 0 16384 10 1 ;sine wave.
37
38 i 1 0 1
39 i 2 2 1
40 e
41 </CsScore>
42 </CsoundSynthesizer>