Debian Codegraph @

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

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