Debian Codegraph @

src/Examples/FLOSS Manual Examples/04 Sound Synthesis/04E04_Distort_2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -dm0 -odac
4 </CsOptions>
5 <CsInstruments>
6
7 sr = 44100
8 ksmps =32
9 nchnls = 1
10 0dbfs = 1
11
12 giSine ftgen 1,0,1025,10,1
13 giTanh ftgen 2,0,257,"tanh",-10,10,0
14
15 instr 1
16 kAmt line 0, p3, 1 ; rising distortion amount
17 aSig poscil 1, 200, giSine ; a sine
18 aSig2 poscil kAmt*0.8,400,giSine ; a sine an octave above
19 aDst distort aSig+aSig2, kAmt, giTanh ; distort a mixture of the two sines
20 out aDst*0.1
21 endin
22
23 </CsInstruments>
24
25 <CsScore>
26 i 1 0 4
27 </CsScore>
28 </CsoundSynthesizer>
29 ;example by Iain McCurdy