Debian Codegraph @

examples/lagud.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5
6 sr = 44100
7 ksmps = 128
8 nchnls = 2
9 0dbfs = 1.0
10
11 instr 1
12 kx = randh(2, 1)
13 kx2 = lagud(kx, 1.0, 0.1, 1)
14 printks "x %f x2 %f\n", 0.1, kx, kx2
15 endin
16
17 instr 2
18 kmidis[] fillarray 60, 65, 60, 65, 60
19 ilen = lenarray(kmidis)
20 kidx = int(linseg(0, ilen*2, ilen-0.00000001))
21 kmidi = mtof(kmidis[kidx])
22 afreq = lagud(a(kmidi), 1, 0.1)
23 a0 = oscili(0.7, afreq)
24 kfreq = lagud(kmidi, 1, 0.1)
25 a1 = oscili(0.7, kfreq)
26 outch 1, a0
27 outch 2, a1
28 endin
29
30 </CsInstruments>
31 <CsScore>
32 ; i 1 0 10
33 i 2 0 12
34
35 </CsScore>
36 </CsoundSynthesizer>
37