| 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 pvsinfo.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 |
; by Menno Knevel 2021 |
| 17 |
|
| 18 |
; analyze sound file and output result to pvoc-ex file |
| 19 |
ires system_i 1,{{ pvanal fox.wav fox.pvx }} ; default settings |
| 20 |
ires1 system_i 1,{{ pvanal -n256 MSjungleMid.wav MSjungleMid.pvx }} ; different frame size |
| 21 |
|
| 22 |
instr 1 |
| 23 |
|
| 24 |
if p4 == 0 then |
| 25 |
idur filelen "fox.pvx" ;find duration of analysis file |
| 26 |
kpos line 0,p3,idur ;to ensure we process whole file |
| 27 |
fsrc pvsfread kpos, "fox.pvx" ;create fsig from (mono) file |
| 28 |
prints "\n---***you now hear the analyzed file fox.pvx***---" |
| 29 |
else |
| 30 |
idur filelen "MSjungleMid.pvx" ;find duration of analysis file |
| 31 |
kpos line 0,p3,idur ;to ensure we process whole file |
| 32 |
fsrc pvsfread kpos, "MSjungleMid.pvx" ;create fsig from (mono) file |
| 33 |
prints "\n---***you now hear the analyzed file MSjungleMid.pvx***---" |
| 34 |
endif |
| 35 |
|
| 36 |
iovl,inb,iws,ifmt pvsinfo fsrc ;get info |
| 37 |
prints "\n Overlap size = %d\n", iovl ;print info |
| 38 |
prints " Number of bins = %d\n",inb |
| 39 |
prints " Window size = %d\n",iws |
| 40 |
prints " Frame Format = %d\n",ifmt |
| 41 |
prints "\n" |
| 42 |
aout pvsynth fsrc |
| 43 |
outs aout, aout |
| 44 |
|
| 45 |
endin |
| 46 |
</CsInstruments> |
| 47 |
<CsScore> |
| 48 |
i 1 0 3 0 ; the fox |
| 49 |
i 1 5 13 1 ; the jungle |
| 50 |
e |
| 51 |
</CsScore> |
| 52 |
</CsoundSynthesizer> |