| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
</CsOptions> |
| 4 |
<CsInstruments> |
| 5 |
|
| 6 |
sr = 44100 |
| 7 |
ksmps = 16 |
| 8 |
nchnls = 2 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
/*****Playing a soundfile 1a: simple play from the Harddisk*****/ |
| 12 |
;written by joachim heintz and andres cabrera |
| 13 |
;mar 2009 |
| 14 |
|
| 15 |
instr 1 |
| 16 |
Sfile invalue "_Browse1" |
| 17 |
kskip invalue "skip" |
| 18 |
kloop invalue "loop" |
| 19 |
ichn filenchnls Sfile; check if mono or stereo |
| 20 |
if ichn == 1 then ;mono |
| 21 |
aL diskin2 Sfile, 1, i(kskip), i(kloop), 0, 1 |
| 22 |
aR = aL |
| 23 |
else ;stereo |
| 24 |
aL, aR diskin2 Sfile, 1, i(kskip), i(kloop), 0, 1 |
| 25 |
endif |
| 26 |
outs aL, aR |
| 27 |
endin |
| 28 |
|
| 29 |
instr 2 |
| 30 |
turnoff2 1, 0, 0 |
| 31 |
endin |
| 32 |
|
| 33 |
</CsInstruments> |
| 34 |
<CsScore> |
| 35 |
f 0 36000; don't listen to music longer than 10 hours |
| 36 |
e |
| 37 |
</CsScore> |
| 38 |
</CsoundSynthesizer> |
| 39 |
<bsbPanel> |
| 40 |
<label>Widgets</label> |
| 41 |
<objectName/> |
| 42 |
<x>0</x> |
| 43 |
<y>0</y> |
| 44 |
<width>428</width> |
| 45 |
<height>537</height> |
| 46 |
<visible>true</visible> |
| 47 |
<uuid/> |
| 48 |
<bgcolor mode="background"> |
| 49 |
<r>144</r> |
| 50 |
<g>170</g> |
| 51 |
<b>129</b> |
| 52 |
</bgcolor> |
| 53 |
<bsbObject version="2" type="BSBLineEdit"> |
| 54 |
<objectName>_Browse1</objectName> |
| 55 |
<x>15</x> |
| 56 |
<y>97</y> |
| 57 |
<width>295</width> |
| 58 |
<height>24</height> |
| 59 |
<uuid>{c6dfe8ed-7c1d-4c8e-b54e-4b19698be80e}</uuid> |
| 60 |
<visible>true</visible> |
| 61 |
<midichan>0</midichan> |
| 62 |
<midicc>-3</midicc> |
| 63 |
<label/> |
| 64 |
<alignment>left</alignment> |
| 65 |
<font>Lucida Grande</font> |
| 66 |
<fontsize>10</fontsize> |
| 67 |
<precision>3</precision> |
| 68 |
<color> |
| 69 |
<r>0</r> |
| 70 |
<g>0</g> |
| 71 |
<b>0</b> |
| 72 |
</color> |
| 73 |
<bgcolor mode="nobackground"> |
| 74 |
<r>229</r> |
| 75 |
<g>229</g> |
| 76 |
<b>229</b> |
| 77 |
</bgcolor> |
| 78 |
<background>nobackground</background> |
| 79 |
</bsbObject> |
| 80 |
<bsbObject version="2" type="BSBButton"> |
| 81 |
<objectName>_Browse1</objectName> |
| 82 |
<x>314</x> |
| 83 |
<y>95</y> |
| 84 |
<width>100</width> |
| 85 |
<height>30</height> |
| 86 |
<uuid>{cf5aced0-f7f7-4ec8-96ac-14e558bf8079}</uuid> |
| 87 |
<visible>true</visible> |
| 88 |
<midichan>0</midichan> |
| 89 |
<midicc>-3</midicc> |
| 90 |
<type>value</type> |
| 91 |
<pressedValue>1.00000000</pressedValue> |
| 92 |
<stringvalue>/home/linux/Joachim/Materialien/SamplesKlangbearbeitung/PassageStereo.aiff</stringvalue> |
| 93 |
<text>Open File</text> |
| 94 |
<image>/</image> |
| 95 |
<eventLine/> |
| 96 |
<latch>false</latch> |
| 97 |
<latched>false</latched> |
| 98 |
</bsbObject> |
| 99 |
<bsbObject version="2" type="BSBButton"> |
| 100 |
<objectName/> |
| 101 |
<x>112</x> |
| 102 |
<y>138</y> |
| 103 |
<width>78</width> |
| 104 |
<height>26</height> |
| 105 |
<uuid>{ca1fe121-9e84-4159-929d-079ca5884cf8}</uuid> |
| 106 |
<visible>true</visible> |
| 107 |
<midichan>0</midichan> |
| 108 |
<midicc>-3</midicc> |
| 109 |
<type>event</type> |
| 110 |
<pressedValue>1.00000000</pressedValue> |
| 111 |
<stringvalue/> |
| 112 |
<text>Play</text> |
| 113 |
<image>/</image> |
| 114 |
<eventLine>i 1 0 9999</eventLine> |
| 115 |
<latch>false</latch> |
| 116 |
<latched>false</latched> |
| 117 |
</bsbObject> |
| 118 |
<bsbObject version="2" type="BSBButton"> |
| 119 |
<objectName/> |
| 120 |
<x>213</x> |
| 121 |
<y>139</y> |
| 122 |
<width>80</width> |
| 123 |
<height>25</height> |
| 124 |
<uuid>{182e18f2-6adb-4f41-ae1b-47288e91c622}</uuid> |
| 125 |
<visible>true</visible> |
| 126 |
<midichan>0</midichan> |
| 127 |
<midicc>-3</midicc> |
| 128 |
<type>event</type> |
| 129 |
<pressedValue>1.00000000</pressedValue> |
| 130 |
<stringvalue/> |
| 131 |
<text>Stop</text> |
| 132 |
<image>/</image> |
| 133 |
<eventLine>i 2 0 .1</eventLine> |
| 134 |
<latch>false</latch> |
| 135 |
<latched>false</latched> |
| 136 |
</bsbObject> |
| 137 |
<bsbObject version="2" type="BSBSpinBox"> |
| 138 |
<objectName>skip</objectName> |
| 139 |
<x>144</x> |
| 140 |
<y>184</y> |
| 141 |
<width>87</width> |
| 142 |
<height>25</height> |
| 143 |
<uuid>{de4656bd-c258-4e57-9e2e-0ac95a738f8a}</uuid> |
| 144 |
<visible>true</visible> |
| 145 |
<midichan>0</midichan> |
| 146 |
<midicc>-3</midicc> |
| 147 |
<alignment>right</alignment> |
| 148 |
<font>Lucida Grande</font> |
| 149 |
<fontsize>10</fontsize> |
| 150 |
<color> |
| 151 |
<r>0</r> |
| 152 |
<g>0</g> |
| 153 |
<b>0</b> |
| 154 |
</color> |
| 155 |
<bgcolor mode="nobackground"> |
| 156 |
<r>255</r> |
| 157 |
<g>255</g> |
| 158 |
<b>255</b> |
| 159 |
</bgcolor> |
| 160 |
<resolution>0.00100000</resolution> |
| 161 |
<minimum>-1e+12</minimum> |
| 162 |
<maximum>1e+12</maximum> |
| 163 |
<randomizable group="0">false</randomizable> |
| 164 |
<value>0</value> |
| 165 |
</bsbObject> |
| 166 |
<bsbObject version="2" type="BSBCheckBox"> |
| 167 |
<objectName>loop</objectName> |
| 168 |
<x>306</x> |
| 169 |
<y>187</y> |
| 170 |
<width>20</width> |
| 171 |
<height>20</height> |
| 172 |
<uuid>{7ec06e33-7ec2-47f9-84dd-e4966aea301e}</uuid> |
| 173 |
<visible>true</visible> |
| 174 |
<midichan>0</midichan> |
| 175 |
<midicc>-3</midicc> |
| 176 |
<selected>false</selected> |
| 177 |
<label/> |
| 178 |
<pressedValue>1</pressedValue> |
| 179 |
<randomizable group="0">false</randomizable> |
| 180 |
</bsbObject> |
| 181 |
<bsbObject version="2" type="BSBLabel"> |
| 182 |
<objectName/> |
| 183 |
<x>64</x> |
| 184 |
<y>183</y> |
| 185 |
<width>80</width> |
| 186 |
<height>28</height> |
| 187 |
<uuid>{c64d57cc-88d5-4315-bbc8-762a92008a30}</uuid> |
| 188 |
<visible>true</visible> |
| 189 |
<midichan>0</midichan> |
| 190 |
<midicc>-3</midicc> |
| 191 |
<label>skiptime</label> |
| 192 |
<alignment>center</alignment> |
| 193 |
<font>Lucida Grande</font> |
| 194 |
<fontsize>14</fontsize> |
| 195 |
<precision>3</precision> |
| 196 |
<color> |
| 197 |
<r>0</r> |
| 198 |
<g>0</g> |
| 199 |
<b>0</b> |
| 200 |
</color> |
| 201 |
<bgcolor mode="nobackground"> |
| 202 |
<r>255</r> |
| 203 |
<g>255</g> |
| 204 |
<b>255</b> |
| 205 |
</bgcolor> |
| 206 |
<bordermode>noborder</bordermode> |
| 207 |
<borderradius>1</borderradius> |
| 208 |
<borderwidth>1</borderwidth> |
| 209 |
</bsbObject> |
| 210 |
<bsbObject version="2" type="BSBLabel"> |
| 211 |
<objectName/> |
| 212 |
<x>255</x> |
| 213 |
<y>182</y> |
| 214 |
<width>52</width> |
| 215 |
<height>29</height> |
| 216 |
<uuid>{f3027490-da2c-4e93-8c57-2817ff7454df}</uuid> |
| 217 |
<visible>true</visible> |
| 218 |
<midichan>0</midichan> |
| 219 |
<midicc>-3</midicc> |
| 220 |
<label>loop</label> |
| 221 |
<alignment>center</alignment> |
| 222 |
<font>Lucida Grande</font> |
| 223 |
<fontsize>14</fontsize> |
| 224 |
<precision>3</precision> |
| 225 |
<color> |
| 226 |
<r>0</r> |
| 227 |
<g>0</g> |
| 228 |
<b>0</b> |
| 229 |
</color> |
| 230 |
<bgcolor mode="nobackground"> |
| 231 |
<r>255</r> |
| 232 |
<g>255</g> |
| 233 |
<b>255</b> |
| 234 |
</bgcolor> |
| 235 |
<bordermode>noborder</bordermode> |
| 236 |
<borderradius>1</borderradius> |
| 237 |
<borderwidth>1</borderwidth> |
| 238 |
</bsbObject> |
| 239 |
<bsbObject version="2" type="BSBLabel"> |
| 240 |
<objectName/> |
| 241 |
<x>15</x> |
| 242 |
<y>9</y> |
| 243 |
<width>398</width> |
| 244 |
<height>43</height> |
| 245 |
<uuid>{2079364d-6fc1-443b-9b13-fa839e594199}</uuid> |
| 246 |
<visible>true</visible> |
| 247 |
<midichan>0</midichan> |
| 248 |
<midicc>-3</midicc> |
| 249 |
<label>SIMPLE SOUNDFILE PLAYER</label> |
| 250 |
<alignment>center</alignment> |
| 251 |
<font>Lucida Grande</font> |
| 252 |
<fontsize>26</fontsize> |
| 253 |
<precision>3</precision> |
| 254 |
<color> |
| 255 |
<r>0</r> |
| 256 |
<g>0</g> |
| 257 |
<b>0</b> |
| 258 |
</color> |
| 259 |
<bgcolor mode="nobackground"> |
| 260 |
<r>255</r> |
| 261 |
<g>255</g> |
| 262 |
<b>255</b> |
| 263 |
</bgcolor> |
| 264 |
<bordermode>noborder</bordermode> |
| 265 |
<borderradius>1</borderradius> |
| 266 |
<borderwidth>1</borderwidth> |
| 267 |
</bsbObject> |
| 268 |
<bsbObject version="2" type="BSBLabel"> |
| 269 |
<objectName/> |
| 270 |
<x>14</x> |
| 271 |
<y>51</y> |
| 272 |
<width>398</width> |
| 273 |
<height>43</height> |
| 274 |
<uuid>{f68bb6d7-40f4-4f54-828c-78734025d499}</uuid> |
| 275 |
<visible>true</visible> |
| 276 |
<midichan>0</midichan> |
| 277 |
<midicc>-3</midicc> |
| 278 |
<label>(playing from the hard disk)</label> |
| 279 |
<alignment>center</alignment> |
| 280 |
<font>Lucida Grande</font> |
| 281 |
<fontsize>22</fontsize> |
| 282 |
<precision>3</precision> |
| 283 |
<color> |
| 284 |
<r>0</r> |
| 285 |
<g>0</g> |
| 286 |
<b>0</b> |
| 287 |
</color> |
| 288 |
<bgcolor mode="nobackground"> |
| 289 |
<r>255</r> |
| 290 |
<g>255</g> |
| 291 |
<b>255</b> |
| 292 |
</bgcolor> |
| 293 |
<bordermode>noborder</bordermode> |
| 294 |
<borderradius>1</borderradius> |
| 295 |
<borderwidth>1</borderwidth> |
| 296 |
</bsbObject> |
| 297 |
<bsbObject version="2" type="BSBLabel"> |
| 298 |
<objectName/> |
| 299 |
<x>17</x> |
| 300 |
<y>406</y> |
| 301 |
<width>393</width> |
| 302 |
<height>122</height> |
| 303 |
<uuid>{12c96909-f31d-4365-8e69-b540e93d260e}</uuid> |
| 304 |
<visible>true</visible> |
| 305 |
<midichan>0</midichan> |
| 306 |
<midicc>0</midicc> |
| 307 |
<label>This simple example shows how a mono or stereo soundfile can be played in Csound directly from the hard disk. |
| 308 |
Note that the sample rate of the file is NOT converted to the orchestra sample rate!</label> |
| 309 |
<alignment>center</alignment> |
| 310 |
<font>DejaVu Sans</font> |
| 311 |
<fontsize>14</fontsize> |
| 312 |
<precision>3</precision> |
| 313 |
<color> |
| 314 |
<r>0</r> |
| 315 |
<g>0</g> |
| 316 |
<b>0</b> |
| 317 |
</color> |
| 318 |
<bgcolor mode="nobackground"> |
| 319 |
<r>255</r> |
| 320 |
<g>255</g> |
| 321 |
<b>255</b> |
| 322 |
</bgcolor> |
| 323 |
<bordermode>noborder</bordermode> |
| 324 |
<borderradius>1</borderradius> |
| 325 |
<borderwidth>1</borderwidth> |
| 326 |
</bsbObject> |
| 327 |
<bsbObject version="2" type="BSBScope"> |
| 328 |
<objectName/> |
| 329 |
<x>15</x> |
| 330 |
<y>220</y> |
| 331 |
<width>397</width> |
| 332 |
<height>89</height> |
| 333 |
<uuid>{b03c946c-de5d-4e5d-8f51-53e9174a4e88}</uuid> |
| 334 |
<visible>true</visible> |
| 335 |
<midichan>0</midichan> |
| 336 |
<midicc>-3</midicc> |
| 337 |
<value>1.00000000</value> |
| 338 |
<type>scope</type> |
| 339 |
<zoomx>2.00000000</zoomx> |
| 340 |
<zoomy>1.00000000</zoomy> |
| 341 |
<dispx>1.00000000</dispx> |
| 342 |
<dispy>1.00000000</dispy> |
| 343 |
<mode>0.00000000</mode> |
| 344 |
</bsbObject> |
| 345 |
<bsbObject version="2" type="BSBScope"> |
| 346 |
<objectName/> |
| 347 |
<x>15</x> |
| 348 |
<y>306</y> |
| 349 |
<width>397</width> |
| 350 |
<height>89</height> |
| 351 |
<uuid>{4ffad839-4031-4ac5-b888-6ba06eea4f08}</uuid> |
| 352 |
<visible>true</visible> |
| 353 |
<midichan>0</midichan> |
| 354 |
<midicc>-3</midicc> |
| 355 |
<value>2.00000000</value> |
| 356 |
<type>scope</type> |
| 357 |
<zoomx>2.00000000</zoomx> |
| 358 |
<zoomy>1.00000000</zoomy> |
| 359 |
<dispx>1.00000000</dispx> |
| 360 |
<dispy>1.00000000</dispy> |
| 361 |
<mode>0.00000000</mode> |
| 362 |
</bsbObject> |
| 363 |
</bsbPanel> |
| 364 |
<bsbPresets> |
| 365 |
</bsbPresets> |