Debian Codegraph @

examples/toot5.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6 instr 5
7
8 irel = 0.01 ; set vibrato release time
9 idel1 = p3 * p10 ; calculate initial delay (% of dur)
10 isus = p3 - (idel1 + irel) ; calculate remaining duration
11
12 iamp = ampdb(p4)
13 iscale = iamp * .333 ; p4=amp
14 inote = cpspch(p5) ; p5=freq
15
16
17 k3 linseg 0, idel1, p9, isus, p9, irel, 0 ; p6=attack time
18 k2 oscil k3, p8, 1 ; p7=release time
19 k1 linen iscale, p6, p3, p7 ; p8=vib rate
20
21 a3 oscil k1, inote*.995+k2, 1 ; p9=vib depth
22 a2 oscil k1, inote*1.005+k2, 1 ; p10=vib delay (0-1)
23 a1 oscil k1, inote+k2, 1
24
25 out a1+a2+a3
26
27 endin
28
29 </CsInstruments>
30 <CsScore>
31
32 f1 0 4096 10 1 ; sine wave
33
34 ;ins strt dur amp freq atk rel vibrt vbdpt vbdel
35
36 i5 0 3 86 10.00 0.1 0.7 7 6 .4
37
38 i5 4 3 86 10.02 1 0.2 6 6 .4
39
40 i5 8 4 86 10.04 2 1 5 6 .4
41
42 </CsScore>
43 </CsoundSynthesizer>