Debian Codegraph @

src/Examples/McCurdy Collection/LiveAudioIn/ins.csd

raw
1 ;Written by Iain McCurdy
2
3 ; Modified for QuteCsound by René, January 2011
4 ; Tested on Ubuntu 10.04 with csound-float 5.13.0 January 2011 and QuteCsound svn rev 817
5
6
7 ;Notes on modifications from original csd:
8
9
10 ;my flags on Ubuntu: -dm0 -iadc -odac -+rtaudio=jack -b16 -B4096 --expression-opt -+rtmidi=null
11 <CsoundSynthesizer>
12 <CsOptions>
13
14 </CsOptions>
15 <CsInstruments>
16 sr = 44100 ;SAMPLE RATE
17 ksmps = 16 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
18 nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
19
20
21 instr 1 ;ALWAYS ON - SEE SCORE
22
23 kgain invalue "Gain"
24
25 ainL, ainR ins
26 outs ainL * kgain, ainR * kgain
27 endin
28 </CsInstruments>
29 <CsScore>
30 ;INSTR | START | DURATION
31 i 1 0 3600 ;INSTRUMENT 1 PLAYS FOR 1 HOUR (AND KEEPS PERFORMANCE GOING)
32 </CsScore>
33 </CsoundSynthesizer>
34
35 <bsbPanel>
36 <label>Widgets</label>
37 <objectName/>
38 <x>74</x>
39 <y>229</y>
40 <width>514</width>
41 <height>415</height>
42 <visible>true</visible>
43 <uuid/>
44 <bgcolor mode="background">
45 <r>241</r>
46 <g>226</g>
47 <b>185</b>
48 </bgcolor>
49 <bsbObject version="2" type="BSBLabel">
50 <objectName/>
51 <x>2</x>
52 <y>2</y>
53 <width>512</width>
54 <height>90</height>
55 <uuid>{aa607456-d368-4d59-8497-d16d608404c3}</uuid>
56 <visible>true</visible>
57 <midichan>0</midichan>
58 <midicc>0</midicc>
59 <label>ins</label>
60 <alignment>center</alignment>
61 <font>Liberation Sans</font>
62 <fontsize>18</fontsize>
63 <precision>3</precision>
64 <color>
65 <r>0</r>
66 <g>0</g>
67 <b>0</b>
68 </color>
69 <bgcolor mode="background">
70 <r>158</r>
71 <g>220</g>
72 <b>158</b>
73 </bgcolor>
74 <bordermode>border</bordermode>
75 <borderradius>5</borderradius>
76 <borderwidth>2</borderwidth>
77 </bsbObject>
78 <bsbObject version="2" type="BSBLabel">
79 <objectName/>
80 <x>8</x>
81 <y>54</y>
82 <width>100</width>
83 <height>30</height>
84 <uuid>{2c897206-0dbc-47b5-ba68-915d83839ab6}</uuid>
85 <visible>true</visible>
86 <midichan>0</midichan>
87 <midicc>0</midicc>
88 <label>Gain</label>
89 <alignment>left</alignment>
90 <font>Liberation Sans</font>
91 <fontsize>10</fontsize>
92 <precision>3</precision>
93 <color>
94 <r>0</r>
95 <g>0</g>
96 <b>0</b>
97 </color>
98 <bgcolor mode="nobackground">
99 <r>255</r>
100 <g>255</g>
101 <b>255</b>
102 </bgcolor>
103 <bordermode>noborder</bordermode>
104 <borderradius>1</borderradius>
105 <borderwidth>1</borderwidth>
106 </bsbObject>
107 <bsbObject version="2" type="BSBHSlider">
108 <objectName>Gain</objectName>
109 <x>8</x>
110 <y>37</y>
111 <width>500</width>
112 <height>27</height>
113 <uuid>{304e78d8-b320-453a-b28f-86b0ca872b86}</uuid>
114 <visible>true</visible>
115 <midichan>0</midichan>
116 <midicc>0</midicc>
117 <minimum>0.00000000</minimum>
118 <maximum>4.00000000</maximum>
119 <value>1.37600000</value>
120 <mode>lin</mode>
121 <mouseControl act="jump">continuous</mouseControl>
122 <resolution>-1.00000000</resolution>
123 <randomizable group="0">false</randomizable>
124 </bsbObject>
125 <bsbObject version="2" type="BSBDisplay">
126 <objectName>Gain</objectName>
127 <x>448</x>
128 <y>54</y>
129 <width>60</width>
130 <height>30</height>
131 <uuid>{94c7e961-7981-4d21-942f-80bcc647daf5}</uuid>
132 <visible>true</visible>
133 <midichan>0</midichan>
134 <midicc>0</midicc>
135 <label>1.376</label>
136 <alignment>right</alignment>
137 <font>Liberation Sans</font>
138 <fontsize>9</fontsize>
139 <precision>3</precision>
140 <color>
141 <r>0</r>
142 <g>0</g>
143 <b>0</b>
144 </color>
145 <bgcolor mode="nobackground">
146 <r>255</r>
147 <g>255</g>
148 <b>255</b>
149 </bgcolor>
150 <bordermode>noborder</bordermode>
151 <borderradius>1</borderradius>
152 <borderwidth>1</borderwidth>
153 </bsbObject>
154 <bsbObject version="2" type="BSBLabel">
155 <objectName/>
156 <x>2</x>
157 <y>95</y>
158 <width>512</width>
159 <height>320</height>
160 <uuid>{cebe7e5c-304d-4db6-8da2-0e27c0616bab}</uuid>
161 <visible>true</visible>
162 <midichan>0</midichan>
163 <midicc>0</midicc>
164 <label>ins</label>
165 <alignment>center</alignment>
166 <font>Liberation Sans</font>
167 <fontsize>18</fontsize>
168 <precision>3</precision>
169 <color>
170 <r>0</r>
171 <g>0</g>
172 <b>0</b>
173 </color>
174 <bgcolor mode="background">
175 <r>158</r>
176 <g>220</g>
177 <b>158</b>
178 </bgcolor>
179 <bordermode>border</bordermode>
180 <borderradius>5</borderradius>
181 <borderwidth>2</borderwidth>
182 </bsbObject>
183 <bsbObject version="2" type="BSBLabel">
184 <objectName/>
185 <x>6</x>
186 <y>112</y>
187 <width>502</width>
188 <height>294</height>
189 <uuid>{c24a85f3-363e-476e-81da-37729ad65bb7}</uuid>
190 <visible>true</visible>
191 <midichan>0</midichan>
192 <midicc>0</midicc>
193 <label>---------------------------------------------------------------------------------------------------------------------------
194 This example is a simple demonstration of the 'ins' opcode which reads audio information from the computer's default audio input.
195 It doesn't do anything spectacular other than merely output the audio to the speakers.
196 It will allow you to monitor the latency of your system. (The time delay between an impulse sound entering the computer and it being replayed out the speakers again.) Latency can be reduced by reducing the size and the number of audio buffers used by Csound.
197 This is done using command line flags in the &lt;CsOptions> section of the csd file. Refer to the Csound manual for further information.
198 If buffer sizes are too small audio underruns (glitches) will occur.
199 The audio hardware that you are using with your computer and its related drivers will also have an effect upon the latencies that you can achieve.
200 Typically some sort of audio processing would be performed upon the audio signal created by the ins opcode before it would be passed to the output. The only processing that is applied in this example is a gain control.</label>
201 <alignment>left</alignment>
202 <font>Liberation Sans</font>
203 <fontsize>14</fontsize>
204 <precision>3</precision>
205 <color>
206 <r>0</r>
207 <g>0</g>
208 <b>0</b>
209 </color>
210 <bgcolor mode="nobackground">
211 <r>158</r>
212 <g>220</g>
213 <b>158</b>
214 </bgcolor>
215 <bordermode>noborder</bordermode>
216 <borderradius>1</borderradius>
217 <borderwidth>1</borderwidth>
218 </bsbObject>
219 </bsbPanel>
220 <bsbPresets>
221 </bsbPresets>
222 <EventPanel name="" tempo="60.00000000" loop="8.00000000" x="913" y="162" width="655" height="346" visible="true" loopStart="0" loopEnd="0"> </EventPanel>