Debian Codegraph @

examples/toot6.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6
7 instr 6
8
9 ifunc = p11 ; select the basic waveform
10 irel = 0.01 ; set vibrato release time
11 idel1 = p3 * p10 ; calculate initial delay (% of dur)
12 isus = p3 - (idel1 + irel) ; calculate remaining duration
13
14 iamp = ampdb(p4)
15 iscale = iamp * .333 ; p4=amp
16 inote = cpspch(p5) ; p5=freq
17
18 k3 linseg 0, idel1, p9, isus, p9, irel, 0 ; p6=attack time
19 k2 oscil k3, p8, 1 ; p7=release time
20 k1 linen iscale, p6, p3, p7 ; p8=vib rate
21
22 a3 oscil k1, inote*.999+k2, ifunc ; p9=vib depth
23 a2 oscil k1, inote*1.001+k2, ifunc ; p10=vib delay (0-1)
24 a1 oscil k1, inote+k2, ifunc
25
26 out a1+a2+a3
27
28 endin
29
30 </CsInstruments>
31 <CsScore>
32
33 f1 0 2048 10 1 ; Sine
34
35 f2 0 2048 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111 ; Sawtooth
36
37 f3 0 2048 10 1 0 0.3 0 0.2 0 0.14 0 .111 ; Square
38
39 f4 0 2048 10 1 1 1 1 0.7 0.5 0.3 0.1 ; Pulse
40
41
42
43 ;ins strt dur amp frq atk rel vbrt vbdpt vibdl waveform
44
45 i6 0 2 86 8.00 .03 .7 6 9 .8 1
46
47 i6 3 2 86 8.02 .03 .7 6 9 .8 2
48
49 i6 6 2 86 8.04 .03 .7 6 9 .8 3
50
51 i6 9 3 86 8.05 .03 .7 6 9 .8
52
53 </CsScore>
54 </CsoundSynthesizer>