Debian Codegraph @

examples/ziw.csd

raw
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 ziw.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 kr = 4410
14 ksmps = 10
15 nchnls = 1
16
17 ; Initialize the ZAK space.
18 ; Create 1 a-rate variable and 1 k-rate variable.
19 zakinit 1, 1
20
21 ; Instrument #1 -- a simple instrument.
22 instr 1
23 ; Set zk variable #1 to 64.182.
24 ziw 64.182, 1
25 endin
26
27 ; Instrument #2 -- prints out zk variable #1.
28 instr 2
29 ; Read zk variable #1 at i-rate.
30 i1 zir 1
31
32 ; Print out the value of zk variable #1.
33 print i1
34 endin
35
36
37 </CsInstruments>
38 <CsScore>
39
40 ; Play Instrument #1 for one second.
41 i 1 0 1
42 ; Play Instrument #2 for one second.
43 i 2 0 1
44 e
45
46
47 </CsScore>
48 </CsoundSynthesizer>