Hi Guys,
Super noob question : why does the following instrument enters every single condition for printing whenever the condition is not met ?
<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginID("def1")
keyboard bounds(8, 158, 381, 95)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
gkTest1 init 0
gkTest2 init 1
;instrument will be triggered by keyboard widget
instr 1
if gkTest1>0 then
prints " Test1 >0 "
if gkTest2==0 then
prints " Test2 = 0 "
else
prints " Test2 <> 0 "
endif
else
prints " Test1 <=0 "
if gkTest2!=0 then
prints " Test2 = 0 "
else
prints " Test2 <> 0 "
endif
endif
kEnv madsr .1, .2, .6, .4
aOut vco2 p5, p4
outs aOut*kEnv, aOut*kEnv
prints "\n\n"
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
</CsScore>
</CsoundSynthesizer>