| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-odac --env:SSDIR+=../../SourceMaterials |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
ksmps = 32 |
| 8 |
nchnls = 1 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
;store the samples in function tables (buffers) |
| 12 |
gifilA ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1 |
| 13 |
gifilB ftgen 0, 0, 0, 1, "BratscheMono.wav", 0, 0, 1 |
| 14 |
|
| 15 |
;general values for the pvstanal opcode |
| 16 |
giamp = 1 ;amplitude scaling |
| 17 |
gipitch = 1 ;pitch scaling |
| 18 |
gidet = 0 ;onset detection |
| 19 |
giwrap = 1 ;loop reading |
| 20 |
giskip = 0 ;start at the beginning |
| 21 |
gifftsiz = 1024 ;fft size |
| 22 |
giovlp = gifftsiz/4 ;overlap size |
| 23 |
githresh = 0 ;threshold |
| 24 |
|
| 25 |
instr 1 |
| 26 |
;filters "fox.wav" (half speed) by the spectrum of the viola (double speed) |
| 27 |
fsigA pvstanal .5, giamp, gipitch, gifilA, gidet, giwrap, giskip,\ |
| 28 |
gifftsiz, giovlp, githresh |
| 29 |
fsigB pvstanal 2, 5, gipitch, gifilB, gidet, giwrap, giskip,\ |
| 30 |
gifftsiz, giovlp, githresh |
| 31 |
ffilt pvsfilter fsigA, fsigB, 1 |
| 32 |
aout pvsynth ffilt |
| 33 |
aenv linen aout, .1, p3, .5 |
| 34 |
out aenv |
| 35 |
endin |
| 36 |
|
| 37 |
</CsInstruments> |
| 38 |
<CsScore> |
| 39 |
i 1 0 11 |
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |
| 42 |
;example by joachim heintz |