Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05F03_Wvshp_different_transfer_funs.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 32
8 nchnls = 2
9 0dbfs = 1
10
11 giNat ftgen 1, 0, 2049, -7, -1, 2048, 1
12 giDist ftgen 2, 0, 2049, -7, -1, 1024, -.1, 0, .1, 1024, 1
13 giCheb1 ftgen 3, 0, 513, 3, -1, 1, 0, 1
14 giCheb2 ftgen 4, 0, 513, 3, -1, 1, -1, 0, 2
15 giCheb3 ftgen 5, 0, 513, 3, -1, 1, 0, 3, 0, 4
16 giCheb4 ftgen 6, 0, 513, 3, -1, 1, 1, 0, 8, 0, 4
17 giCheb5 ftgen 7, 0, 513, 3, -1, 1, 3, 20, -30, -60, 32, 48
18 giFox ftgen 8, 0, -121569, 1, "fox.wav", 0, 0, 1
19 giGuit ftgen 9, 0, -235612, 1, "ClassGuit.wav", 0, 0, 1
20
21 instr 1
22 iTrnsFnc = p4
23 kEnv linseg 0, .01, 1, p3-.2, 1, .01, 0
24 aL, aR soundin "ClassGuit.wav"
25 aIndxL = (aL + 1) / 2
26 aWavShpL tablei aIndxL, iTrnsFnc, 1
27 aIndxR = (aR + 1) / 2
28 aWavShpR tablei aIndxR, iTrnsFnc, 1
29 outs aWavShpL*kEnv, aWavShpR*kEnv
30 endin
31
32 </CsInstruments>
33 <CsScore>
34 i 1 0 7 1 ;natural though waveshaping
35 i 1 + . 2 ;rather heavy distortion
36 i 1 + . 3 ;chebychev for 1st partial
37 i 1 + . 4 ;chebychev for 2nd partial
38 i 1 + . 5 ;chebychev for 3rd partial
39 i 1 + . 6 ;chebychev for 4th partial
40 i 1 + . 7 ;after dodge/jerse p.136
41 i 1 + . 8 ;fox
42 i 1 + . 9 ;guitar
43 </CsScore>
44 </CsoundSynthesizer>
45 ;example by joachim heintz