Debian Codegraph @

examples/seed.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 seed.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 seed 10
19 krnd randomh 100, 200, 5
20 printk .5, krnd ; look
21 aout oscili 0.8, 440+krnd, 1 ; & listen
22 outs aout, aout
23
24 endin
25
26 instr 2 ;different values every time - value is derived from system clock
27
28 seed 0 ; seed from system clock
29 krnd randomh 100, 200, 5
30 printk .5, krnd ; look
31 aout oscili 0.8, 440+krnd, 1 ; & listen
32 outs aout, aout
33
34 endin
35 </CsInstruments>
36 <CsScore>
37 f 1 0 16384 10 1 ;sine wave.
38
39 i 1 0 1
40 i 2 2 1
41 e
42 </CsScore>
43 </CsoundSynthesizer>