Debian Codegraph @

examples/pvsmooth.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 pvsmooth.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
17
18 kacf = p4
19 kfcf = p5
20 asig soundin "fox.wav"
21 fsig pvsanal asig, 1024, 256, 1024, 1 ; analyse it
22 ftps pvsmooth fsig, kacf, kfcf
23 atps pvsynth ftps ; synthesise it
24 outs atps*3, atps*3
25
26 endin
27 </CsInstruments>
28 <CsScore>
29 ; amp freq
30 i 1 0 3 0.01 0.01 ;smooth amplitude and frequency with cutoff frequency of filter at 1% of 1/2 frame-rate (ca 0.86 Hz)
31 i 1 + 3 1 0.01 ;no smoothing on amplitude, but frequency with cf at 1% of 1/2 frame-rate (ca 0.86 Hz)
32 i 1 + 10 .001 1 ;smooth amplitude with cf at 0.1% of 1/2 frame-rate (ca 0.086 Hz)
33 ;and no smoothing of frequency
34 e
35 </CsScore>
36 </CsoundSynthesizer>