-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_hidden_in_if.csd
60 lines (51 loc) · 1.04 KB
/
init_hidden_in_if.csd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<CsoundSynthesizer>
<CsOptions>
-m128
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
;a string to be copied at init- and performance-time
String strcpyk "yes!\n"
;print it at init-time
printf_i "INIT 1: %s", 1, String
;a copy assignment that will never become true during performance
kBla = 0
if kBla == 1 then
igoto skip
String strcpyk "no!\n"
endif
;nevertheless the string variable is initialized by it
printf_i "INIT 2: %s", 1, String
;during performance only "yes!" remains
printf "PERF %d: %s", timeinstk(), timeinstk(), String
;turn off after three k-cycles
if timeinstk() == 3 then
turnoff
endif
endin
</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>
<bsbPanel>
<label>Widgets</label>
<objectName/>
<x>100</x>
<y>100</y>
<width>320</width>
<height>240</height>
<visible>true</visible>
<uuid/>
<bgcolor mode="background">
<r>240</r>
<g>240</g>
<b>240</b>
</bgcolor>
</bsbPanel>
<bsbPresets>
</bsbPresets>