Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05I06_phase_vocoder.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac --env:SSDIR+=../../SourceMaterials
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 32
8 nchnls = 1
9 0dbfs = 1
10
11 ;store the samples in function tables (buffers)
12 gifilA ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1
13 gifilB ftgen 0, 0, 0, 1, "ClassGuit.wav", 0, 0, 1
14
15
16 ;general values for the pvstanal opcode
17 giamp = 1 ;amplitude scaling
18 gipitch = 1 ;pitch scaling
19 gidet = 0 ;onset detection
20 giwrap = 1 ;loop reading
21 giskip = 0 ;start at the beginning
22 gifftsiz = 1024 ;fft size
23 giovlp = gifftsiz/8 ;overlap size
24 githresh = 0 ;threshold
25
26 instr 1
27 ;read "fox.wav" in half speed and cross with classical guitar sample
28 fsigA pvstanal .5, giamp, gipitch, gifilA, gidet, giwrap, giskip,\
29 gifftsiz, giovlp, githresh
30 fsigB pvstanal 1, giamp, gipitch, gifilB, gidet, giwrap, giskip,\
31 gifftsiz, giovlp, githresh
32 fvoc pvsvoc fsigA, fsigB, 1, 1
33 aout pvsynth fvoc
34 aenv linen aout, .1, p3, .5
35 out aenv
36 endin
37
38 </CsInstruments>
39 <CsScore>
40 i 1 0 11
41 </CsScore>
42 </CsoundSynthesizer>
43 ;example by joachim heintz