Debian Codegraph @

examples/gen05.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 gen05.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 for GEN05
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
24 outs asig, asig
25
26 endin
27 </CsInstruments>
28 <CsScore>
29 f 1 0 8192 10 1 ;sine wave
30 f 2 0 129 5 1 100 0.0001 29 ;short attack
31 f 3 0 129 5 0.00001 87 1 22 .5 20 0.0001 ;long attack
32
33
34 i 1 0 2 2
35 i 1 3 2 3
36
37 e
38 </CsScore>
39 </CsoundSynthesizer>
40