Debian Codegraph @

examples/pvsmaska.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 pvsmaska.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 ;; example written by joachim heintz 2009
17
18 ; function table for defining amplitude peaks (from the example of Richard Dobson)
19 giTab ftgen 0, 0, 513, 8, 0, 2, 1, 3, 0, 4, 1, 6, 0, 10, 1, 12, 0, 16, 1, 32, 0, 1, 0, 436, 0
20
21 instr 1
22 imod = p4; degree of midification (0-1)
23 ifftsize = 1024
24 ioverlap = ifftsize / 4
25 iwinsize = ifftsize
26 iwinshape = 1; von-Hann window
27 Sfile = "fox.wav"
28 ain soundin Sfile
29 fftin pvsanal ain, ifftsize, ioverlap, iwinsize, iwinshape; fft-analysis of file
30 fmask pvsmaska fftin, giTab, imod
31 aout pvsynth fmask; resynthesize
32 out aout, aout
33 endin
34
35 </CsInstruments>
36 <CsScore>
37 i 1 0 2.757 0
38 i 1 3 2.757 .5
39 i 1 6 2.757 1
40 e
41 </CsScore>
42 </CsoundSynthesizer>