Debian Codegraph @

examples/pan.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 real audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o pan.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 4
14 0dbfs = 1
15
16 instr 1
17
18 kcps = p4
19 k1 phasor kcps ; "fraction" of circle - controls speed of rotation - can be negative
20 k2 tablei k1, 1, 1 ; sin of angle (sinusoid in f1)
21 k3 tablei k1, 1, 1, .25, 1 ; cos of angle (sin offset 1/4 circle)
22 arnd randomi 400, 1000, 50 ; produce random values
23 asig poscil .7, arnd, 1 ; audio signal..
24
25 a1,a2,a3,a4 pan asig, k2/2, k3/2, 2, 1, 1 ; sent in a circle (f2=1st quad sin)
26 outq a1, a2, a3, a4
27
28 endin
29 </CsInstruments>
30 <CsScore>
31
32 f1 0 8192 10 1
33 f2 0 8193 9 .25 1 0
34
35 i1 0 10 .2 ;move to the tight
36 i1 11 10 -.2 ;move to the left
37 e
38
39 </CsScore>
40 </CsoundSynthesizer>