What’s wrong at this code
bounds(0, 0, 0, 0)
form caption(“Untitled”) size(450, 450), colour(58, 110, 182), pluginid(“def1”)
rslider bounds(0, 0, 80, 120) range(0.05, 12, 1, 0.5, 0.01) increment(0.01) channel(“Rate”) text(“Rate [Hz]”) value(1) valuetextbox(1)
rslider bounds(80, 0, 80, 120) range(1, 32, 1, 1, 1) increment(1) channel(“MaxInter”) text(“Max-Intervall [n]”) value(1) valuetextbox(1)
rslider bounds(160, 0, 80, 120) range(1, 32, 1, 1, 1) increment(1) channel(“MaxSpr”) text(“Max-Sprungweite [n]”) value(1) valuetextbox(1)
rslider bounds(240, 0, 120, 120) range(0.001, 1, 1, 0.7, 0.001) increment(0.001) channel(“MaxErr”) text(“Max-Zulässiger-Fehler [n]”) value(1) valuetextbox(1)
button bounds(0, 125, 360, 80), channel(“button1”), text(“Decodieren enable”, “Decodieren disable”), colour:0(255, 255, 0, 255) fontcolour:0(255, 0, 255, 255) fontcolour:1(0, 255, 0, 255) colour:1(255, 0, 0, 255)
signaldisplay bounds(0, 200, 360, 170), colour(“lime”), backgroundcolour(“black”), displaytype(“waveform”), signalvariable(“kT”)
;instrument will be triggered by keyboard widget
instr 1
kRate chnget “Rate”
kST chnget “MaxInter”
kSD chnget “MaxSpr”
kSG chnget “MaxErr”
kF = 440 / 123.45
kTrig metro kRate
if kTrig == 1 then
if kF < 1 then
kF = 1 / kF
endif
kB1 = 0
kT = 1
kSG = 0.01
while ( ( kT < kST ) && ( kB1 == 0 )) do
kTT = ( kT + 1) / kT
kSE = 0
while ( (kSE < kSD ) && (kB1 == 0)) do
kSE = kSE + 1
; kkk#####
kZ = exp(log(kTT)kSE)
kZ2= kZ(1+kSG)
kZ1 = kZ * (1-kSG)
if ( kZ1 < kF ) && ( kF < kZ2) then
kB1 = 1
endif
; kkk#####
od
kT = kT + 1
od
printk 0, kT
display kT, .5, 1
endif
endin
Thanks in advance
Mungo1981