Debian Codegraph @

examples/locsig_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 locsig_stereo.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Initialize the global variables.
12 sr = 44100
13 kr = 4410
14 ksmps = 10
15 nchnls = 2
16
17 ga1 init 0
18 ga2 init 0
19 ; Instrument #1
20 instr 1
21 ; Use the "drumsMlp.wav" audio file.
22 aout diskin2 "drumsMlp.wav", 1, 0, 1
23 kdegree line 0, p3, 180
24 kdistance line 1, p3 , 30
25 a1, a2 locsig aout, kdegree, kdistance, .1
26 ar1, ar2 locsend
27 ga1 = ga1+ar1
28 ga2 = ga2+ar2
29
30
31 outs a1, a2
32 endin
33
34 instr 99 ; reverb instrument
35 a1 reverb2 ga1, 2.5, .5
36 a2 reverb2 ga2, 2.5, .5
37 outs a1, a2
38 ga1=0
39 ga2=0
40 endin
41 </CsInstruments>
42 <CsScore>
43
44 ; Table #1, a sine wave.
45 f 1 0 16384 10 1
46
47 ; Play Instrument #1 for five seconds.
48 i 1 0 2
49 i99 0 5
50 e
51
52
53 </CsScore>
54 </CsoundSynthesizer>