Debian Codegraph @

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