Debian Codegraph @

examples/genexp.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o genexp.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 instr 1
17
18 aswp linseg 0.01, p3*.5, .49, p3*.5, 0.01 ;index sweep function
19 aindex poscil aswp, 110, 1 ;sound to waveshape
20 atable tablei aindex, p4, 1, .5 ;waveshape index
21 aenv linen 0.8, .01, p3, .02 ;amplitude envelope
22 asig = (atable*aenv)*p5 ;impose envelope and scale
23 asig dcblock2 asig ;get rid of DC
24 outs asig, asig
25
26 endin
27 </CsInstruments>
28 <CsScore>
29 f 1 0 8192 10 1 ;sine wave
30 f 2 0 8192 "exp" 0 15 0
31 f 3 0 8192 "exp" 0 3 0
32
33 i1 0 3 2 2
34 i1 + 3 3 3
35
36 e
37 </CsScore>
38 </CsoundSynthesizer>
39