Debian Codegraph @

examples/space_stereo.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 space_stereo.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 0dbfs = 1
14 nchnls = 2
15
16 ga1 init 0
17 ga2 init 0
18
19 instr 1
20
21 kx = p4
22 ky = p5
23 asig diskin2 "drumsMlp.wav", 1
24 a1, a2, a3, a4 space asig, 0, 0, .1, kx, ky ;take position values from p4, p5
25 ar1, ar2, ar3, ar4 spsend ;send to reverb
26
27 ga1 = ga1+ar1
28 ga2 = ga2+ar2
29 outs a1, a2
30
31 endin
32
33 instr 99 ; reverb instrument
34
35 a1 reverb2 ga1, 2.5, .5
36 a2 reverb2 ga2, 2.5, .5
37 outs a1, a2
38
39 ga1=0
40 ga2=0
41
42 endin
43
44 </CsInstruments>
45 <CsScore>
46 ;place the sound in the left speaker and near
47 i1 0 1 -1 1
48 ;place the sound in the right speaker and far
49 i1 1 1 45 45
50 ;place the sound equally between left and right and in the middle ground distance
51 i1 2 1 0 12
52
53 i 99 0 7 ;keep reverb active
54 e
55 </CsScore>
56 </CsoundSynthesizer>