Debian Codegraph @

src/Examples/CsoundQt/Widgets/Graph_Widget-old.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 instr 20
12 ktab invalue "tabnum" ; table number selected
13 kspectrum invalue "spectrum" ;spectrum checkbox
14 if (ktab>5 || ktab<1) then
15 ktab = 1 ; only allow existing tables
16 endif
17 asig oscilikt 0.2, 440, ktab
18 outs asig*0.1,asig*0.1
19 dispfft asig, 0.5, 1024 ;calculate spectrum
20 if (kspectrum == 1) then
21 ktab = -5 ;set to show graph index 5
22 endif
23 ktrig metro 2
24 if ktrig == 1 then
25 outvalue "graph", -ktab ;show appropriate graph
26 endif
27 endin
28
29 </CsInstruments>
30 <CsScore>
31 f 1 0 1024 10 1 ;sine
32 f 2 0 1024 10 1 0.5 0.333
33 f 3 0 1024 10 1 0 0.333 0 0.25
34 f 4 0 1024 7 1 512 1 0 -1 512 -1 ;square
35 f 5 0 1024 7 1 1024 -1 ;saw
36
37 i 20 0 3600
38
39 </CsScore>
40 </CsoundSynthesizer><bsbPanel>
41 <label>Widgets</label>
42 <objectName/>
43 <x>249</x>
44 <y>230</y>
45 <width>706</width>
46 <height>474</height>
47 <visible>true</visible>
48 <uuid/>
49 <bgcolor mode="background" >
50 <r>138</r>
51 <g>149</g>
52 <b>156</b>
53 </bgcolor>
54 <bsbObject version="2" type="BSBGraph" >
55 <objectName>graph</objectName>
56 <x>389</x>
57 <y>98</y>
58 <width>292</width>
59 <height>142</height>
60 <uuid>{22cb97ab-2ca3-4c1d-8261-438750bdafb7}</uuid>
61 <visible>true</visible>
62 <midichan>0</midichan>
63 <midicc>-3</midicc>
64 <value>5</value>
65 <objectName2>graph_ft</objectName2>
66 <zoomx>1.00000000</zoomx>
67 <zoomy>1.00000000</zoomy>
68 <dispx>1.00000000</dispx>
69 <dispy>1.00000000</dispy>
70 <modex>lin</modex>
71 <modey>lin</modey>
72 <all>true</all>
73 </bsbObject>
74 <bsbObject version="2" type="BSBLabel" >
75 <objectName/>
76 <x>69</x>
77 <y>4</y>
78 <width>559</width>
79 <height>40</height>
80 <uuid>{8089dfa0-23c8-499b-9574-c5448e6c9b31}</uuid>
81 <visible>true</visible>
82 <midichan>0</midichan>
83 <midicc>-3</midicc>
84 <label>Graph Widget</label>
85 <alignment>center</alignment>
86 <font>Helvetica</font>
87 <fontsize>24</fontsize>
88 <precision>3</precision>
89 <color>
90 <r>0</r>
91 <g>0</g>
92 <b>0</b>
93 </color>
94 <bgcolor mode="nobackground" >
95 <r>191</r>
96 <g>204</g>
97 <b>234</b>
98 </bgcolor>
99 <bordermode>noborder</bordermode>
100 <borderradius>1</borderradius>
101 <borderwidth>1</borderwidth>
102 </bsbObject>
103 <bsbObject version="2" type="BSBLabel" >
104 <objectName/>
105 <x>7</x>
106 <y>41</y>
107 <width>376</width>
108 <height>199</height>
109 <uuid>{0c1459a8-a5dd-4f20-8ac4-c6db15ad3fbc}</uuid>
110 <visible>true</visible>
111 <midichan>0</midichan>
112 <midicc>-3</midicc>
113 <label>Graph Widgets display Csound's tables. The currently visible table can be changed by sending values on the widget's channel. Positive values change the table by index and negative values change the table by f-table number. The second channel can be used to display tables by f-table number instead of index. The displayed table can also be changed with the mouse using the menu on the upper left corner. Doing this will produce output on both channels.
114 Graph widgets can also show the spectrum from signals using the dispfft opcode, or time varying signals (a-rate and k-rate) using the display opcode.</label>
115 <alignment>left</alignment>
116 <font>Arial</font>
117 <fontsize>14</fontsize>
118 <precision>3</precision>
119 <color>
120 <r>0</r>
121 <g>0</g>
122 <b>0</b>
123 </color>
124 <bgcolor mode="background" >
125 <r>191</r>
126 <g>204</g>
127 <b>234</b>
128 </bgcolor>
129 <bordermode>noborder</bordermode>
130 <borderradius>5</borderradius>
131 <borderwidth>1</borderwidth>
132 </bsbObject>
133 <bsbObject version="2" type="BSBSpinBox" >
134 <objectName>tabnum</objectName>
135 <x>479</x>
136 <y>244</y>
137 <width>45</width>
138 <height>25</height>
139 <uuid>{c5184ca2-1e56-4172-93fb-2cb07b8446d9}</uuid>
140 <visible>true</visible>
141 <midichan>0</midichan>
142 <midicc>-3</midicc>
143 <alignment>left</alignment>
144 <font>Lucida Grande</font>
145 <fontsize>12</fontsize>
146 <color>
147 <r>0</r>
148 <g>0</g>
149 <b>0</b>
150 </color>
151 <bgcolor mode="nobackground" >
152 <r>255</r>
153 <g>255</g>
154 <b>255</b>
155 </bgcolor>
156 <resolution>1.00000000</resolution>
157 <minimum>1</minimum>
158 <maximum>5</maximum>
159 <randomizable group="0" >false</randomizable>
160 <value>3</value>
161 </bsbObject>
162 <bsbObject version="2" type="BSBLabel" >
163 <objectName/>
164 <x>390</x>
165 <y>244</y>
166 <width>91</width>
167 <height>26</height>
168 <uuid>{713fa927-1f41-48d2-9a62-9917b1394f7a}</uuid>
169 <visible>true</visible>
170 <midichan>0</midichan>
171 <midicc>-3</midicc>
172 <label>Use f-table</label>
173 <alignment>right</alignment>
174 <font>Arial</font>
175 <fontsize>10</fontsize>
176 <precision>3</precision>
177 <color>
178 <r>0</r>
179 <g>0</g>
180 <b>0</b>
181 </color>
182 <bgcolor mode="nobackground" >
183 <r>255</r>
184 <g>255</g>
185 <b>255</b>
186 </bgcolor>
187 <bordermode>noborder</bordermode>
188 <borderradius>1</borderradius>
189 <borderwidth>1</borderwidth>
190 </bsbObject>
191 <bsbObject version="2" type="BSBLabel" >
192 <objectName/>
193 <x>388</x>
194 <y>276</y>
195 <width>294</width>
196 <height>80</height>
197 <uuid>{83a3100c-6bc8-4953-8812-8b41812f6028}</uuid>
198 <visible>true</visible>
199 <midichan>0</midichan>
200 <midicc>-3</midicc>
201 <label>Note that the numbers in the lower section will only have effect if Csound is running as they pass through Csound, while the ones on the top are connected directly by channel number.</label>
202 <alignment>left</alignment>
203 <font>Nimbus Sans L</font>
204 <fontsize>12</fontsize>
205 <precision>3</precision>
206 <color>
207 <r>0</r>
208 <g>0</g>
209 <b>0</b>
210 </color>
211 <bgcolor mode="background" >
212 <r>191</r>
213 <g>204</g>
214 <b>234</b>
215 </bgcolor>
216 <bordermode>noborder</bordermode>
217 <borderradius>5</borderradius>
218 <borderwidth>1</borderwidth>
219 </bsbObject>
220 <bsbObject version="2" type="BSBCheckBox" >
221 <objectName>spectrum</objectName>
222 <x>543</x>
223 <y>249</y>
224 <width>20</width>
225 <height>20</height>
226 <uuid>{856bd0e3-fab2-4aea-bfbf-109f1707a92c}</uuid>
227 <visible>true</visible>
228 <midichan>0</midichan>
229 <midicc>-3</midicc>
230 <selected>true</selected>
231 <label/>
232 <pressedValue>1</pressedValue>
233 <randomizable group="0" >false</randomizable>
234 </bsbObject>
235 <bsbObject version="2" type="BSBLabel" >
236 <objectName/>
237 <x>559</x>
238 <y>247</y>
239 <width>111</width>
240 <height>27</height>
241 <uuid>{fd65e87a-e8e2-4111-a0c9-3a4b758ac437}</uuid>
242 <visible>true</visible>
243 <midichan>0</midichan>
244 <midicc>-3</midicc>
245 <label>Show spectrum</label>
246 <alignment>left</alignment>
247 <font>Arial</font>
248 <fontsize>10</fontsize>
249 <precision>3</precision>
250 <color>
251 <r>0</r>
252 <g>0</g>
253 <b>0</b>
254 </color>
255 <bgcolor mode="nobackground" >
256 <r>255</r>
257 <g>255</g>
258 <b>255</b>
259 </bgcolor>
260 <bordermode>noborder</bordermode>
261 <borderradius>1</borderradius>
262 <borderwidth>1</borderwidth>
263 </bsbObject>
264 <bsbObject version="2" type="BSBGraph" >
265 <objectName>graph_direct</objectName>
266 <x>8</x>
267 <y>245</y>
268 <width>373</width>
269 <height>142</height>
270 <uuid>{5812135b-97d7-4337-8654-8d72fdba2a8a}</uuid>
271 <visible>true</visible>
272 <midichan>0</midichan>
273 <midicc>-3</midicc>
274 <value>0</value>
275 <objectName2>graph_direct_table</objectName2>
276 <zoomx>1.00000000</zoomx>
277 <zoomy>1.00000000</zoomy>
278 <dispx>1.00000000</dispx>
279 <dispy>1.00000000</dispy>
280 <modex>lin</modex>
281 <modey>lin</modey>
282 <all>true</all>
283 </bsbObject>
284 <bsbObject version="2" type="BSBSpinBox" >
285 <objectName>graph_direct</objectName>
286 <x>98</x>
287 <y>395</y>
288 <width>80</width>
289 <height>25</height>
290 <uuid>{4fc79c4a-802a-4463-8920-823beabf229c}</uuid>
291 <visible>true</visible>
292 <midichan>0</midichan>
293 <midicc>-3</midicc>
294 <alignment>left</alignment>
295 <font>DejaVu Sans</font>
296 <fontsize>12</fontsize>
297 <color>
298 <r>0</r>
299 <g>0</g>
300 <b>0</b>
301 </color>
302 <bgcolor mode="nobackground" >
303 <r>255</r>
304 <g>255</g>
305 <b>255</b>
306 </bgcolor>
307 <resolution>1.00000000</resolution>
308 <minimum>-5</minimum>
309 <maximum>5</maximum>
310 <randomizable group="0" >false</randomizable>
311 <value>0</value>
312 </bsbObject>
313 <bsbObject version="2" type="BSBSpinBox" >
314 <objectName>graph_direct_table</objectName>
315 <x>290</x>
316 <y>395</y>
317 <width>80</width>
318 <height>25</height>
319 <uuid>{688dfcfc-c8da-4815-b9ad-952c95e4caac}</uuid>
320 <visible>true</visible>
321 <midichan>0</midichan>
322 <midicc>-3</midicc>
323 <alignment>left</alignment>
324 <font>DejaVu Sans</font>
325 <fontsize>12</fontsize>
326 <color>
327 <r>0</r>
328 <g>0</g>
329 <b>0</b>
330 </color>
331 <bgcolor mode="nobackground" >
332 <r>255</r>
333 <g>255</g>
334 <b>255</b>
335 </bgcolor>
336 <resolution>1.00000000</resolution>
337 <minimum>0</minimum>
338 <maximum>10</maximum>
339 <randomizable group="0" >false</randomizable>
340 <value>-1</value>
341 </bsbObject>
342 <bsbObject version="2" type="BSBLabel" >
343 <objectName/>
344 <x>27</x>
345 <y>395</y>
346 <width>73</width>
347 <height>26</height>
348 <uuid>{18951768-4bc4-46c5-99bc-68bd75158ed4}</uuid>
349 <visible>true</visible>
350 <midichan>0</midichan>
351 <midicc>-3</midicc>
352 <label>Index</label>
353 <alignment>right</alignment>
354 <font>Arial</font>
355 <fontsize>10</fontsize>
356 <precision>3</precision>
357 <color>
358 <r>0</r>
359 <g>0</g>
360 <b>0</b>
361 </color>
362 <bgcolor mode="nobackground" >
363 <r>255</r>
364 <g>255</g>
365 <b>255</b>
366 </bgcolor>
367 <bordermode>noborder</bordermode>
368 <borderradius>1</borderradius>
369 <borderwidth>1</borderwidth>
370 </bsbObject>
371 <bsbObject version="2" type="BSBLabel" >
372 <objectName/>
373 <x>181</x>
374 <y>395</y>
375 <width>111</width>
376 <height>25</height>
377 <uuid>{e241df28-b3f8-488a-aaba-4072ea72e73c}</uuid>
378 <visible>true</visible>
379 <midichan>0</midichan>
380 <midicc>-3</midicc>
381 <label>F-table number</label>
382 <alignment>right</alignment>
383 <font>Arial</font>
384 <fontsize>10</fontsize>
385 <precision>3</precision>
386 <color>
387 <r>0</r>
388 <g>0</g>
389 <b>0</b>
390 </color>
391 <bgcolor mode="nobackground" >
392 <r>255</r>
393 <g>255</g>
394 <b>255</b>
395 </bgcolor>
396 <bordermode>noborder</bordermode>
397 <borderradius>1</borderradius>
398 <borderwidth>1</borderwidth>
399 </bsbObject>
400 </bsbPanel>
401 <bsbPresets>
402 </bsbPresets>
403 <MacGUI>
404 ioView background {35466, 38293, 40092}
405 ioGraph {389, 98} {292, 142} table 5.000000 1.000000 graph
406 ioText {69, 4} {559, 40} label 0.000000 0.00100 "" center "Helvetica" 24 {0, 0, 0} {58880, 56576, 54528} nobackground noborder Graph Widget
407 ioText {7, 41} {376, 199} label 0.000000 0.00100 "" left "Arial" 14 {0, 0, 0} {48896, 52224, 59904} nobackground noborder Graph Widgets display Csound's tables. The currently visible table can be changed by sending values on the widget's channel. Positive values change the table by index and negative values change the table by f-table number. The second channel can be used to display tables by f-table number instead of index. The displayed table can also be changed with the mouse using the menu on the upper left corner. Doing this will produce output on both channels.¬Graph widgets can also show the spectrum from signals using the dispfft opcode, or time varying signals (a-rate and k-rate) using the display opcode.
408 ioText {479, 244} {45, 25} editnum 3.000000 1.000000 "tabnum" left "" 0 {0, 0, 0} {58880, 56576, 54528} nobackground noborder 3.000000
409 ioText {390, 244} {91, 26} label 0.000000 0.00100 "" right "Arial" 10 {0, 0, 0} {58880, 56576, 54528} nobackground noborder Use f-table
410 ioText {388, 276} {294, 80} label 0.000000 0.00100 "" left "Nimbus Sans L" 12 {0, 0, 0} {48896, 52224, 59904} nobackground noborder Note that the numbers in the lower section will only have effect if Csound is running as they pass through Csound, while the ones on the top are connected directly by channel number.
411 ioCheckbox {543, 249} {20, 20} on spectrum
412 ioText {559, 247} {111, 27} label 0.000000 0.00100 "" left "Arial" 10 {0, 0, 0} {58880, 56576, 54528} nobackground noborder Show spectrum
413 ioGraph {8, 245} {373, 142} table 0.000000 1.000000 graph_direct
414 ioText {91, 395} {80, 25} editnum 0.000000 1.000000 "graph_direct" left "" 0 {0, 0, 0} {58880, 56576, 54528} nobackground noborder 0.000000
415 ioText {299, 395} {80, 25} editnum 0.000000 1.000000 "graph_direct_table" left "" 0 {0, 0, 0} {58880, 56576, 54528} nobackground noborder 0.000000
416 ioText {11, 395} {80, 25} label 0.000000 0.00100 "" right "Arial" 10 {0, 0, 0} {58880, 56576, 54528} nobackground noborder Index
417 ioText {188, 395} {111, 25} label 0.000000 0.00100 "" right "Arial" 10 {0, 0, 0} {58880, 56576, 54528} nobackground noborder F-table number
418 </MacGUI>