| 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 pvsanal.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 |
instr 1 ;pvsanal has no influence when there is no transformation of original sound |
| 17 |
|
| 18 |
ifftsize = p4 |
| 19 |
ioverlap = ifftsize / 4 |
| 20 |
iwinsize = ifftsize |
| 21 |
iwinshape = 1 ;von-Hann window |
| 22 |
Sfile = "fox.wav" |
| 23 |
ain soundin Sfile |
| 24 |
fftin pvsanal ain, ifftsize, ioverlap, iwinsize, iwinshape ;fft-analysis of the audio-signal |
| 25 |
fftblur pvscale fftin, p5 ;scale |
| 26 |
aout pvsynth fftblur ;resynthesis |
| 27 |
outs aout, aout |
| 28 |
endin |
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
s |
| 33 |
i 1 0 3 512 1 ;original sound - ifftsize of pvsanal does not have any influence |
| 34 |
i 1 3 3 1024 1 ;even with different |
| 35 |
i 1 6 3 2048 1 ;settings |
| 36 |
|
| 37 |
s |
| 38 |
i 1 0 3 512 1.5 ;but transformation - here a fifth higher |
| 39 |
i 1 3 3 1024 1.5 ;but with different settings |
| 40 |
i 1 6 3 2048 1.5 ;for ifftsize of pvsanal |
| 41 |
|
| 42 |
e |
| 43 |
</CsScore> |
| 44 |
</CsoundSynthesizer> |
| 45 |
|