Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05F04_distort.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 gi1 ftgen 1,0,257,9,.5,1,270 ;sinoid (also the next)
12 gi2 ftgen 2,0,257,9,.5,1,270,1.5,.33,90,2.5,.2,270,3.5,.143,90
13 gi3 ftgen 3,0,129,7,-1,128,1 ;actually natural
14 gi4 ftgen 4,0,129,10,1 ;sine
15 gi5 ftgen 5,0,129,10,1,0,1,0,1,0,1,0,1 ;odd partials
16 gi6 ftgen 6,0,129,21,1 ;white noise
17 gi7 ftgen 7,0,129,9,.5,1,0 ;half sine
18 gi8 ftgen 8,0,129,7,1,64,1,0,-1,64,-1 ;square wave
19
20 instr 1
21 ifn = p4
22 ivol = p5
23 kdist line 0, p3, 1 ;increase the distortion over p3
24 aL, aR soundin "ClassGuit.wav"
25 aout1 distort aL, kdist, ifn
26 aout2 distort aR, kdist, ifn
27 outs aout1*ivol, aout2*ivol
28 endin
29 </CsInstruments>
30 <CsScore>
31 i 1 0 7 1 1
32 i . + . 2 .3
33 i . + . 3 1
34 i . + . 4 .5
35 i . + . 5 .15
36 i . + . 6 .04
37 i . + . 7 .02
38 i . + . 8 .02
39 </CsScore>
40 </CsoundSynthesizer>
41 ;example by joachim heintz