Debian Codegraph @

examples/distort.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o distort.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 gifn ftgen 0,0, 257, 9, .5,1,270 ; define a sigmoid, or better
17 ;gifn ftgen 0,0, 257, 9, .5,1,270,1.5,.33,90,2.5,.2,270,3.5,.143,90,4.5,.111,270
18
19 instr 1
20
21 kdist line 0, p3, 2 ; and over 10 seconds
22 asig poscil 0.3, 440, 1
23 aout distort asig, kdist, gifn ; gradually increase the distortion
24 outs aout, aout
25
26 endin
27 </CsInstruments>
28 <CsScore>
29 f 1 0 16384 10 1
30 i 1 0 10
31 e
32
33 </CsScore>
34 </CsoundSynthesizer>