Debian Codegraph @

src/Examples/CsoundQt/Widgets/Display_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 gibeats init 0
12
13 instr 1 ; Always on
14 ktime timeinsts
15 ktempo invalue "tempo"
16 outvalue "time", ktime
17
18 kfreq = ktempo/60
19 ktrig metro kfreq
20 schedkwhen ktrig, 0.5, 1, 2, 0, 0.5
21 endin
22
23 instr 2 ; triggered once every second from instr 1
24 gibeats = gibeats + 1
25 ibar = int(gibeats/4)
26 ibeat = (gibeats % 4) + 1
27 Sloc sprintf "Bar:Beat - %i:%i", ibar, ibeat
28 outvalue "location", Sloc
29 turnoff
30 endin
31
32
33 </CsInstruments>
34 <CsScore>
35 i 1 0 3600
36 </CsScore>
37 </CsoundSynthesizer>
38
39
40 <bsbPanel>
41 <label>Widgets</label>
42 <objectName/>
43 <x>292</x>
44 <y>90</y>
45 <width>435</width>
46 <height>298</height>
47 <visible>true</visible>
48 <uuid/>
49 <bgcolor mode="background">
50 <r>195</r>
51 <g>210</g>
52 <b>220</b>
53 </bgcolor>
54 <bsbObject version="2" type="BSBLabel">
55 <objectName/>
56 <x>82</x>
57 <y>5</y>
58 <width>211</width>
59 <height>40</height>
60 <uuid>{8910a9af-b5e5-40df-a55d-f3ccb55c17be}</uuid>
61 <visible>true</visible>
62 <midichan>0</midichan>
63 <midicc>-3</midicc>
64 <description/>
65 <label>Display Widget</label>
66 <alignment>center</alignment>
67 <valignment>top</valignment>
68 <font>Arial</font>
69 <fontsize>24</fontsize>
70 <precision>3</precision>
71 <color>
72 <r>0</r>
73 <g>0</g>
74 <b>0</b>
75 </color>
76 <bgcolor mode="nobackground">
77 <r>191</r>
78 <g>204</g>
79 <b>234</b>
80 </bgcolor>
81 <bordermode>noborder</bordermode>
82 <borderradius>1</borderradius>
83 <borderwidth>0</borderwidth>
84 </bsbObject>
85 <bsbObject version="2" type="BSBLabel">
86 <objectName/>
87 <x>6</x>
88 <y>45</y>
89 <width>362</width>
90 <height>58</height>
91 <uuid>{e525e33c-5cae-41a8-ac9d-80bcae4880c0}</uuid>
92 <visible>true</visible>
93 <midichan>0</midichan>
94 <midicc>-3</midicc>
95 <description/>
96 <label>Display widgets are labels whose value can be set from Csound through channels. The Display Widget can display both numbers and text.</label>
97 <alignment>left</alignment>
98 <valignment>center</valignment>
99 <font>Liberation Sans</font>
100 <fontsize>12</fontsize>
101 <precision>3</precision>
102 <color>
103 <r>0</r>
104 <g>0</g>
105 <b>0</b>
106 </color>
107 <bgcolor mode="background">
108 <r>184</r>
109 <g>195</g>
110 <b>200</b>
111 </bgcolor>
112 <bordermode>false</bordermode>
113 <borderradius>5</borderradius>
114 <borderwidth>0</borderwidth>
115 </bsbObject>
116 <bsbObject version="2" type="BSBLabel">
117 <objectName/>
118 <x>87</x>
119 <y>117</y>
120 <width>116</width>
121 <height>29</height>
122 <uuid>{b0670b97-c937-4c65-9751-c2aeaf31107b}</uuid>
123 <visible>true</visible>
124 <midichan>0</midichan>
125 <midicc>-3</midicc>
126 <description/>
127 <label>Time elapsed:</label>
128 <alignment>right</alignment>
129 <valignment>top</valignment>
130 <font>Arial</font>
131 <fontsize>12</fontsize>
132 <precision>3</precision>
133 <color>
134 <r>0</r>
135 <g>0</g>
136 <b>0</b>
137 </color>
138 <bgcolor mode="nobackground">
139 <r>255</r>
140 <g>255</g>
141 <b>255</b>
142 </bgcolor>
143 <bordermode>noborder</bordermode>
144 <borderradius>1</borderradius>
145 <borderwidth>0</borderwidth>
146 </bsbObject>
147 <bsbObject version="2" type="BSBHSlider">
148 <objectName>tempo</objectName>
149 <x>6</x>
150 <y>153</y>
151 <width>249</width>
152 <height>26</height>
153 <uuid>{e577cd24-27ff-47d4-9e61-8d53430df5f2}</uuid>
154 <visible>true</visible>
155 <midichan>0</midichan>
156 <midicc>-3</midicc>
157 <description/>
158 <minimum>30.00000000</minimum>
159 <maximum>180.00000000</maximum>
160 <value>93.25301205</value>
161 <mode>lin</mode>
162 <mouseControl act="jump">continuous</mouseControl>
163 <resolution>-1.00000000</resolution>
164 <randomizable group="0">true</randomizable>
165 </bsbObject>
166 <bsbObject version="2" type="BSBLabel">
167 <objectName/>
168 <x>117</x>
169 <y>178</y>
170 <width>80</width>
171 <height>25</height>
172 <uuid>{c23fb7ff-a3d4-4e89-9628-1b0f3221e3db}</uuid>
173 <visible>true</visible>
174 <midichan>0</midichan>
175 <midicc>-3</midicc>
176 <description/>
177 <label>Tempo</label>
178 <alignment>left</alignment>
179 <valignment>top</valignment>
180 <font>Arial</font>
181 <fontsize>10</fontsize>
182 <precision>3</precision>
183 <color>
184 <r>0</r>
185 <g>0</g>
186 <b>0</b>
187 </color>
188 <bgcolor mode="nobackground">
189 <r>255</r>
190 <g>255</g>
191 <b>255</b>
192 </bgcolor>
193 <bordermode>noborder</bordermode>
194 <borderradius>1</borderradius>
195 <borderwidth>0</borderwidth>
196 </bsbObject>
197 <bsbObject version="2" type="BSBLabel">
198 <objectName/>
199 <x>326</x>
200 <y>153</y>
201 <width>49</width>
202 <height>25</height>
203 <uuid>{5de22031-4f6c-49d1-b5ac-d4512bc4d7ad}</uuid>
204 <visible>true</visible>
205 <midichan>0</midichan>
206 <midicc>-3</midicc>
207 <description/>
208 <label>bpm</label>
209 <alignment>left</alignment>
210 <valignment>top</valignment>
211 <font>Arial</font>
212 <fontsize>12</fontsize>
213 <precision>3</precision>
214 <color>
215 <r>0</r>
216 <g>0</g>
217 <b>0</b>
218 </color>
219 <bgcolor mode="nobackground">
220 <r>255</r>
221 <g>255</g>
222 <b>255</b>
223 </bgcolor>
224 <bordermode>noborder</bordermode>
225 <borderradius>1</borderradius>
226 <borderwidth>0</borderwidth>
227 </bsbObject>
228 <bsbObject version="2" type="BSBDisplay">
229 <objectName>time</objectName>
230 <x>203</x>
231 <y>111</y>
232 <width>166</width>
233 <height>35</height>
234 <uuid>{c21e0e5c-fe9a-442a-838c-3cc6a6a79766}</uuid>
235 <visible>true</visible>
236 <midichan>0</midichan>
237 <midicc>-3</midicc>
238 <description/>
239 <label>14.721</label>
240 <alignment>center</alignment>
241 <valignment>center</valignment>
242 <font>Liberation Mono</font>
243 <fontsize>20</fontsize>
244 <precision>3</precision>
245 <color>
246 <r>0</r>
247 <g>0</g>
248 <b>0</b>
249 </color>
250 <bgcolor mode="background">
251 <r>221</r>
252 <g>240</g>
253 <b>226</b>
254 </bgcolor>
255 <bordermode>false</bordermode>
256 <borderradius>5</borderradius>
257 <borderwidth>0</borderwidth>
258 </bsbObject>
259 <bsbObject version="2" type="BSBDisplay">
260 <objectName>location</objectName>
261 <x>10</x>
262 <y>205</y>
263 <width>367</width>
264 <height>48</height>
265 <uuid>{12fa0947-bffd-4521-8e3b-93f0a01c7861}</uuid>
266 <visible>true</visible>
267 <midichan>0</midichan>
268 <midicc>-3</midicc>
269 <description/>
270 <label>Bar:Beat - 5:2</label>
271 <alignment>center</alignment>
272 <valignment>center</valignment>
273 <font>Liberation Sans</font>
274 <fontsize>24</fontsize>
275 <precision>3</precision>
276 <color>
277 <r>170</r>
278 <g>255</g>
279 <b>127</b>
280 </color>
281 <bgcolor mode="background">
282 <r>50</r>
283 <g>55</g>
284 <b>60</b>
285 </bgcolor>
286 <bordermode>false</bordermode>
287 <borderradius>5</borderradius>
288 <borderwidth>0</borderwidth>
289 </bsbObject>
290 <bsbObject version="2" type="BSBDisplay">
291 <objectName>tempo</objectName>
292 <x>259</x>
293 <y>153</y>
294 <width>68</width>
295 <height>26</height>
296 <uuid>{cacc9d21-8be0-474f-a070-8a5be7834973}</uuid>
297 <visible>true</visible>
298 <midichan>0</midichan>
299 <midicc>-3</midicc>
300 <description/>
301 <label>93.253</label>
302 <alignment>right</alignment>
303 <valignment>top</valignment>
304 <font>Arial</font>
305 <fontsize>12</fontsize>
306 <precision>3</precision>
307 <color>
308 <r>0</r>
309 <g>0</g>
310 <b>0</b>
311 </color>
312 <bgcolor mode="nobackground">
313 <r>255</r>
314 <g>255</g>
315 <b>255</b>
316 </bgcolor>
317 <bordermode>noborder</bordermode>
318 <borderradius>1</borderradius>
319 <borderwidth>0</borderwidth>
320 </bsbObject>
321 </bsbPanel>
322 <bsbPresets>
323 </bsbPresets>