Debian Codegraph @

src/Examples/CsoundQt/Miscellaneous/Oscillator_Aliasing.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5
6 sr = 44100
7 ksmps = 128
8 nchnls = 2
9 0dbfs = 1
10
11 chn_k "family", 1
12 chn_k "freq", 1
13 chn_k "graph_index", 2
14 chn_k "lvl", 1
15 chn_k "table", 1
16 chn_k "type", 1
17 chn_k "vco2type", 1
18
19 instr 1
20 kfreq chnget "freq"
21 klvl chnget "lvl"
22 kfamily chnget "family"
23 ktype chnget "type"
24 kvco2type chnget "vco2type"
25 ktable chnget "table"
26 ktrig changed ktable, kvco2type
27 if ktrig == 1 then
28 reinit contin
29 endif
30 itable init 0
31 ktable init 0
32 contin:
33 if kfamily == 0 then
34 itable = i(ktable) + 1
35 if ktype == 0 then
36 aout oscil klvl, kfreq, itable
37 elseif ktype == 1 then
38 aout oscili klvl, kfreq, itable
39 elseif ktype == 2 then
40 aout oscil3 klvl, kfreq, itable
41 endif
42 elseif kfamily == 1 then
43 ivcomode = (i(kvco2type) == 0 ? 0 : 10)
44 aout vco2 klvl, kfreq, ivcomode
45 endif
46 rireturn
47
48 dispfft aout*3, 0.3, 4096
49 chnset 9, "graph_index"
50 outs aout, aout
51 endin
52
53
54 </CsInstruments>
55 <CsScore>
56 f 1 0 128 10 1
57 f 2 0 256 10 1
58 f 3 0 512 10 1
59 f 4 0 1024 10 1
60 f 5 0 2048 10 1
61 f 6 0 128 7 1 64 1 0 -1 64 -1
62 f 7 0 2048 7 1 1024 1 0 -1 1024 -1
63 f 8 0 128 7 1 128 -1
64 f 9 0 2048 7 1 2048 -1
65 i 1 0 3600
66 e
67 </CsScore>
68 </CsoundSynthesizer>
69
70 <bsbPanel>
71 <label>Widgets</label>
72 <objectName/>
73 <x>168</x>
74 <y>24</y>
75 <width>632</width>
76 <height>686</height>
77 <visible>true</visible>
78 <uuid/>
79 <bgcolor mode="background">
80 <r>125</r>
81 <g>162</g>
82 <b>160</b>
83 </bgcolor>
84 <bsbObject version="2" type="BSBKnob">
85 <objectName>freq</objectName>
86 <x>23</x>
87 <y>17</y>
88 <width>77</width>
89 <height>64</height>
90 <uuid>{f3f063d0-e763-4241-b7dc-e47faa49b683}</uuid>
91 <visible>true</visible>
92 <midichan>0</midichan>
93 <midicc>-3</midicc>
94 <minimum>40.00000000</minimum>
95 <maximum>6000.00000000</maximum>
96 <value>457.20000000</value>
97 <mode>lin</mode>
98 <mouseControl act="jump">continuous</mouseControl>
99 <resolution>0.01000000</resolution>
100 <randomizable group="0">false</randomizable>
101 </bsbObject>
102 <bsbObject version="2" type="BSBDisplay">
103 <objectName>freq</objectName>
104 <x>22</x>
105 <y>79</y>
106 <width>80</width>
107 <height>25</height>
108 <uuid>{73ca508f-e5c4-490f-8c0a-5b31942e0b1b}</uuid>
109 <visible>true</visible>
110 <midichan>0</midichan>
111 <midicc>-3</midicc>
112 <label>457.200</label>
113 <alignment>center</alignment>
114 <font>DejaVu Sans</font>
115 <fontsize>10</fontsize>
116 <precision>3</precision>
117 <color>
118 <r>0</r>
119 <g>0</g>
120 <b>0</b>
121 </color>
122 <bgcolor mode="nobackground">
123 <r>255</r>
124 <g>255</g>
125 <b>255</b>
126 </bgcolor>
127 <bordermode>noborder</bordermode>
128 <borderradius>1</borderradius>
129 <borderwidth>1</borderwidth>
130 </bsbObject>
131 <bsbObject version="2" type="BSBGraph">
132 <objectName>graph_index</objectName>
133 <x>10</x>
134 <y>124</y>
135 <width>614</width>
136 <height>392</height>
137 <uuid>{e8171400-2abc-4f5d-8e5f-2e0b41527b2e}</uuid>
138 <visible>true</visible>
139 <midichan>0</midichan>
140 <midicc>-3</midicc>
141 <value>9</value>
142 <objectName2/>
143 <zoomx>1.00000000</zoomx>
144 <zoomy>1.00000000</zoomy>
145 <dispx>1.00000000</dispx>
146 <dispy>1.00000000</dispy>
147 <modex>lin</modex>
148 <modey>lin</modey>
149 <all>true</all>
150 </bsbObject>
151 <bsbObject version="2" type="BSBDropdown">
152 <objectName>family</objectName>
153 <x>225</x>
154 <y>44</y>
155 <width>124</width>
156 <height>24</height>
157 <uuid>{c1439ada-3f5f-47da-96f7-767c03edf27d}</uuid>
158 <visible>true</visible>
159 <midichan>0</midichan>
160 <midicc>-3</midicc>
161 <bsbDropdownItemList>
162 <bsbDropdownItem>
163 <name>oscil</name>
164 <value>0</value>
165 <stringvalue/>
166 </bsbDropdownItem>
167 <bsbDropdownItem>
168 <name>vco2</name>
169 <value>1</value>
170 <stringvalue/>
171 </bsbDropdownItem>
172 </bsbDropdownItemList>
173 <selectedIndex>0</selectedIndex>
174 <randomizable group="0">false</randomizable>
175 </bsbObject>
176 <bsbObject version="2" type="BSBLabel">
177 <objectName/>
178 <x>362</x>
179 <y>18</y>
180 <width>132</width>
181 <height>98</height>
182 <uuid>{8ed58262-e6e8-4614-bb91-6a5ea9d98b5c}</uuid>
183 <visible>true</visible>
184 <midichan>0</midichan>
185 <midicc>-3</midicc>
186 <label>Oscil family</label>
187 <alignment>left</alignment>
188 <font>DejaVu Sans</font>
189 <fontsize>10</fontsize>
190 <precision>3</precision>
191 <color>
192 <r>0</r>
193 <g>0</g>
194 <b>0</b>
195 </color>
196 <bgcolor mode="background">
197 <r>157</r>
198 <g>181</g>
199 <b>162</b>
200 </bgcolor>
201 <bordermode>border</bordermode>
202 <borderradius>1</borderradius>
203 <borderwidth>1</borderwidth>
204 </bsbObject>
205 <bsbObject version="2" type="BSBDropdown">
206 <objectName>type</objectName>
207 <x>368</x>
208 <y>40</y>
209 <width>114</width>
210 <height>25</height>
211 <uuid>{d128cdf9-d072-4160-bbb6-3b5b58766976}</uuid>
212 <visible>true</visible>
213 <midichan>0</midichan>
214 <midicc>-3</midicc>
215 <bsbDropdownItemList>
216 <bsbDropdownItem>
217 <name>no interp</name>
218 <value>0</value>
219 <stringvalue/>
220 </bsbDropdownItem>
221 <bsbDropdownItem>
222 <name>linear</name>
223 <value>1</value>
224 <stringvalue/>
225 </bsbDropdownItem>
226 <bsbDropdownItem>
227 <name>cubic</name>
228 <value>2</value>
229 <stringvalue/>
230 </bsbDropdownItem>
231 </bsbDropdownItemList>
232 <selectedIndex>2</selectedIndex>
233 <randomizable group="0">false</randomizable>
234 </bsbObject>
235 <bsbObject version="2" type="BSBDropdown">
236 <objectName>table</objectName>
237 <x>369</x>
238 <y>78</y>
239 <width>114</width>
240 <height>25</height>
241 <uuid>{928fc1c8-3a38-48e2-98bf-9f6abf40e7ee}</uuid>
242 <visible>true</visible>
243 <midichan>0</midichan>
244 <midicc>-3</midicc>
245 <bsbDropdownItemList>
246 <bsbDropdownItem>
247 <name>sine 128 pts</name>
248 <value>0</value>
249 <stringvalue/>
250 </bsbDropdownItem>
251 <bsbDropdownItem>
252 <name>sine 256 pts</name>
253 <value>1</value>
254 <stringvalue/>
255 </bsbDropdownItem>
256 <bsbDropdownItem>
257 <name>sine 512 pts</name>
258 <value>2</value>
259 <stringvalue/>
260 </bsbDropdownItem>
261 <bsbDropdownItem>
262 <name>sine 1024 pts</name>
263 <value>3</value>
264 <stringvalue/>
265 </bsbDropdownItem>
266 <bsbDropdownItem>
267 <name>sine 2048 pts</name>
268 <value>4</value>
269 <stringvalue/>
270 </bsbDropdownItem>
271 <bsbDropdownItem>
272 <name>square 128</name>
273 <value>5</value>
274 <stringvalue/>
275 </bsbDropdownItem>
276 <bsbDropdownItem>
277 <name>square 2048</name>
278 <value>6</value>
279 <stringvalue/>
280 </bsbDropdownItem>
281 <bsbDropdownItem>
282 <name>saw 128</name>
283 <value>7</value>
284 <stringvalue/>
285 </bsbDropdownItem>
286 <bsbDropdownItem>
287 <name>saw 2048</name>
288 <value>8</value>
289 <stringvalue/>
290 </bsbDropdownItem>
291 </bsbDropdownItemList>
292 <selectedIndex>8</selectedIndex>
293 <randomizable group="0">false</randomizable>
294 </bsbObject>
295 <bsbObject version="2" type="BSBLabel">
296 <objectName/>
297 <x>501</x>
298 <y>19</y>
299 <width>122</width>
300 <height>97</height>
301 <uuid>{0cf41946-251a-4a14-aa8f-962365c6dd8a}</uuid>
302 <visible>true</visible>
303 <midichan>0</midichan>
304 <midicc>-3</midicc>
305 <label>Vco2 family</label>
306 <alignment>left</alignment>
307 <font>DejaVu Sans</font>
308 <fontsize>10</fontsize>
309 <precision>3</precision>
310 <color>
311 <r>0</r>
312 <g>0</g>
313 <b>0</b>
314 </color>
315 <bgcolor mode="background">
316 <r>157</r>
317 <g>181</g>
318 <b>162</b>
319 </bgcolor>
320 <bordermode>border</bordermode>
321 <borderradius>1</borderradius>
322 <borderwidth>1</borderwidth>
323 </bsbObject>
324 <bsbObject version="2" type="BSBDropdown">
325 <objectName>vco2type</objectName>
326 <x>510</x>
327 <y>42</y>
328 <width>97</width>
329 <height>25</height>
330 <uuid>{977db827-71cc-4eb3-965b-aad120d8bd01}</uuid>
331 <visible>true</visible>
332 <midichan>0</midichan>
333 <midicc>-3</midicc>
334 <bsbDropdownItemList>
335 <bsbDropdownItem>
336 <name>saw</name>
337 <value>0</value>
338 <stringvalue/>
339 </bsbDropdownItem>
340 <bsbDropdownItem>
341 <name> square</name>
342 <value>1</value>
343 <stringvalue/>
344 </bsbDropdownItem>
345 </bsbDropdownItemList>
346 <selectedIndex>1</selectedIndex>
347 <randomizable group="0">false</randomizable>
348 </bsbObject>
349 <bsbObject version="2" type="BSBLabel">
350 <objectName/>
351 <x>224</x>
352 <y>17</y>
353 <width>124</width>
354 <height>25</height>
355 <uuid>{9f0b962d-d6cc-4317-993b-9b53bc3ac47c}</uuid>
356 <visible>true</visible>
357 <midichan>0</midichan>
358 <midicc>-3</midicc>
359 <label>Oscillator family</label>
360 <alignment>left</alignment>
361 <font>DejaVu Sans</font>
362 <fontsize>14</fontsize>
363 <precision>3</precision>
364 <color>
365 <r>0</r>
366 <g>0</g>
367 <b>0</b>
368 </color>
369 <bgcolor mode="nobackground">
370 <r>255</r>
371 <g>255</g>
372 <b>255</b>
373 </bgcolor>
374 <bordermode>noborder</bordermode>
375 <borderradius>1</borderradius>
376 <borderwidth>1</borderwidth>
377 </bsbObject>
378 <bsbObject version="2" type="BSBDropdown">
379 <objectName>family</objectName>
380 <x>225</x>
381 <y>44</y>
382 <width>124</width>
383 <height>24</height>
384 <uuid>{bf1aebb3-d79d-46c9-84e8-fe90cdfaa1b7}</uuid>
385 <visible>true</visible>
386 <midichan>0</midichan>
387 <midicc>-3</midicc>
388 <bsbDropdownItemList>
389 <bsbDropdownItem>
390 <name>oscil</name>
391 <value>0</value>
392 <stringvalue/>
393 </bsbDropdownItem>
394 <bsbDropdownItem>
395 <name>vco2</name>
396 <value>1</value>
397 <stringvalue/>
398 </bsbDropdownItem>
399 </bsbDropdownItemList>
400 <selectedIndex>0</selectedIndex>
401 <randomizable group="0">false</randomizable>
402 </bsbObject>
403 <bsbObject version="2" type="BSBLabel">
404 <objectName/>
405 <x>225</x>
406 <y>71</y>
407 <width>126</width>
408 <height>47</height>
409 <uuid>{b2f5280d-d686-41c1-bb84-f76d0a6dadc1}</uuid>
410 <visible>true</visible>
411 <midichan>0</midichan>
412 <midicc>-3</midicc>
413 <label>Oscil are table oscillators. Vco2 are bandlimited oscillators</label>
414 <alignment>left</alignment>
415 <font>DejaVu Sans</font>
416 <fontsize>10</fontsize>
417 <precision>3</precision>
418 <color>
419 <r>0</r>
420 <g>0</g>
421 <b>0</b>
422 </color>
423 <bgcolor mode="nobackground">
424 <r>255</r>
425 <g>255</g>
426 <b>255</b>
427 </bgcolor>
428 <bordermode>noborder</bordermode>
429 <borderradius>1</borderradius>
430 <borderwidth>1</borderwidth>
431 </bsbObject>
432 <bsbObject version="2" type="BSBScope">
433 <objectName/>
434 <x>11</x>
435 <y>522</y>
436 <width>613</width>
437 <height>150</height>
438 <uuid>{01df1763-b781-4b18-8a57-a93494946f55}</uuid>
439 <visible>true</visible>
440 <midichan>0</midichan>
441 <midicc>-3</midicc>
442 <value>-255.00000000</value>
443 <type>scope</type>
444 <zoomx>2.00000000</zoomx>
445 <zoomy>3.00000000</zoomy>
446 <dispx>1.00000000</dispx>
447 <dispy>1.00000000</dispy>
448 <mode>0.00000000</mode>
449 </bsbObject>
450 <bsbObject version="2" type="BSBLabel">
451 <objectName/>
452 <x>22</x>
453 <y>96</y>
454 <width>80</width>
455 <height>25</height>
456 <uuid>{61ffec35-7a1d-40ef-bb36-8d3bf776528b}</uuid>
457 <visible>true</visible>
458 <midichan>0</midichan>
459 <midicc>-3</midicc>
460 <label>Freq</label>
461 <alignment>center</alignment>
462 <font>DejaVu Sans</font>
463 <fontsize>10</fontsize>
464 <precision>3</precision>
465 <color>
466 <r>0</r>
467 <g>0</g>
468 <b>0</b>
469 </color>
470 <bgcolor mode="nobackground">
471 <r>255</r>
472 <g>255</g>
473 <b>255</b>
474 </bgcolor>
475 <bordermode>noborder</bordermode>
476 <borderradius>1</borderradius>
477 <borderwidth>1</borderwidth>
478 </bsbObject>
479 <bsbObject version="2" type="BSBKnob">
480 <objectName>lvl</objectName>
481 <x>116</x>
482 <y>18</y>
483 <width>77</width>
484 <height>64</height>
485 <uuid>{172a87cd-e693-49c8-aed0-7a436b62a38e}</uuid>
486 <visible>true</visible>
487 <midichan>0</midichan>
488 <midicc>-3</midicc>
489 <minimum>0.00000000</minimum>
490 <maximum>1.00000000</maximum>
491 <value>0.09000000</value>
492 <mode>lin</mode>
493 <mouseControl act="jump">continuous</mouseControl>
494 <resolution>0.01000000</resolution>
495 <randomizable group="0">false</randomizable>
496 </bsbObject>
497 <bsbObject version="2" type="BSBDisplay">
498 <objectName>lvl</objectName>
499 <x>115</x>
500 <y>80</y>
501 <width>80</width>
502 <height>25</height>
503 <uuid>{6313f989-3573-40bf-82ed-e8cbbc6038ca}</uuid>
504 <visible>true</visible>
505 <midichan>0</midichan>
506 <midicc>-3</midicc>
507 <label>0.090</label>
508 <alignment>center</alignment>
509 <font>DejaVu Sans</font>
510 <fontsize>10</fontsize>
511 <precision>3</precision>
512 <color>
513 <r>0</r>
514 <g>0</g>
515 <b>0</b>
516 </color>
517 <bgcolor mode="nobackground">
518 <r>255</r>
519 <g>255</g>
520 <b>255</b>
521 </bgcolor>
522 <bordermode>noborder</bordermode>
523 <borderradius>1</borderradius>
524 <borderwidth>1</borderwidth>
525 </bsbObject>
526 <bsbObject version="2" type="BSBLabel">
527 <objectName/>
528 <x>115</x>
529 <y>97</y>
530 <width>80</width>
531 <height>25</height>
532 <uuid>{02671c0f-49e6-4501-b58d-47d62f46e581}</uuid>
533 <visible>true</visible>
534 <midichan>0</midichan>
535 <midicc>-3</midicc>
536 <label>Level</label>
537 <alignment>center</alignment>
538 <font>DejaVu Sans</font>
539 <fontsize>10</fontsize>
540 <precision>3</precision>
541 <color>
542 <r>0</r>
543 <g>0</g>
544 <b>0</b>
545 </color>
546 <bgcolor mode="nobackground">
547 <r>255</r>
548 <g>255</g>
549 <b>255</b>
550 </bgcolor>
551 <bordermode>noborder</bordermode>
552 <borderradius>1</borderradius>
553 <borderwidth>1</borderwidth>
554 </bsbObject>
555 </bsbPanel>
556 <bsbPresets>
557 </bsbPresets>