Debian Codegraph @

examples/pvoc.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -m0 --limiter=.95 ;;;realtime audio out, with limiter protection
5 ; For Non-realtime ouput leave only the line below:
6 ; -o pvoc.wav -W ;;; for file output any platform
7 </CsOptions>
8 <CsInstruments>
9
10 sr = 44100
11 ksmps = 32
12 nchnls = 2
13 0dbfs = 1
14
15 ; by Menno Knevel 2023
16
17 gilen filelen "Mathews.wav" ; get length of impulse soundfile
18
19 ; analyze sound file and output result to pvoc-ex file
20 ires system_i 1,{{ pvanal Mathews.wav Mathews1.pvx }} ; default settings
21
22 instr 1 ; untreated signal
23 asig diskin2 "Mathews.wav", 1
24 prints "\n---***YOU NOW HEAR THE UNTREATED SOUND SAMPLE***---\n"
25 outs asig*.8, asig*.8
26 endin
27
28 instr 2
29
30 prints "\n---***YOU NOW HEAR THE RESULT OF THIS ANALYZED FILE:***---\n"
31 ktime line 0, p3, gilen ; timepointer over the entire sample
32 asig pvoc ktime, p4, "Mathews1.pvx", 1
33 outs asig*.6, asig*.6
34 endin
35
36 </CsInstruments>
37 <CsScore>
38
39 i1 0 15.6 ; original sample
40
41 i2 17 10 1 ; no change so original sample is played
42 i2 28 2 1 ; played faster
43
44 i2 31 30 1 ; slowed down, same pitch &
45 i2 63 10 .6 ; sped up and lower pitch
46
47 e
48 </CsScore>
49 </CsoundSynthesizer>