Debian Codegraph @

examples/gen06.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 gen06.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 between tables
19 kcps init 1/p3 ;create index over duration of note.
20 kndx phasor kcps
21 ixmode = 1
22 kval table kndx, ifn, ixmode ;normalize mode
23
24 kfreq = kval * 30 ;scale frequency to emphasixe effect
25 asig poscil .7, 220 + kfreq, 1 ;add to frequency
26 outs asig, asig
27
28 endin
29 </CsInstruments>
30 <CsScore>
31 f 1 0 16384 10 1 ;sine wave.
32 f 2 0 513 6 1 128 -1 128 1 64 -.5 64 .5 16 -.5 8 1 16 -.5 8 1 16 -.5 84 1 16 -.5 8 .1 16 -.1 17 0
33 f 3 0 513 6 0 128 0.5 128 1 128 0 129 -1
34
35 i 1 0 3 2
36 i 1 4 3 3
37 e
38 </CsScore>
39 </CsoundSynthesizer>