Debian Codegraph @

examples/trigger.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 trigger.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 kmtr lfo 1, 1, 1 ;triangle wave
19 kmode = p4
20 ktr trigger kmtr, .5, kmode
21 printk2 ktr
22 schedkwhen ktr, 0, 3, 2, 0, .3
23
24
25 endin
26
27 instr 2
28
29 aenv linseg 0,p3*.1,1,p3*.3,1,p3*.6,0 ;envelope
30 a1 poscil .3*aenv, 1000, 1
31 outs a1, a1
32
33 endin
34 </CsInstruments>
35 <CsScore>
36 f 1 0 16384 10 1 ;sine
37
38 i 1 0 3 0 ;down-up
39 i 1 4 3 2 ;down-up & up=down
40
41 e
42 </CsScore>
43 </CsoundSynthesizer>