| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-odac --env:SSDIR+=../../SourceMaterials |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
ksmps = 32 |
| 8 |
nchnls = 2 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
;file should be found in the 'SourceMaterials' folder |
| 12 |
gS_file = "fox.wav" |
| 13 |
|
| 14 |
instr Defaults |
| 15 |
kSpeed = p4 ; playback speed |
| 16 |
iSkip = p5 ; inskip into file (in seconds) |
| 17 |
iLoop = p6 ; looping switch (0=off 1=on) |
| 18 |
aRead[] diskin gS_file, kSpeed, iSkip, iLoop |
| 19 |
out aRead[0], aRead[0] ;output first channel twice |
| 20 |
endin |
| 21 |
|
| 22 |
instr Scratch |
| 23 |
kSpeed randomi -1, 1.5, 5, 3 |
| 24 |
aRead[] diskin gS_file, kSpeed, 1, 1 |
| 25 |
out aRead[0], aRead[0] |
| 26 |
endin |
| 27 |
</CsInstruments> |
| 28 |
<CsScore> |
| 29 |
; dur speed skip loop |
| 30 |
i 1 0 4 1 0 0 ;default values |
| 31 |
i . 4 3 1 1.7 0 ;skiptime |
| 32 |
i . 7 6 0.5 0 0 ;speed |
| 33 |
i . 13 6 1 0 1 ;loop |
| 34 |
i 2 20 20 |
| 35 |
</CsScore> |
| 36 |
</CsoundSynthesizer> |
| 37 |
;example written by Iain McCurdy and joachim heintz |