| 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 pvsfilter.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 |
|
| 18 |
giSine ftgen 0, 0, 4096, 10, 1 |
| 19 |
giBell ftgen 0, 0, 4096, 9, .56, 1, 0, .57, .67, 0, .92, 1.8, 0, .93, 1.8, 0, 1.19, 2.67, 0, 1.7, 1.67, 0, 2, 1.46, 0, 2.74, 1.33, 0, 3, 1.33, 0, 3.76, 1, 0, 4.07, 1.33, 0; bell-like (after Risset) |
| 20 |
|
| 21 |
instr 1 |
| 22 |
ipermut = p4 ; 1 = change order of soundfiles |
| 23 |
ifftsize = 1024 |
| 24 |
ioverlap = ifftsize / 4 |
| 25 |
iwinsize = ifftsize |
| 26 |
iwinshape = 1 ; von-Hann window |
| 27 |
Sfile1 = "fox.wav" |
| 28 |
ain1 soundin Sfile1 |
| 29 |
kfreq randomi 200, 300, 3 |
| 30 |
ain2 oscili .2, kfreq, giBell |
| 31 |
;ain2 oscili .2, kfreq, giSine; try also this |
| 32 |
fftin1 pvsanal ain1, ifftsize, ioverlap, iwinsize, iwinshape; fft-analysis of file 1 |
| 33 |
fftin2 pvsanal ain2, ifftsize, ioverlap, iwinsize, iwinshape; fft-analysis of file 2 |
| 34 |
if ipermut == 1 then |
| 35 |
fcross pvsfilter fftin2, fftin1, 1 |
| 36 |
else |
| 37 |
fcross pvsfilter fftin1, fftin2, 1 |
| 38 |
endif |
| 39 |
aout pvsynth fcross |
| 40 |
outs aout * 30, aout * 30 |
| 41 |
endin |
| 42 |
|
| 43 |
</CsInstruments> |
| 44 |
<CsScore> |
| 45 |
i 1 0 2.757 0; frequencies from fox.wav, amplitudes multiplied by amplitudes of giBell |
| 46 |
i 1 3 2.757 1; frequencies from giBell, amplitudes multiplied by amplitudes of fox.wav |
| 47 |
e |
| 48 |
</CsScore> |
| 49 |
</CsoundSynthesizer> |