Debian Codegraph @

examples/turnon.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 realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o turnon.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Stefano Cucchi 2020 and Richard Boulanger
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 gasend1 init 0
19 gasend2 init 0
20
21 turnon 100
22 turnon 101
23
24 instr 1
25
26 abar barmodel 2, 2, p4, 0.000001, 0.0103, 20, p5, p6, p7
27 kenvelope expseg 1, p3, .01
28 abar = abar * kenvelope * p8
29 ; NO local output
30
31 gasend1 = gasend1 + abar*p8
32 gasend2 = gasend2 + abar*p8
33
34 endin
35
36
37 instr 2
38
39 idenStart = p4
40 kdensity expseg p4, p3, 0.001
41 apulse mpulse 1, kdensity
42 kenvelope expseg 1, p3, .001
43 apulse = apulse * kenvelope * p5
44 ; NO local output
45
46 gasend1 = gasend1 + apulse
47 gasend2 = gasend2 + apulse
48
49 endin
50
51
52 instr dry
53
54 idryLeft = p4
55 idryRight = p5
56 kgate adsr .01,.01,1,0
57 outs (gasend1*kgate) * p4, (gasend2*kgate) * p5
58
59 endin
60
61
62 instr 100
63
64 aphaser phaser1 gasend1, 4700, 1000, -0.8
65 arevphaser reverb aphaser, 1.618
66 outs arevphaser * 0.2, arevphaser * 0.2
67 clear gasend1
68
69 endin
70
71
72 instr 101
73
74 afold fold gasend2, 26
75 adelfoldL multitap afold, 0.62, 0.52, 1.19, 0.44
76 adelfoldR multitap afold, 0.94, 0.64, 1.42, 0.54
77 outs adelfoldL * 0.5, adelfoldR * 0.5
78 clear gasend2
79
80 endin
81
82 </CsInstruments>
83 <CsScore>
84
85
86
87 i2 0 6 .07 1
88
89 i "dry" 0 2 .87 .2
90
91 i1 3 4 10 0.13 300 0.3 0.8
92
93 i2 7 5 .007 1
94
95 i "dry" 7 3 .12 .86
96
97 i1 11 9 09 0.09 400 0.23 0.78
98
99 i2 15 9 .01 1
100
101
102 i "dry" 15 12 .94 .09
103
104
105 s
106
107
108 i "dry" 0 26.9 .68 .48 ; lowered
109
110 i 2 0.0 4 .07 1
111 i 2 0.1 4 .02 1
112
113 i 1 0.21 1 08 0.13 300 0.3 0.8
114 i 1 2 2 14 0.02 500 0.2 0.7
115
116 i 2 2 5 .06 0.8 ; lowered
117 i 2 4 5 .05 0.7 ; lowered
118 i 2 4 6 .01 0.6 ; lowered
119
120
121 i 1 4.3 3 9 0.08 1145 0.1 0.5 ; lowered
122 i 1 4.5 3 11 0.10 245 0.2 0.4 ; lowered
123
124 i 1 8.00 7 08 0.11 125 0.1 0.6
125 i 1 8.01 6 28 0.13 280 0.3 0.8
126 i 1 8.02 5 39 0.02 600 0.2 0.7
127 i 1 8.03 4 39 0.02 600 0.2 0.7
128
129 i 2 8.24 18 .09 1
130 i 2 8.75 11 .05 1
131 i 2 8.99 4 .01 1
132
133
134
135 i 1 18 9 8.1 0.12 105 0.12 0.56
136 i 1 18.01 8 8.8 0.13 205 0.52 0.46
137
138 i 1 18.02 7 8.2 0.15 745 0.42 0.26
139 i 1 18.03 11 8.3 0.14 905 0.62 0.36
140
141 i "dry" 25 .85 .32 .38
142
143 i 2 25 5 .71 1
144
145 i "dry" 27 .74 .62 .68
146
147 i 2 27 6 .11 1
148
149 i "dry" 32.3 .42 .32 .38
150
151 i 2 32.3 14 .005 1
152
153
154 i 1 36 13 9.9 0.233 333 0.23 0.63
155 i 1 39 12 8.9 0.323 403 0.34 0.53
156 i 1 42 10 7.8 0.123 283 0.42 0.73
157
158 i 1 48.01 9 8.11 0.122 108 0.13 0.54
159 i 1 48.03 8 8.82 0.135 208 0.50 0.44
160 i 1 48.05 7 8.23 0.158 748 0.40 0.24
161 i 1 48.08 11 8.35 0.147 908 0.60 0.34
162
163 e 60 ; score extended to allow for reverb and multitap tails to ring out
164
165 ; keeping instr 100 and instr 101 "turned on" for 60 seconds
166
167 </CsScore>
168 </CsoundSynthesizer>