Debian Codegraph @

src/Examples/McCurdy Collection/Miscellaneous/rtclock.csd

raw
1 ;Written by Iain McCurdy, 2008
2
3 ;Modified for QuteCsound by René, February 2011
4 ;Tested on Ubuntu 10.04 with csound-float 5.13.0 and QuteCsound svn rev 817
5
6 ;Notes on modifications from original csd:
7
8
9 ;my flags on Ubuntu: -odac -b1024 -B2048 -+rtaudio=alsa -+rtmidi=null -m0
10 <CsoundSynthesizer>
11 <CsOptions>
12
13 </CsOptions>
14 <CsInstruments>
15 sr = 44100 ;SAMPLE RATE
16 ksmps = 10 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
17 nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
18
19
20 instr 1
21 ktime rtclock
22 outvalue "Clock", ktime
23 endin
24 </CsInstruments>
25 <CsScore>
26 f 0 3600 ;REAL TIME FOR 1 HOUR
27 </CsScore>
28 </CsoundSynthesizer>
29 <bsbPanel>
30 <label>Widgets</label>
31 <objectName/>
32 <x>1159</x>
33 <y>174</y>
34 <width>520</width>
35 <height>221</height>
36 <visible>true</visible>
37 <uuid/>
38 <bgcolor mode="background">
39 <r>241</r>
40 <g>226</g>
41 <b>185</b>
42 </bgcolor>
43 <bsbObject version="2" type="BSBLabel">
44 <objectName/>
45 <x>2</x>
46 <y>2</y>
47 <width>514</width>
48 <height>219</height>
49 <uuid>{049f4dd4-ff71-4d6d-9157-43c84efad8a4}</uuid>
50 <visible>true</visible>
51 <midichan>0</midichan>
52 <midicc>0</midicc>
53 <label>rtclock</label>
54 <alignment>center</alignment>
55 <font>Liberation Sans</font>
56 <fontsize>18</fontsize>
57 <precision>3</precision>
58 <color>
59 <r>255</r>
60 <g>255</g>
61 <b>255</b>
62 </color>
63 <bgcolor mode="background">
64 <r>5</r>
65 <g>27</g>
66 <b>150</b>
67 </bgcolor>
68 <bordermode>border</bordermode>
69 <borderradius>5</borderradius>
70 <borderwidth>2</borderwidth>
71 </bsbObject>
72 <bsbObject version="2" type="BSBButton">
73 <objectName/>
74 <x>10</x>
75 <y>10</y>
76 <width>100</width>
77 <height>30</height>
78 <uuid>{9d29ab85-85e6-462e-8761-1ac91e1af325}</uuid>
79 <visible>true</visible>
80 <midichan>0</midichan>
81 <midicc>0</midicc>
82 <type>event</type>
83 <pressedValue>1.00000000</pressedValue>
84 <stringvalue/>
85 <text> ON / OFF</text>
86 <image>/</image>
87 <eventLine>i 1 0 -1</eventLine>
88 <latch>true</latch>
89 <latched>false</latched>
90 </bsbObject>
91 <bsbObject version="2" type="BSBLabel">
92 <objectName/>
93 <x>152</x>
94 <y>43</y>
95 <width>100</width>
96 <height>30</height>
97 <uuid>{78a7e9cd-fb57-421c-8e1f-40b60a90dfc0}</uuid>
98 <visible>true</visible>
99 <midichan>0</midichan>
100 <midicc>0</midicc>
101 <label>CLOCK:</label>
102 <alignment>right</alignment>
103 <font>Liberation Sans</font>
104 <fontsize>12</fontsize>
105 <precision>3</precision>
106 <color>
107 <r>255</r>
108 <g>255</g>
109 <b>255</b>
110 </color>
111 <bgcolor mode="nobackground">
112 <r>255</r>
113 <g>255</g>
114 <b>255</b>
115 </bgcolor>
116 <bordermode>noborder</bordermode>
117 <borderradius>1</borderradius>
118 <borderwidth>1</borderwidth>
119 </bsbObject>
120 <bsbObject version="2" type="BSBDisplay">
121 <objectName>Clock</objectName>
122 <x>258</x>
123 <y>43</y>
124 <width>60</width>
125 <height>30</height>
126 <uuid>{58265963-6245-459e-8071-9ed8bba850a4}</uuid>
127 <visible>true</visible>
128 <midichan>0</midichan>
129 <midicc>0</midicc>
130 <label>17.019</label>
131 <alignment>center</alignment>
132 <font>Liberation Sans</font>
133 <fontsize>14</fontsize>
134 <precision>3</precision>
135 <color>
136 <r>0</r>
137 <g>0</g>
138 <b>0</b>
139 </color>
140 <bgcolor mode="background">
141 <r>255</r>
142 <g>255</g>
143 <b>255</b>
144 </bgcolor>
145 <bordermode>border</bordermode>
146 <borderradius>1</borderradius>
147 <borderwidth>1</borderwidth>
148 </bsbObject>
149 <bsbObject version="2" type="BSBLabel">
150 <objectName/>
151 <x>8</x>
152 <y>75</y>
153 <width>502</width>
154 <height>144</height>
155 <uuid>{cb746b47-8fae-4a67-a248-b3caaa7d4853}</uuid>
156 <visible>true</visible>
157 <midichan>0</midichan>
158 <midicc>0</midicc>
159 <label>--------------------------------------------------------------------------------------------------------------------------
160 rtclock is an opcode that outputs the a time value corresponding to the time elapsed since the beginning of the current Csound performance.
161 In this example the 'On/Off' button turns on and off the instrument that updates the 'CLOCK' display. You will notice that while this instrument is off the clock continues to run.
162 The resolution of the clock output varies from operating system to operating system.</label>
163 <alignment>left</alignment>
164 <font>Liberation Sans</font>
165 <fontsize>14</fontsize>
166 <precision>3</precision>
167 <color>
168 <r>255</r>
169 <g>255</g>
170 <b>255</b>
171 </color>
172 <bgcolor mode="nobackground">
173 <r>255</r>
174 <g>255</g>
175 <b>255</b>
176 </bgcolor>
177 <bordermode>noborder</bordermode>
178 <borderradius>1</borderradius>
179 <borderwidth>1</borderwidth>
180 </bsbObject>
181 </bsbPanel>
182 <bsbPresets>
183 </bsbPresets>
184 <EventPanel name="" tempo="60.00000000" loop="8.00000000" x="913" y="162" width="655" height="346" visible="true" loopStart="0" loopEnd="0"> </EventPanel>