Debian Codegraph @

examples/zacl.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o zacl.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 ksmps = 32
14 nchnls = 1
15 0dbfs = 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 waveform.
22 instr 1
23 ; Generate a simple sine waveform.
24 asin oscili 0.2, 440
25
26 ; Declick
27 asin *= linsegr(0, 0.05, 1, 0.05, 0)
28
29 ; Send the sine waveform to za variable #1.
30 zaw asin, 1
31 endin
32
33 ; Instrument #2 -- generates audio output.
34 instr 2
35 ; Send za location #1 to channel 1
36 a1 zar 1
37 out a1
38
39 ; Clear the za variables, get them ready for
40 ; another pass.
41 zacl 0, 1
42 endin
43
44
45 </CsInstruments>
46 <CsScore>
47
48 ; Play Instrument #1 for one second.
49 i 1 0 1
50 ; Play Instrument #2 until end of performance
51 i 2 0 -1
52 e 1.5
53
54 </CsScore>
55 </CsoundSynthesizer>