| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-odac |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
ksmps = 32 |
| 8 |
nchnls = 2 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
giSine ftgen 0, 0, 2^10, 10, 1 |
| 12 |
seed 0 |
| 13 |
|
| 14 |
instr 1 |
| 15 |
iupper = 0; upper and ... |
| 16 |
ilower = -24; ... lower limit in dB |
| 17 |
ival1 random ilower, iupper; starting value |
| 18 |
loop: |
| 19 |
idurloop random .5, 2; duration of each loop |
| 20 |
timout 0, idurloop, play |
| 21 |
reinit loop |
| 22 |
play: |
| 23 |
ival2 random ilower, iupper; final value |
| 24 |
kdb linseg ival1, idurloop, ival2 |
| 25 |
ival1 = ival2; let ival2 be ival1 for next loop |
| 26 |
rireturn ;end reinit section |
| 27 |
aTone poscil ampdb(kdb), 400, giSine |
| 28 |
outs aTone, aTone |
| 29 |
endin |
| 30 |
|
| 31 |
</CsInstruments> |
| 32 |
<CsScore> |
| 33 |
i 1 0 30 |
| 34 |
</CsScore> |
| 35 |
</CsoundSynthesizer> |
| 36 |
;example by joachim heintz |