Debian Codegraph @

src/Examples/CsoundQt/Widgets/Checkbox_Widget.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 1
12 khipass invalue "hipass"
13 klowpass invalue "lowpass"
14 kbandpass invalue "bandpass"
15 asig noise 1, 0
16 if (khipass == 1) then
17 asig atone asig, 3000
18 asig atone asig, 3000
19 asig atone asig, 3000
20 endif
21 if (klowpass == 1) then
22 asig tone asig, 8000
23 asig tone asig, 8000
24 asig tone asig, 8000
25 endif
26 dispfft asig*20, 1/18, 1024
27 outs asig*0.1, asig*0.1
28 endin
29
30 instr 2 ; set checkbox values
31 kstate init 0
32 ktrig metro 1
33 if (ktrig == 1) then
34 kstate = (kstate == 0 ? 1 : 0)
35 endif
36 kenable invalue "enable"
37 if (kenable == 1) then
38 outvalue "checkbox", kstate
39 kenable = 0
40 endif
41 endin
42
43 </CsInstruments>
44 <CsScore>
45 i 1 0 1000
46 i 2 0 1000
47 </CsScore>
48 </CsoundSynthesizer>
49 <bsbPanel>
50 <label>Widgets</label>
51 <objectName/>
52 <x>691</x>
53 <y>154</y>
54 <width>412</width>
55 <height>491</height>
56 <visible>true</visible>
57 <uuid/>
58 <bgcolor mode="background">
59 <r>212</r>
60 <g>223</g>
61 <b>230</b>
62 </bgcolor>
63 <bsbObject version="2" type="BSBLabel">
64 <objectName/>
65 <x>80</x>
66 <y>5</y>
67 <width>247</width>
68 <height>44</height>
69 <uuid>{ad8c5fad-d76a-425a-a10e-4b87d3142e8b}</uuid>
70 <visible>true</visible>
71 <midichan>0</midichan>
72 <midicc>-3</midicc>
73 <description/>
74 <label>Checkbox Widget</label>
75 <alignment>left</alignment>
76 <valignment>top</valignment>
77 <font>Arial</font>
78 <fontsize>24</fontsize>
79 <precision>3</precision>
80 <color>
81 <r>0</r>
82 <g>0</g>
83 <b>0</b>
84 </color>
85 <bgcolor mode="nobackground">
86 <r>191</r>
87 <g>204</g>
88 <b>234</b>
89 </bgcolor>
90 <bordermode>noborder</bordermode>
91 <borderradius>1</borderradius>
92 <borderwidth>0</borderwidth>
93 </bsbObject>
94 <bsbObject version="2" type="BSBLabel">
95 <objectName/>
96 <x>15</x>
97 <y>50</y>
98 <width>500</width>
99 <height>56</height>
100 <uuid>{35d4a9c6-98b9-4783-aed1-9ad640324b68}</uuid>
101 <visible>true</visible>
102 <midichan>0</midichan>
103 <midicc>-3</midicc>
104 <description/>
105 <label>The checkbox widget is a simple widget which sends a value of 1 on its channel when its checked and a 0 when not. It's value can also be set using a channel.</label>
106 <alignment>left</alignment>
107 <valignment>top</valignment>
108 <font>Liberation Sans</font>
109 <fontsize>12</fontsize>
110 <precision>3</precision>
111 <color>
112 <r>0</r>
113 <g>0</g>
114 <b>0</b>
115 </color>
116 <bgcolor mode="background">
117 <r>184</r>
118 <g>195</g>
119 <b>200</b>
120 </bgcolor>
121 <bordermode>false</bordermode>
122 <borderradius>5</borderradius>
123 <borderwidth>0</borderwidth>
124 </bsbObject>
125 <bsbObject version="2" type="BSBLabel">
126 <objectName/>
127 <x>30</x>
128 <y>115</y>
129 <width>80</width>
130 <height>25</height>
131 <uuid>{c9d833b8-a125-42dc-bddd-fe01cedac125}</uuid>
132 <visible>true</visible>
133 <midichan>0</midichan>
134 <midicc>-3</midicc>
135 <description/>
136 <label>Hi Pass filter</label>
137 <alignment>left</alignment>
138 <valignment>top</valignment>
139 <font>Arial</font>
140 <fontsize>10</fontsize>
141 <precision>3</precision>
142 <color>
143 <r>0</r>
144 <g>0</g>
145 <b>0</b>
146 </color>
147 <bgcolor mode="nobackground">
148 <r>255</r>
149 <g>255</g>
150 <b>255</b>
151 </bgcolor>
152 <bordermode>noborder</bordermode>
153 <borderradius>1</borderradius>
154 <borderwidth>0</borderwidth>
155 </bsbObject>
156 <bsbObject version="2" type="BSBLabel">
157 <objectName/>
158 <x>30</x>
159 <y>140</y>
160 <width>80</width>
161 <height>25</height>
162 <uuid>{660ba30b-432e-4ba9-aa47-1fc6de0c1e14}</uuid>
163 <visible>true</visible>
164 <midichan>0</midichan>
165 <midicc>-3</midicc>
166 <description/>
167 <label>Low Pass filter</label>
168 <alignment>left</alignment>
169 <valignment>top</valignment>
170 <font>Arial</font>
171 <fontsize>10</fontsize>
172 <precision>3</precision>
173 <color>
174 <r>0</r>
175 <g>0</g>
176 <b>0</b>
177 </color>
178 <bgcolor mode="nobackground">
179 <r>255</r>
180 <g>255</g>
181 <b>255</b>
182 </bgcolor>
183 <bordermode>noborder</bordermode>
184 <borderradius>1</borderradius>
185 <borderwidth>0</borderwidth>
186 </bsbObject>
187 <bsbObject version="2" type="BSBGraph">
188 <objectName/>
189 <x>15</x>
190 <y>165</y>
191 <width>500</width>
192 <height>300</height>
193 <uuid>{d4ba5f84-006d-44f5-8ad1-4959acf47abb}</uuid>
194 <visible>true</visible>
195 <midichan>0</midichan>
196 <midicc>-3</midicc>
197 <description/>
198 <value>0</value>
199 <objectName2/>
200 <zoomx>1.00000000</zoomx>
201 <zoomy>1.00000000</zoomy>
202 <dispx>1.00000000</dispx>
203 <dispy>1.00000000</dispy>
204 <modex>lin</modex>
205 <modey>lin</modey>
206 <showSelector>true</showSelector>
207 <showGrid>true</showGrid>
208 <showTableInfo>true</showTableInfo>
209 <showScrollbars>true</showScrollbars>
210 <enableTables>true</enableTables>
211 <enableDisplays>true</enableDisplays>
212 <all>true</all>
213 </bsbObject>
214 <bsbObject version="2" type="BSBLabel">
215 <objectName/>
216 <x>15</x>
217 <y>475</y>
218 <width>500</width>
219 <height>96</height>
220 <uuid>{95f875a7-941b-45b5-b4f9-d353d1f2e483}</uuid>
221 <visible>true</visible>
222 <midichan>0</midichan>
223 <midicc>-3</midicc>
224 <description/>
225 <label>Setting the value of a checkbox</label>
226 <alignment>center</alignment>
227 <valignment>top</valignment>
228 <font>Liberation Sans</font>
229 <fontsize>14</fontsize>
230 <precision>3</precision>
231 <color>
232 <r>0</r>
233 <g>0</g>
234 <b>0</b>
235 </color>
236 <bgcolor mode="background">
237 <r>184</r>
238 <g>195</g>
239 <b>200</b>
240 </bgcolor>
241 <bordermode>false</bordermode>
242 <borderradius>5</borderradius>
243 <borderwidth>0</borderwidth>
244 </bsbObject>
245 <bsbObject version="2" type="BSBCheckBox">
246 <objectName>checkbox</objectName>
247 <x>25</x>
248 <y>535</y>
249 <width>22</width>
250 <height>20</height>
251 <uuid>{4784a930-dd88-408c-b5eb-9c17c28e0b5d}</uuid>
252 <visible>true</visible>
253 <midichan>0</midichan>
254 <midicc>-3</midicc>
255 <description/>
256 <selected>true</selected>
257 <label/>
258 <pressedValue>1</pressedValue>
259 <randomizable group="0">false</randomizable>
260 </bsbObject>
261 <bsbObject version="2" type="BSBLabel">
262 <objectName/>
263 <x>40</x>
264 <y>535</y>
265 <width>313</width>
266 <height>28</height>
267 <uuid>{0cea6f98-f6a5-4bba-9a75-2fb84e817366}</uuid>
268 <visible>true</visible>
269 <midichan>0</midichan>
270 <midicc>-3</midicc>
271 <description/>
272 <label>This Checkbox's value is set from Csound</label>
273 <alignment>left</alignment>
274 <valignment>top</valignment>
275 <font>Arial</font>
276 <fontsize>10</fontsize>
277 <precision>3</precision>
278 <color>
279 <r>0</r>
280 <g>0</g>
281 <b>0</b>
282 </color>
283 <bgcolor mode="nobackground">
284 <r>255</r>
285 <g>255</g>
286 <b>255</b>
287 </bgcolor>
288 <bordermode>noborder</bordermode>
289 <borderradius>1</borderradius>
290 <borderwidth>0</borderwidth>
291 </bsbObject>
292 <bsbObject version="2" type="BSBCheckBox">
293 <objectName>enable</objectName>
294 <x>25</x>
295 <y>505</y>
296 <width>21</width>
297 <height>22</height>
298 <uuid>{f773da97-1a7b-4950-aa2b-146323c34897}</uuid>
299 <visible>true</visible>
300 <midichan>0</midichan>
301 <midicc>-3</midicc>
302 <description/>
303 <selected>true</selected>
304 <label/>
305 <pressedValue>1</pressedValue>
306 <randomizable group="0">false</randomizable>
307 </bsbObject>
308 <bsbObject version="2" type="BSBLabel">
309 <objectName/>
310 <x>40</x>
311 <y>505</y>
312 <width>336</width>
313 <height>27</height>
314 <uuid>{6e3bc69c-c7b1-4f5e-a83c-73474a679066}</uuid>
315 <visible>true</visible>
316 <midichan>0</midichan>
317 <midicc>-3</midicc>
318 <description/>
319 <label>Tick this checkbox to enable changing the one below</label>
320 <alignment>left</alignment>
321 <valignment>top</valignment>
322 <font>Arial</font>
323 <fontsize>10</fontsize>
324 <precision>3</precision>
325 <color>
326 <r>0</r>
327 <g>0</g>
328 <b>0</b>
329 </color>
330 <bgcolor mode="nobackground">
331 <r>255</r>
332 <g>255</g>
333 <b>255</b>
334 </bgcolor>
335 <bordermode>noborder</bordermode>
336 <borderradius>1</borderradius>
337 <borderwidth>0</borderwidth>
338 </bsbObject>
339 <bsbObject version="2" type="BSBCheckBox">
340 <objectName>hipass</objectName>
341 <x>15</x>
342 <y>115</y>
343 <width>23</width>
344 <height>20</height>
345 <uuid>{95ffad56-9b0a-4f4d-9698-26fea6b90a73}</uuid>
346 <visible>true</visible>
347 <midichan>0</midichan>
348 <midicc>-3</midicc>
349 <description/>
350 <selected>false</selected>
351 <label/>
352 <pressedValue>1</pressedValue>
353 <randomizable group="0">false</randomizable>
354 </bsbObject>
355 <bsbObject version="2" type="BSBCheckBox">
356 <objectName>lowpass</objectName>
357 <x>15</x>
358 <y>140</y>
359 <width>22</width>
360 <height>19</height>
361 <uuid>{b931c42f-6de4-4e79-add7-eb71793915ab}</uuid>
362 <visible>true</visible>
363 <midichan>0</midichan>
364 <midicc>-3</midicc>
365 <description/>
366 <selected>false</selected>
367 <label/>
368 <pressedValue>1</pressedValue>
369 <randomizable group="0">false</randomizable>
370 </bsbObject>
371 </bsbPanel>
372 <bsbPresets>
373 </bsbPresets>