| 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 fog.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 |
;p4 = transposition factor |
| 19 |
;p5 = speed factor |
| 20 |
;p6 = function table for grain data |
| 21 |
i1 = sr/ftlen(1) ;scaling to reflect sample rate and table length |
| 22 |
a1 phasor i1*p5 ;index for speed |
| 23 |
asigl fog .5, 15, p4, a1, 1, 0, .01, .5, .01, 30, 1, 2, p3 ;left channel |
| 24 |
asigr fog .4, 25, p4+.2, a1, 1, 0, .01, .5, .01, 30, 1, 2, p3, .5 ;right channel |
| 25 |
outs asigl, asigr |
| 26 |
endin |
| 27 |
|
| 28 |
</CsInstruments> |
| 29 |
<CsScore> |
| 30 |
f 1 0 131072 1 "fox.wav" 0 0 0 |
| 31 |
f 2 0 1024 19 .5 .5 270 .5 |
| 32 |
|
| 33 |
i 1 0 10 .7 .1 |
| 34 |
i 1 + 4 1.2 2 |
| 35 |
e |
| 36 |
</CsScore> |
| 37 |
</CsoundSynthesizer> |