| 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 sndwarp.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 |
ktimewarp line 0, p3, 2.7 ;length of "fox.wav" |
| 19 |
kresample init 1 ;do not change pitch |
| 20 |
ibeg = 0 ;start at beginning |
| 21 |
kwsize line 4410, p3, 2000 |
| 22 |
iwsize = 4410 ;window size in samples with |
| 23 |
irandw = 882 ;bandwidth of a random number generator |
| 24 |
itimemode = 1 ;ktimewarp is "time" pointer |
| 25 |
ioverlap = p4 |
| 26 |
|
| 27 |
asig sndwarp .5, ktimewarp, kresample, 1, ibeg, iwsize, irandw, ioverlap, 2, itimemode |
| 28 |
asig2 sndwarp2 .5, ktimewarp, kresample, 1, ibeg, kwsize, irandw, ioverlap, 2, itimemode |
| 29 |
outs asig, asig2 |
| 30 |
|
| 31 |
endin |
| 32 |
</CsInstruments> |
| 33 |
<CsScore> |
| 34 |
f 1 0 131072 1 "fox.wav" 0 0 0 ; audio file |
| 35 |
f 2 0 1024 9 0.5 1 0 ; half of a sine wave |
| 36 |
|
| 37 |
i 1 0 7 2 ;different overlaps |
| 38 |
i 1 + 7 5 |
| 39 |
i 1 + 7 15 |
| 40 |
e |
| 41 |
|
| 42 |
</CsScore> |
| 43 |
</CsoundSynthesizer> |