Debian Codegraph @

examples/seqtime2.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 seqtime2.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 gitabMap2 ftgen 57,0,512,-2, 1,1/4,1/4,1/8,1/8,1/8,1/8,1/4,1/4,.5,1/4,1/4,1/16,1/16,1/16,1/16,1/16,1/16,1/16,1/16
17 gisine ftgen 1,0,512,10, 1
18
19 instr 1
20
21 ktrigin metro .333333333333
22 ktrig2 metro 1
23 schedkwhen ktrig2, 0,0, 2, 0, .1 ; just to set the metronome!
24 kspeed init 1
25 ; ktime_unit, kstart, kloop, initndx, kfn_times
26 ktrig seqtime2 ktrigin, kspeed, 0, 20, 2, gitabMap2
27 ;ktrig seqtime kspeed, 0, 20, 0, gitabMap2 ; try with seqtime too...
28 schedkwhen ktrig, 0, 0, 3, 0, ktrig ; the duration is got from seqtime2 output!
29 endin
30
31 instr 2
32
33 a1 line 1,p3,0
34 aout oscili 0.7*a1,500,gisine
35 outs1 aout
36 endin
37
38
39 instr 3
40
41 a1 line 1,p3,0
42 aout oscili 0.7*a1,1000,gisine
43 outs2 aout
44 endin
45
46 </CsInstruments>
47 <CsScore>
48 i1 0 20
49
50 ;f0 3600
51 </CsScore>
52 </CsoundSynthesizer>
53