That was my lack of research with the octaves. Apologies. I woldn’t want to waste someones time who’s trying to help.
I was in the middle of writing another long message/noob research then I solved it.
The outkpb needs to be outside of the if statement.
sr = 44100
ksmps = 10
nchnls = 1
massign 0, 130
pgmassign 0, 130
instr 130
kstatus, kchan, kdata1, kdata2 midiin
if ((kstatus == 144) && (kdata1%12==0) ) then
kpch=80
endif
if ((kstatus == 144) && (kdata1%12==1) ) then
kpch=50
endif
kpb = int(kpch) ;whole numbers only
outkpb 1, kpb, 0, 127 ;(= pitchbend)
endin
i130 0 3600This sends the message everytime the kpch is changed.
Thanks for all your time and help.