Debian Codegraph @

examples/pvsfread.csd

raw
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 pvsfread.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 0dbfs = 1
14 nchnls = 2
15
16 ; analyze sound file, creating a PVOC-EX file
17 ires1 system_i 1,{{ pvanal stereoJungle.wav stereoJungle.pvx }} ; default settings
18
19 instr 1
20 ; create a PVOC-EX (*.pvx) file with PVANAL first
21 idur filelen "stereoJungle.pvx" ;find duration of (stereo) analysis file
22 kpos line 0,p3,idur ;to ensure we process whole file
23 fsigr pvsfread kpos,"stereoJungle.pvx", 1 ;create fsig from right channel
24 aout pvsynth fsigr ;resynthesise it
25 outs aout, aout
26
27 endin
28 </CsInstruments>
29 <CsScore>
30
31 i 1 0 20 ; slow down
32 i 1 21 1 ; speed up
33 e
34 </CsScore>
35 </CsoundSynthesizer>