| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if RT audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o poscil.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr = 44100 |
| 12 |
ksmps = 32 |
| 13 |
nchnls = 2 |
| 14 |
0dbfs = 1 |
| 15 |
|
| 16 |
seed 0 |
| 17 |
gisine ftgen 0, 0, 2^10, 10, 1 |
| 18 |
|
| 19 |
instr 1 |
| 20 |
|
| 21 |
ipeak random 0, 1 ;where is the envelope peak |
| 22 |
asig poscil .8, 220, gisine |
| 23 |
aenv transeg 0, p3*ipeak, 6, 1, p3-p3*ipeak, -6, 0 |
| 24 |
aL,aR pan2 asig*aenv, ipeak ;pan according to random value |
| 25 |
outs aL, aR |
| 26 |
|
| 27 |
endin |
| 28 |
|
| 29 |
</CsInstruments> |
| 30 |
<CsScore> |
| 31 |
i1 0 5 |
| 32 |
i1 4 5 |
| 33 |
i1 8 5 |
| 34 |
e |
| 35 |
</CsScore> |
| 36 |
</CsoundSynthesizer> |