-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_hidden_in_udo.csd
63 lines (57 loc) · 1.03 KB
/
init_hidden_in_udo.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
61
62
63
<CsoundSynthesizer>
<CsOptions>
-m128
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
opcode RndInt, k, kk
kMin, kMax xin
kRnd random kMin, kMax+.999999
kRnd = int(kRnd)
xout kRnd
endop
instr 1 ;opcode
kBla init 10
kBla random 1, 2
prints "instr 1: kBla initialized to %d\n", i(kBla)
turnoff
endin
instr 2 ;udo has different effect at i-time
kBla init 10
kBla RndInt 1, 2
prints "instr 2: kBla initialized to %d\n", i(kBla)
turnoff
endin
instr 3 ;but the functional syntax makes it different
kBla init 10
kBla = RndInt(1, 2)
prints "instr 3: kBla initialized to %d\n", i(kBla)
turnoff
endin
</CsInstruments>
<CsScore>
i 1 0 .1
i 2 + .
i 3 + .
</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>