Debian Codegraph @

examples/gen28.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 realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o gen28.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 0dbfs = 1
14 nchnls = 4
15
16 ga1 init 0
17 ga2 init 0
18 ga3 init 0
19 ga4 init 0
20
21 instr 1 ;uses GEN28 file "move", as found in /manual/examples
22
23 kx init 0
24 ky init 0
25 ktime line 0, 5, 5 ;same time as in table 1 (="move")
26 asig diskin2 "drumsMlp.wav", 1, 0, 1 ;sound source is looped
27 a1, a2, a3, a4 space asig, 1, ktime, .1, kx, ky ;use table 1 = GEN28
28 ar1, ar2, ar3, ar4 spsend ;send to reverb
29
30 ga1 = ga1+ar1
31 ga2 = ga2+ar2
32 ga3 = ga3+ar3
33 ga4 = ga4+ar4
34 outq a1, a2, a3, a4
35
36 endin
37
38 instr 99 ; reverb instrument
39
40 a1 reverb2 ga1, 2.5, .5
41 a2 reverb2 ga2, 2.5, .5
42 a3 reverb2 ga3, 2.5, .5
43 a4 reverb2 ga4, 2.5, .5
44 outq a1, a2, a3, a4
45
46 ga1=0
47 ga2=0
48 ga3=0
49 ga4=0
50
51 endin
52 </CsInstruments>
53 <CsScore>
54 f1 0 0 28 "move"
55
56 i1 0 5 ;same time as ktime
57 i 99 0 10 ;keep reverb active
58 e
59 </CsScore>
60 </CsoundSynthesizer>