| 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 ptrack.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr = 44100 |
| 12 |
ksmps = 32 |
| 13 |
0dbfs = 1 |
| 14 |
nchnls = 2 |
| 15 |
|
| 16 |
instr 1 |
| 17 |
|
| 18 |
ihop = p4 |
| 19 |
aout diskin2 "fox.wav",1, 0, 1 |
| 20 |
kf,ka ptrack aout, ihop ; pitch track with different hopsizes |
| 21 |
kcps port kf, 0.01 ; smooth freq |
| 22 |
kamp port ka, 0.01 ; smooth amp |
| 23 |
; drive an oscillator |
| 24 |
asig poscil ampdb(kamp)*0dbfs, kcps, 1 |
| 25 |
outs asig, asig |
| 26 |
|
| 27 |
endin |
| 28 |
</CsInstruments> |
| 29 |
<CsScore> |
| 30 |
; simple sine wave |
| 31 |
f 1 0 4096 10 1 |
| 32 |
|
| 33 |
i 1 0 5 128 |
| 34 |
i 1 6 5 512 |
| 35 |
i 1 12 5 1024 |
| 36 |
e |
| 37 |
</CsScore> |
| 38 |
</CsoundSynthesizer> |