Debian Codegraph @

examples/gen02.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 gen02.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 ifn = p4 ;choose different tables of GEN02
19 kcps init 1/p3 ;index over the length of entire note
20 kndx phasor kcps
21 ixmode = 1 ;normalize index data
22 kamp tablei kndx, ifn, ixmode
23 asig poscil kamp, 440, 1 ;use GEN02 as envelope for amplitude
24 outs asig, asig
25
26 endin
27 </CsInstruments>
28 <CsScore>
29 f 1 0 8192 10 1 ;sine wave
30 f 2 0 5 2 0 2 0
31 f 3 0 5 2 0 2 10 0
32 f 4 0 9 2 0 2 10 100 0
33
34 i 1 0 2 2
35 i 1 3 2 3
36 i 1 6 2 4
37 e
38 </CsScore>
39 </CsoundSynthesizer>
40