| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o grain.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 |
instr 1 |
| 17 |
|
| 18 |
insnd = 10 |
| 19 |
ibasfrq = 44100 / ftlen(insnd) ; Use original sample rate of insnd file |
| 20 |
|
| 21 |
kamp expseg .001, p3/2, .1, p3/2, .01 ;a swell in amplitude |
| 22 |
kpitch line ibasfrq, p3, ibasfrq * .8 |
| 23 |
kdens line 600, p3, 100 |
| 24 |
kaoff line 0, p3, .1 |
| 25 |
kpoff line 0, p3, ibasfrq * .5 |
| 26 |
kgdur line .4, p3, .01 |
| 27 |
imaxgdur = .5 |
| 28 |
|
| 29 |
asigL grain kamp, kpitch, kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0 |
| 30 |
asigR grain kamp, kpitch, kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0 |
| 31 |
outs asigL, asigR |
| 32 |
|
| 33 |
endin |
| 34 |
</CsInstruments> |
| 35 |
<CsScore> |
| 36 |
f5 0 512 20 2 ; Hanning window |
| 37 |
f10 0 16384 1 "drumsMlp.wav" 0 0 0 |
| 38 |
|
| 39 |
i1 0 15 |
| 40 |
e |
| 41 |
</CsScore> |
| 42 |
</CsoundSynthesizer> |