Debian Codegraph @

examples/vpvoc.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -m0 ;;;realtime audio out
5 ; For Non-realtime ouput leave only the line below:
6 ; -o vpvoc.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 2021
16
17 gilen filelen "fox.wav" ; get length of impulse soundfile
18
19 ; analyze sound file and output result to pvoc-ex file
20 ires system_i 1,{{ pvanal fox.wav fox1.pvx }} ; default settings
21
22 instr 1 ; untreated signal
23 asig diskin2 "fox.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 tablexseg 1, p3, 2 ; morph from table 1 to table 2
33 prints "2 tables are used as filter envelopes (tables 1 & 2)\n"
34 asig vpvoc ktime, p4, "fox1.pvx"
35 outs asig, asig
36 endin
37
38 </CsInstruments>
39 <CsScore>
40 f 1 0 512 9 .5 1 0
41 f 2 0 512 5 1 60 0.01 390 0.01 62 1
42
43 i1 0 2.76 ; original sample
44
45 i2 5 2.76 1 ; no change so original sample is played
46 i2 10 2 1 ; played faster
47
48 i2 15 10 1 ; slowed down, same pitch &
49 i2 15 10 1.2; higher pitch, forming a chord
50
51 e
52 </CsScore>
53 </CsoundSynthesizer>