| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o pvsarp2.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 |
;; example written by joachim heintz 2009 |
| 17 |
; additions by Menno Knevel 2021 |
| 18 |
instr 1 |
| 19 |
ifftsize = 1024 |
| 20 |
ioverlap = ifftsize / 4 |
| 21 |
iwinsize = ifftsize |
| 22 |
iwinshape = 1 ; von-Hann window |
| 23 |
Sfile1 = "fox.wav" |
| 24 |
ain1 soundin Sfile1 |
| 25 |
fftin pvsanal ain1, ifftsize, ioverlap, iwinsize, iwinshape |
| 26 |
;make 3 independently moving accentuations in the spectrum |
| 27 |
kbin1 linseg 0.05, p3/2, .05, p3/2, .05 |
| 28 |
farp1 pvsarp fftin, kbin1, .9, 10 |
| 29 |
kbin2 linseg 0.075, p3/2, .1, p3/2, .075 |
| 30 |
farp2 pvsarp fftin, kbin2, .9, 10 |
| 31 |
kbin3 linseg 0.02, p3/2, .03, p3/2, .04 |
| 32 |
farp3 pvsarp fftin, kbin3, .9, 10 |
| 33 |
;resynthesize and add them |
| 34 |
aout1 pvsynth farp1 |
| 35 |
aout2 pvsynth farp2 |
| 36 |
aout3 pvsynth farp3 |
| 37 |
;aout = aout1*.3 + aout2*.3 + aout3*.3 |
| 38 |
outs aout1*1 + aout2*.5, aout2*.5 + aout3*.3 |
| 39 |
endin |
| 40 |
|
| 41 |
</CsInstruments> |
| 42 |
<CsScore> |
| 43 |
i 1 0 3 |
| 44 |
e |
| 45 |
</CsScore> |
| 46 |
</CsoundSynthesizer> |