| 1 |
;Written by Iain McCurdy |
| 2 |
|
| 3 |
|
| 4 |
;Modified for QuteCsound by René, April 2011 |
| 5 |
;Tested on Ubuntu 10.04 with csound-float 5.13.0 and QuteCsound svn rev 817 |
| 6 |
|
| 7 |
;Notes on modifications from original csd: |
| 8 |
|
| 9 |
|
| 10 |
;my flags on Ubuntu: -iadc -odac -b1024 -B2048 -+rtaudio=alsa -+rtmidi=null -m0 |
| 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 |
0dbfs = 1 ;MAXIMUM SOUND INTENSITY LEVEL REGARDLESS OF BIT DEPTH |
| 20 |
|
| 21 |
|
| 22 |
instr 10 ;GUI |
| 23 |
gkwhiteamp invalue "WhiteAmp" |
| 24 |
gkbeta invalue "Beta" |
| 25 |
gkpinkamp invalue "PinkAmp" |
| 26 |
endin |
| 27 |
|
| 28 |
instr 1 ;WHITE NOISE |
| 29 |
asig noise gkwhiteamp, gkbeta ;GENERATE WHITE NOISE |
| 30 |
outs asig, asig ;SEND AUDIO SIGNAL TO OUTPUTS |
| 31 |
endin |
| 32 |
|
| 33 |
instr 2 ;PINK NOISE |
| 34 |
asig pinkish gkpinkamp ;GENERATE PINK NOISE |
| 35 |
outs asig, asig ;SEND AUDIO SIGNAL TO OUTPUTS |
| 36 |
endin |
| 37 |
</CsInstruments> |
| 38 |
<CsScore> |
| 39 |
;INSTR | START | DURATION |
| 40 |
i 10 0.0 3600 ;GUI |
| 41 |
</CsScore> |
| 42 |
</CsoundSynthesizer> |
| 43 |
<bsbPanel> |
| 44 |
<label>Widgets</label> |
| 45 |
<objectName/> |
| 46 |
<x>1162</x> |
| 47 |
<y>311</y> |
| 48 |
<width>747</width> |
| 49 |
<height>267</height> |
| 50 |
<visible>true</visible> |
| 51 |
<uuid/> |
| 52 |
<bgcolor mode="background"> |
| 53 |
<r>241</r> |
| 54 |
<g>226</g> |
| 55 |
<b>185</b> |
| 56 |
</bgcolor> |
| 57 |
<bsbObject version="2" type="BSBLabel"> |
| 58 |
<objectName/> |
| 59 |
<x>2</x> |
| 60 |
<y>2</y> |
| 61 |
<width>513</width> |
| 62 |
<height>130</height> |
| 63 |
<uuid>{aa607456-d368-4d59-8497-d16d608404c3}</uuid> |
| 64 |
<visible>true</visible> |
| 65 |
<midichan>0</midichan> |
| 66 |
<midicc>0</midicc> |
| 67 |
<label>White Noise</label> |
| 68 |
<alignment>left</alignment> |
| 69 |
<font>Liberation Sans</font> |
| 70 |
<fontsize>18</fontsize> |
| 71 |
<precision>3</precision> |
| 72 |
<color> |
| 73 |
<r>255</r> |
| 74 |
<g>255</g> |
| 75 |
<b>0</b> |
| 76 |
</color> |
| 77 |
<bgcolor mode="background"> |
| 78 |
<r>106</r> |
| 79 |
<g>117</g> |
| 80 |
<b>150</b> |
| 81 |
</bgcolor> |
| 82 |
<bordermode>border</bordermode> |
| 83 |
<borderradius>5</borderradius> |
| 84 |
<borderwidth>2</borderwidth> |
| 85 |
</bsbObject> |
| 86 |
<bsbObject version="2" type="BSBLabel"> |
| 87 |
<objectName/> |
| 88 |
<x>516</x> |
| 89 |
<y>2</y> |
| 90 |
<width>226</width> |
| 91 |
<height>264</height> |
| 92 |
<uuid>{9798823d-b60e-424f-a3c4-1a43d5e0312d}</uuid> |
| 93 |
<visible>true</visible> |
| 94 |
<midichan>0</midichan> |
| 95 |
<midicc>0</midicc> |
| 96 |
<label>White Noise |
| 97 |
Pink Noise</label> |
| 98 |
<alignment>center</alignment> |
| 99 |
<font>Liberation Sans</font> |
| 100 |
<fontsize>18</fontsize> |
| 101 |
<precision>3</precision> |
| 102 |
<color> |
| 103 |
<r>255</r> |
| 104 |
<g>255</g> |
| 105 |
<b>0</b> |
| 106 |
</color> |
| 107 |
<bgcolor mode="background"> |
| 108 |
<r>106</r> |
| 109 |
<g>117</g> |
| 110 |
<b>150</b> |
| 111 |
</bgcolor> |
| 112 |
<bordermode>border</bordermode> |
| 113 |
<borderradius>5</borderradius> |
| 114 |
<borderwidth>2</borderwidth> |
| 115 |
</bsbObject> |
| 116 |
<bsbObject version="2" type="BSBLabel"> |
| 117 |
<objectName/> |
| 118 |
<x>520</x> |
| 119 |
<y>43</y> |
| 120 |
<width>219</width> |
| 121 |
<height>181</height> |
| 122 |
<uuid>{66493881-548a-48d2-bdb6-08aad6d0fe91}</uuid> |
| 123 |
<visible>true</visible> |
| 124 |
<midichan>0</midichan> |
| 125 |
<midicc>0</midicc> |
| 126 |
<label>---------------------------------------------------- |
| 127 |
This example demonstrates the opcodes 'noise' and 'pinkish' which might form useful sources sounds for subtractive synthesis. |
| 128 |
Noise produces white noise and pinkish produces pink noise.</label> |
| 129 |
<alignment>left</alignment> |
| 130 |
<font>Liberation Sans</font> |
| 131 |
<fontsize>14</fontsize> |
| 132 |
<precision>3</precision> |
| 133 |
<color> |
| 134 |
<r>255</r> |
| 135 |
<g>255</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>2</borderradius> |
| 145 |
<borderwidth>1</borderwidth> |
| 146 |
</bsbObject> |
| 147 |
<bsbObject version="2" type="BSBLabel"> |
| 148 |
<objectName/> |
| 149 |
<x>8</x> |
| 150 |
<y>62</y> |
| 151 |
<width>160</width> |
| 152 |
<height>30</height> |
| 153 |
<uuid>{07bf36b2-367f-4332-8200-0b6d7017afe1}</uuid> |
| 154 |
<visible>true</visible> |
| 155 |
<midichan>0</midichan> |
| 156 |
<midicc>0</midicc> |
| 157 |
<label>Amplitude</label> |
| 158 |
<alignment>left</alignment> |
| 159 |
<font>Liberation Sans</font> |
| 160 |
<fontsize>10</fontsize> |
| 161 |
<precision>3</precision> |
| 162 |
<color> |
| 163 |
<r>255</r> |
| 164 |
<g>255</g> |
| 165 |
<b>0</b> |
| 166 |
</color> |
| 167 |
<bgcolor mode="nobackground"> |
| 168 |
<r>255</r> |
| 169 |
<g>255</g> |
| 170 |
<b>255</b> |
| 171 |
</bgcolor> |
| 172 |
<bordermode>noborder</bordermode> |
| 173 |
<borderradius>1</borderradius> |
| 174 |
<borderwidth>1</borderwidth> |
| 175 |
</bsbObject> |
| 176 |
<bsbObject version="2" type="BSBDisplay"> |
| 177 |
<objectName>WhiteAmp</objectName> |
| 178 |
<x>448</x> |
| 179 |
<y>62</y> |
| 180 |
<width>60</width> |
| 181 |
<height>30</height> |
| 182 |
<uuid>{600f5f27-7f32-4cbc-9402-6bbb7415c568}</uuid> |
| 183 |
<visible>true</visible> |
| 184 |
<midichan>0</midichan> |
| 185 |
<midicc>0</midicc> |
| 186 |
<label>0.300</label> |
| 187 |
<alignment>right</alignment> |
| 188 |
<font>Liberation Sans</font> |
| 189 |
<fontsize>9</fontsize> |
| 190 |
<precision>3</precision> |
| 191 |
<color> |
| 192 |
<r>255</r> |
| 193 |
<g>255</g> |
| 194 |
<b>0</b> |
| 195 |
</color> |
| 196 |
<bgcolor mode="nobackground"> |
| 197 |
<r>255</r> |
| 198 |
<g>255</g> |
| 199 |
<b>255</b> |
| 200 |
</bgcolor> |
| 201 |
<bordermode>noborder</bordermode> |
| 202 |
<borderradius>1</borderradius> |
| 203 |
<borderwidth>1</borderwidth> |
| 204 |
</bsbObject> |
| 205 |
<bsbObject version="2" type="BSBHSlider"> |
| 206 |
<objectName>WhiteAmp</objectName> |
| 207 |
<x>8</x> |
| 208 |
<y>46</y> |
| 209 |
<width>500</width> |
| 210 |
<height>27</height> |
| 211 |
<uuid>{859b8f24-fbc4-4127-9432-95e0e467cbab}</uuid> |
| 212 |
<visible>true</visible> |
| 213 |
<midichan>0</midichan> |
| 214 |
<midicc>0</midicc> |
| 215 |
<minimum>0.00000000</minimum> |
| 216 |
<maximum>1.00000000</maximum> |
| 217 |
<value>0.30000000</value> |
| 218 |
<mode>lin</mode> |
| 219 |
<mouseControl act="jump">continuous</mouseControl> |
| 220 |
<resolution>-1.00000000</resolution> |
| 221 |
<randomizable group="0">false</randomizable> |
| 222 |
</bsbObject> |
| 223 |
<bsbObject version="2" type="BSBLabel"> |
| 224 |
<objectName/> |
| 225 |
<x>8</x> |
| 226 |
<y>101</y> |
| 227 |
<width>220</width> |
| 228 |
<height>30</height> |
| 229 |
<uuid>{739c0de4-0e99-4a68-9011-c90835b376ed}</uuid> |
| 230 |
<visible>true</visible> |
| 231 |
<midichan>0</midichan> |
| 232 |
<midicc>0</midicc> |
| 233 |
<label>Beta</label> |
| 234 |
<alignment>left</alignment> |
| 235 |
<font>Liberation Sans</font> |
| 236 |
<fontsize>10</fontsize> |
| 237 |
<precision>3</precision> |
| 238 |
<color> |
| 239 |
<r>255</r> |
| 240 |
<g>255</g> |
| 241 |
<b>0</b> |
| 242 |
</color> |
| 243 |
<bgcolor mode="nobackground"> |
| 244 |
<r>255</r> |
| 245 |
<g>255</g> |
| 246 |
<b>255</b> |
| 247 |
</bgcolor> |
| 248 |
<bordermode>noborder</bordermode> |
| 249 |
<borderradius>1</borderradius> |
| 250 |
<borderwidth>1</borderwidth> |
| 251 |
</bsbObject> |
| 252 |
<bsbObject version="2" type="BSBDisplay"> |
| 253 |
<objectName>Beta</objectName> |
| 254 |
<x>448</x> |
| 255 |
<y>101</y> |
| 256 |
<width>60</width> |
| 257 |
<height>30</height> |
| 258 |
<uuid>{01641a65-23d8-4e33-932e-417c9b9dbe6c}</uuid> |
| 259 |
<visible>true</visible> |
| 260 |
<midichan>0</midichan> |
| 261 |
<midicc>0</midicc> |
| 262 |
<label>0.000</label> |
| 263 |
<alignment>right</alignment> |
| 264 |
<font>Liberation Sans</font> |
| 265 |
<fontsize>9</fontsize> |
| 266 |
<precision>3</precision> |
| 267 |
<color> |
| 268 |
<r>255</r> |
| 269 |
<g>255</g> |
| 270 |
<b>0</b> |
| 271 |
</color> |
| 272 |
<bgcolor mode="nobackground"> |
| 273 |
<r>255</r> |
| 274 |
<g>255</g> |
| 275 |
<b>255</b> |
| 276 |
</bgcolor> |
| 277 |
<bordermode>noborder</bordermode> |
| 278 |
<borderradius>1</borderradius> |
| 279 |
<borderwidth>1</borderwidth> |
| 280 |
</bsbObject> |
| 281 |
<bsbObject version="2" type="BSBHSlider"> |
| 282 |
<objectName>Beta</objectName> |
| 283 |
<x>8</x> |
| 284 |
<y>85</y> |
| 285 |
<width>500</width> |
| 286 |
<height>27</height> |
| 287 |
<uuid>{e251ff65-9564-4e72-aa03-739f0cc74de4}</uuid> |
| 288 |
<visible>true</visible> |
| 289 |
<midichan>0</midichan> |
| 290 |
<midicc>0</midicc> |
| 291 |
<minimum>0.00000000</minimum> |
| 292 |
<maximum>1.00000000</maximum> |
| 293 |
<value>0.00000000</value> |
| 294 |
<mode>lin</mode> |
| 295 |
<mouseControl act="jump">continuous</mouseControl> |
| 296 |
<resolution>-1.00000000</resolution> |
| 297 |
<randomizable group="0">false</randomizable> |
| 298 |
</bsbObject> |
| 299 |
<bsbObject version="2" type="BSBButton"> |
| 300 |
<objectName/> |
| 301 |
<x>186</x> |
| 302 |
<y>13</y> |
| 303 |
<width>16</width> |
| 304 |
<height>16</height> |
| 305 |
<uuid>{50d3bd8a-01ba-42dd-ba1f-d2302d1a588b}</uuid> |
| 306 |
<visible>true</visible> |
| 307 |
<midichan>0</midichan> |
| 308 |
<midicc>0</midicc> |
| 309 |
<type>event</type> |
| 310 |
<pressedValue>1.00000000</pressedValue> |
| 311 |
<stringvalue/> |
| 312 |
<text/> |
| 313 |
<image>/</image> |
| 314 |
<eventLine>i 1 0 -1</eventLine> |
| 315 |
<latch>true</latch> |
| 316 |
<latched>false</latched> |
| 317 |
</bsbObject> |
| 318 |
<bsbObject version="2" type="BSBLabel"> |
| 319 |
<objectName/> |
| 320 |
<x>116</x> |
| 321 |
<y>10</y> |
| 322 |
<width>70</width> |
| 323 |
<height>26</height> |
| 324 |
<uuid>{4dac2187-37e0-49c5-a739-514ab42ed825}</uuid> |
| 325 |
<visible>true</visible> |
| 326 |
<midichan>0</midichan> |
| 327 |
<midicc>0</midicc> |
| 328 |
<label>On / Off :</label> |
| 329 |
<alignment>right</alignment> |
| 330 |
<font>Liberation Sans</font> |
| 331 |
<fontsize>10</fontsize> |
| 332 |
<precision>3</precision> |
| 333 |
<color> |
| 334 |
<r>255</r> |
| 335 |
<g>255</g> |
| 336 |
<b>0</b> |
| 337 |
</color> |
| 338 |
<bgcolor mode="nobackground"> |
| 339 |
<r>255</r> |
| 340 |
<g>255</g> |
| 341 |
<b>255</b> |
| 342 |
</bgcolor> |
| 343 |
<bordermode>noborder</bordermode> |
| 344 |
<borderradius>1</borderradius> |
| 345 |
<borderwidth>1</borderwidth> |
| 346 |
</bsbObject> |
| 347 |
<bsbObject version="2" type="BSBLabel"> |
| 348 |
<objectName/> |
| 349 |
<x>2</x> |
| 350 |
<y>136</y> |
| 351 |
<width>513</width> |
| 352 |
<height>130</height> |
| 353 |
<uuid>{587b8995-101a-495d-84e4-e36a556560b5}</uuid> |
| 354 |
<visible>true</visible> |
| 355 |
<midichan>0</midichan> |
| 356 |
<midicc>0</midicc> |
| 357 |
<label>Pink Noise</label> |
| 358 |
<alignment>left</alignment> |
| 359 |
<font>Liberation Sans</font> |
| 360 |
<fontsize>18</fontsize> |
| 361 |
<precision>3</precision> |
| 362 |
<color> |
| 363 |
<r>255</r> |
| 364 |
<g>255</g> |
| 365 |
<b>0</b> |
| 366 |
</color> |
| 367 |
<bgcolor mode="background"> |
| 368 |
<r>106</r> |
| 369 |
<g>117</g> |
| 370 |
<b>150</b> |
| 371 |
</bgcolor> |
| 372 |
<bordermode>border</bordermode> |
| 373 |
<borderradius>5</borderradius> |
| 374 |
<borderwidth>2</borderwidth> |
| 375 |
</bsbObject> |
| 376 |
<bsbObject version="2" type="BSBLabel"> |
| 377 |
<objectName/> |
| 378 |
<x>8</x> |
| 379 |
<y>196</y> |
| 380 |
<width>160</width> |
| 381 |
<height>30</height> |
| 382 |
<uuid>{1eacbd11-71ee-4d4e-bd20-d410a3e5b35e}</uuid> |
| 383 |
<visible>true</visible> |
| 384 |
<midichan>0</midichan> |
| 385 |
<midicc>0</midicc> |
| 386 |
<label>Amplitude</label> |
| 387 |
<alignment>left</alignment> |
| 388 |
<font>Liberation Sans</font> |
| 389 |
<fontsize>10</fontsize> |
| 390 |
<precision>3</precision> |
| 391 |
<color> |
| 392 |
<r>255</r> |
| 393 |
<g>255</g> |
| 394 |
<b>0</b> |
| 395 |
</color> |
| 396 |
<bgcolor mode="nobackground"> |
| 397 |
<r>255</r> |
| 398 |
<g>255</g> |
| 399 |
<b>255</b> |
| 400 |
</bgcolor> |
| 401 |
<bordermode>noborder</bordermode> |
| 402 |
<borderradius>1</borderradius> |
| 403 |
<borderwidth>1</borderwidth> |
| 404 |
</bsbObject> |
| 405 |
<bsbObject version="2" type="BSBDisplay"> |
| 406 |
<objectName>PinkAmp</objectName> |
| 407 |
<x>448</x> |
| 408 |
<y>196</y> |
| 409 |
<width>60</width> |
| 410 |
<height>30</height> |
| 411 |
<uuid>{29757f17-3ea1-4d66-bff0-76d6f5d0a842}</uuid> |
| 412 |
<visible>true</visible> |
| 413 |
<midichan>0</midichan> |
| 414 |
<midicc>0</midicc> |
| 415 |
<label>0.300</label> |
| 416 |
<alignment>right</alignment> |
| 417 |
<font>Liberation Sans</font> |
| 418 |
<fontsize>9</fontsize> |
| 419 |
<precision>3</precision> |
| 420 |
<color> |
| 421 |
<r>255</r> |
| 422 |
<g>255</g> |
| 423 |
<b>0</b> |
| 424 |
</color> |
| 425 |
<bgcolor mode="nobackground"> |
| 426 |
<r>255</r> |
| 427 |
<g>255</g> |
| 428 |
<b>255</b> |
| 429 |
</bgcolor> |
| 430 |
<bordermode>noborder</bordermode> |
| 431 |
<borderradius>1</borderradius> |
| 432 |
<borderwidth>1</borderwidth> |
| 433 |
</bsbObject> |
| 434 |
<bsbObject version="2" type="BSBHSlider"> |
| 435 |
<objectName>PinkAmp</objectName> |
| 436 |
<x>8</x> |
| 437 |
<y>180</y> |
| 438 |
<width>500</width> |
| 439 |
<height>27</height> |
| 440 |
<uuid>{5e369285-5937-4d84-b85e-1c725f4a08fe}</uuid> |
| 441 |
<visible>true</visible> |
| 442 |
<midichan>0</midichan> |
| 443 |
<midicc>0</midicc> |
| 444 |
<minimum>0.00000000</minimum> |
| 445 |
<maximum>1.00000000</maximum> |
| 446 |
<value>0.30000000</value> |
| 447 |
<mode>lin</mode> |
| 448 |
<mouseControl act="jump">continuous</mouseControl> |
| 449 |
<resolution>-1.00000000</resolution> |
| 450 |
<randomizable group="0">false</randomizable> |
| 451 |
</bsbObject> |
| 452 |
<bsbObject version="2" type="BSBButton"> |
| 453 |
<objectName/> |
| 454 |
<x>186</x> |
| 455 |
<y>147</y> |
| 456 |
<width>16</width> |
| 457 |
<height>16</height> |
| 458 |
<uuid>{530e66cd-b415-4e62-bf54-cd4ede8f0f0a}</uuid> |
| 459 |
<visible>true</visible> |
| 460 |
<midichan>0</midichan> |
| 461 |
<midicc>0</midicc> |
| 462 |
<type>event</type> |
| 463 |
<pressedValue>1.00000000</pressedValue> |
| 464 |
<stringvalue/> |
| 465 |
<text/> |
| 466 |
<image>/</image> |
| 467 |
<eventLine>i 2 0 -1</eventLine> |
| 468 |
<latch>true</latch> |
| 469 |
<latched>false</latched> |
| 470 |
</bsbObject> |
| 471 |
<bsbObject version="2" type="BSBLabel"> |
| 472 |
<objectName/> |
| 473 |
<x>116</x> |
| 474 |
<y>144</y> |
| 475 |
<width>70</width> |
| 476 |
<height>26</height> |
| 477 |
<uuid>{dd459374-baa8-4bc7-abfb-109b3cebc51e}</uuid> |
| 478 |
<visible>true</visible> |
| 479 |
<midichan>0</midichan> |
| 480 |
<midicc>0</midicc> |
| 481 |
<label>On / Off :</label> |
| 482 |
<alignment>right</alignment> |
| 483 |
<font>Liberation Sans</font> |
| 484 |
<fontsize>10</fontsize> |
| 485 |
<precision>3</precision> |
| 486 |
<color> |
| 487 |
<r>255</r> |
| 488 |
<g>255</g> |
| 489 |
<b>0</b> |
| 490 |
</color> |
| 491 |
<bgcolor mode="nobackground"> |
| 492 |
<r>255</r> |
| 493 |
<g>255</g> |
| 494 |
<b>255</b> |
| 495 |
</bgcolor> |
| 496 |
<bordermode>noborder</bordermode> |
| 497 |
<borderradius>1</borderradius> |
| 498 |
<borderwidth>1</borderwidth> |
| 499 |
</bsbObject> |
| 500 |
</bsbPanel> |
| 501 |
<bsbPresets> |
| 502 |
</bsbPresets> |