Debian Codegraph @

examples/tableseg_tablexseg.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 tableseg_tablexseg.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
33 if p5 == 1 then ; make a choice
34 tablexseg 1, p3, 2 ; morph from table 1 to table 2
35 prints "2 tables morph exponentially (tables 1 & 2)\n"
36 else
37 tableseg 1, p3, 2 ; morph from table 1 to table 2
38 prints "2 tables morph in a linear way (tables 1 & 2)\n"
39 endif
40
41 asig vpvoc ktime, p4, "fox1.pvx"
42 outs asig, asig
43 endin
44
45 </CsInstruments>
46 <CsScore>
47 f 1 0 512 9 .5 1 0
48 f 2 0 512 7 1 512 0
49
50 i1 0 2.76 ; original sample
51
52 i2 5 2.76 1 0 ; linear morph
53 i2 8 2.76 1 1 ; exponential morph of filter
54
55 i2 10 10 1 0 ; linear morph
56 i2 10 10 1.7 0
57 i2 20 10 1 1 ; exponential morph
58 i2 20 10 1.7 1
59
60 e
61 </CsScore>
62 </CsoundSynthesizer>