Debian Codegraph @

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