Debian Codegraph @

examples/FLsetText.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o FLsetText.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 128
13 nchnls = 2
14
15 ; Example by Giorgio Zucco and Andres Cabrera 2007
16
17 FLpanel "FLsetText",250,100,50,50
18
19 gk1,giha FLcount "", 1, 20, 1, 20, 1, 200, 40, 20, 20, 0, 1, 0, 1
20
21 FLpanelEnd
22 FLrun
23
24
25 instr 1
26 ; This instrument is triggered by FLcount above each time
27 ; its value changes
28 iname = i(gk1)
29 print iname
30 ; Must use FLsetText on the init pass!
31 if (iname == 1) igoto text1
32 if (iname == 2) igoto text2
33 if (iname == 3) igoto text3
34
35 igoto end
36
37 text1:
38 FLsetText "FM",giha
39 igoto end
40
41 text2:
42 FLsetText "GRANUL",giha
43 igoto end
44
45 text3:
46 FLsetText "PLUCK",giha
47 igoto end
48
49 end:
50 endin
51
52
53 </CsInstruments>
54 <CsScore>
55
56 f 0 3600
57
58 </CsScore>
59 </CsoundSynthesizer>