| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-L stdin -odac |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
;Example by Joachim Heintz |
| 7 |
sr = 44100 |
| 8 |
ksmps = 32 |
| 9 |
nchnls = 2 |
| 10 |
0dbfs = 1 |
| 11 |
|
| 12 |
seed 0; random seed different each time |
| 13 |
|
| 14 |
instr 1 |
| 15 |
idur random .5, 3; calculate instrument duration |
| 16 |
p3 = idur; reset instrument duration |
| 17 |
ioct random 8, 11; random values between 8th and 11th octave |
| 18 |
idb random -18, -6; random values between -6 and -18 dB |
| 19 |
aSig oscils ampdb(idb), cpsoct(ioct), 0 |
| 20 |
aEnv transeg 1, p3, -10, 0 |
| 21 |
outs aSig*aEnv, aSig*aEnv |
| 22 |
endin |
| 23 |
|
| 24 |
</CsInstruments> |
| 25 |
<CsScore> |
| 26 |
f 0 36000 |
| 27 |
e |
| 28 |
</CsScore> |
| 29 |
</CsoundSynthesizer> |