Debian Codegraph @

examples/sprintfk.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac -iadc ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o sprintfk.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 48000
12 ksmps = 16
13 nchnls = 2
14 0dbfs = 1
15
16 ; Example by Jonathan Murphy 2007
17
18 instr 1
19
20 S1 = "1"
21 S2 = " + 1"
22 ktrig init 0
23 kval init 2
24 if (ktrig == 1) then
25 S1 strcatk S1, S2
26 kval = kval + 1
27 endif
28 String sprintfk "%s = %d", S1, kval
29 puts String, kval
30 ktrig metro 1
31
32 endin
33
34 </CsInstruments>
35 <CsScore>
36 i1 0 10
37 e
38 </CsScore>
39 </CsoundSynthesizer>