Debian Codegraph @

src/Examples/CsoundQt/Getting Started/Toots/Toot2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5 ; Adapted from Richard Boulanger's toots
6 sr = 44100
7 ksmps = 128
8 nchnls = 2
9 0dbfs = 1
10
11 instr 2
12
13 a1 oscil p4, p5, 1 ; p4=amp
14 ; p5=freq
15 outs a1, a1
16
17 endin
18
19 </CsInstruments>
20 <CsScore>
21 ; number time size GEN p1
22 f 1 0 4096 10 1 ; use GEN10 to compute a sine wave
23
24 ;ins strt dur amp(p4) freq(p5)
25
26 i2 0 1 0.02 880
27
28 i2 1.5 1 0.05 440
29
30 i2 3 1 0.1 220
31
32 i2 4.5 1 0.3 110
33
34 i2 6 1 0.6 55
35 e ; indicates the end of the score
36 </CsScore>
37 </CsoundSynthesizer>
38 <bsbPanel>
39 <label>Widgets</label>
40 <objectName/>
41 <x>682</x>
42 <y>176</y>
43 <width>410</width>
44 <height>517</height>
45 <visible>true</visible>
46 <uuid/>
47 <bgcolor mode="background">
48 <r>7</r>
49 <g>95</g>
50 <b>162</b>
51 </bgcolor>
52 <bsbObject version="2" type="BSBLabel">
53 <objectName/>
54 <x>14</x>
55 <y>12</y>
56 <width>100</width>
57 <height>29</height>
58 <uuid>{a1609ca5-b02b-4a7d-8de9-009ee87732c0}</uuid>
59 <visible>true</visible>
60 <midichan>0</midichan>
61 <midicc>-3</midicc>
62 <label>Toot 2</label>
63 <alignment>left</alignment>
64 <font>DejaVu Sans</font>
65 <fontsize>18</fontsize>
66 <precision>3</precision>
67 <color>
68 <r>241</r>
69 <g>241</g>
70 <b>241</b>
71 </color>
72 <bgcolor mode="nobackground">
73 <r>255</r>
74 <g>255</g>
75 <b>255</b>
76 </bgcolor>
77 <bordermode>noborder</bordermode>
78 <borderradius>1</borderradius>
79 <borderwidth>1</borderwidth>
80 </bsbObject>
81 <bsbObject version="2" type="BSBLabel">
82 <objectName/>
83 <x>14</x>
84 <y>43</y>
85 <width>365</width>
86 <height>137</height>
87 <uuid>{6b920917-5c17-43ab-86e8-31731a2daba1}</uuid>
88 <visible>true</visible>
89 <midichan>0</midichan>
90 <midicc>-3</midicc>
91 <label>The first instrument was not interesting because it could play only one note at one amplitude level. We can make things more interesting by allowing the pitch and amplitude to be defined by parameters in the score. Each column in the score constitutes a parameter field, numbered from the left. The first three parameter fields of the i statement have a reserved function:</label>
92 <alignment>left</alignment>
93 <font>DejaVu Sans</font>
94 <fontsize>12</fontsize>
95 <precision>3</precision>
96 <color>
97 <r>241</r>
98 <g>241</g>
99 <b>241</b>
100 </color>
101 <bgcolor mode="nobackground">
102 <r>255</r>
103 <g>255</g>
104 <b>255</b>
105 </bgcolor>
106 <bordermode>noborder</bordermode>
107 <borderradius>1</borderradius>
108 <borderwidth>1</borderwidth>
109 </bsbObject>
110 <bsbObject version="2" type="BSBScope">
111 <objectName/>
112 <x>53</x>
113 <y>351</y>
114 <width>292</width>
115 <height>96</height>
116 <uuid>{b7fc2c2a-bda9-48e2-b915-8912dfa607da}</uuid>
117 <visible>true</visible>
118 <midichan>0</midichan>
119 <midicc>-3</midicc>
120 <value>-255.00000000</value>
121 <type>scope</type>
122 <zoomx>2.00000000</zoomx>
123 <zoomy>1.00000000</zoomy>
124 <dispx>1.00000000</dispx>
125 <dispy>1.00000000</dispy>
126 <mode>0.00000000</mode>
127 </bsbObject>
128 <bsbObject version="2" type="BSBLabel">
129 <objectName/>
130 <x>81</x>
131 <y>179</y>
132 <width>178</width>
133 <height>24</height>
134 <uuid>{3029358c-060c-4064-acb5-072298e2ff7f}</uuid>
135 <visible>true</visible>
136 <midichan>0</midichan>
137 <midicc>-3</midicc>
138 <label>p1 = instrument number</label>
139 <alignment>left</alignment>
140 <font>DejaVu Sans</font>
141 <fontsize>12</fontsize>
142 <precision>3</precision>
143 <color>
144 <r>241</r>
145 <g>241</g>
146 <b>241</b>
147 </color>
148 <bgcolor mode="nobackground">
149 <r>255</r>
150 <g>255</g>
151 <b>255</b>
152 </bgcolor>
153 <bordermode>noborder</bordermode>
154 <borderradius>1</borderradius>
155 <borderwidth>1</borderwidth>
156 </bsbObject>
157 <bsbObject version="2" type="BSBLabel">
158 <objectName/>
159 <x>11</x>
160 <y>248</y>
161 <width>367</width>
162 <height>102</height>
163 <uuid>{e8b52b03-a949-4943-bcba-8f5befad299f}</uuid>
164 <visible>true</visible>
165 <midichan>0</midichan>
166 <midicc>-3</midicc>
167 <label>All other parameter fields are determined by the way the sound designer defines his instrument. In the instrument below, the oscillator's amplitude argument is replaced by p4 and the frequency argument by p5. Now we can change these values at i-time, i.e. with each note in the score. </label>
168 <alignment>left</alignment>
169 <font>DejaVu Sans</font>
170 <fontsize>12</fontsize>
171 <precision>3</precision>
172 <color>
173 <r>241</r>
174 <g>241</g>
175 <b>241</b>
176 </color>
177 <bgcolor mode="nobackground">
178 <r>255</r>
179 <g>255</g>
180 <b>255</b>
181 </bgcolor>
182 <bordermode>noborder</bordermode>
183 <borderradius>1</borderradius>
184 <borderwidth>1</borderwidth>
185 </bsbObject>
186 <bsbObject version="2" type="BSBLabel">
187 <objectName/>
188 <x>81</x>
189 <y>202</y>
190 <width>178</width>
191 <height>24</height>
192 <uuid>{59ac597e-f4be-4388-8891-2b0435879342}</uuid>
193 <visible>true</visible>
194 <midichan>0</midichan>
195 <midicc>-3</midicc>
196 <label>p2 = start time</label>
197 <alignment>left</alignment>
198 <font>DejaVu Sans</font>
199 <fontsize>12</fontsize>
200 <precision>3</precision>
201 <color>
202 <r>241</r>
203 <g>241</g>
204 <b>241</b>
205 </color>
206 <bgcolor mode="nobackground">
207 <r>255</r>
208 <g>255</g>
209 <b>255</b>
210 </bgcolor>
211 <bordermode>noborder</bordermode>
212 <borderradius>1</borderradius>
213 <borderwidth>1</borderwidth>
214 </bsbObject>
215 <bsbObject version="2" type="BSBLabel">
216 <objectName/>
217 <x>80</x>
218 <y>225</y>
219 <width>178</width>
220 <height>24</height>
221 <uuid>{a777903c-4538-4644-80f3-4b4af3356502}</uuid>
222 <visible>true</visible>
223 <midichan>0</midichan>
224 <midicc>-3</midicc>
225 <label>p3 = duration</label>
226 <alignment>left</alignment>
227 <font>DejaVu Sans</font>
228 <fontsize>12</fontsize>
229 <precision>3</precision>
230 <color>
231 <r>241</r>
232 <g>241</g>
233 <b>241</b>
234 </color>
235 <bgcolor mode="nobackground">
236 <r>255</r>
237 <g>255</g>
238 <b>255</b>
239 </bgcolor>
240 <bordermode>noborder</bordermode>
241 <borderradius>1</borderradius>
242 <borderwidth>1</borderwidth>
243 </bsbObject>
244 </bsbPanel>
245 <bsbPresets>
246 </bsbPresets>