Debian Codegraph @

examples/delayk.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o delayk.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10 ;example shows "delayk" for fm index and
11 ;a second "delayk" for panning
12 sr = 44100
13 ksmps = 32
14 nchnls = 2
15 0dbfs = 1
16
17 gisin ftgen 0, 0, 2^10, 10, 1
18
19 instr 1
20
21 kenv1 transeg 0, .02, 0, 1, 3.98, -6, 0 ;envelope
22 kenv2 delayk kenv1, 2 ;delayed by two seconds
23 kindx expon 5, p3, 1 ;fm index decreasing over p3
24 asig foscili .6, 400, 1, 11/4, kindx, gisin
25 kpan1 linseg 0, 4, 1 ;panning for first sound
26 kpan2 linseg 1, 4, 0 ;panning for second sound ...
27 kpan2 delayk kpan2, 2 ;delayed by two seconds
28 a1 = asig * kenv1
29 a2 = asig * kenv2
30
31 aL1,aR1 pan2 a1, kpan1
32 aL2,aR2 pan2 a2, kpan2
33 outs aL1+aL2, aR1+aR2
34
35 endin
36 </CsInstruments>
37 <CsScore>
38
39 i 1 0 6
40 e
41 </CsScore>
42 </CsoundSynthesizer>