Hi Peter,
Here is the latest
The calculation for note number is found in 1.0 “Send Sequence LP Pro”
// This sets the last note Last note played. We use that to turn of previous note on
qq=gf
// This is a general purpose counter. We set at 0 when we start the timer and increment it each time it
// runs. We set it back to 0 when we have completed the sequence
ga=ga+1
// This looks at sync signals. It is a MOD operator and will set rr to 0 every 24 sync signals
rr=ga%24
// If it is not a multiple of 24, we move on without doing anything else
if rr!=0 then exit rules, skip Outgoing Action
// gc is used to calculate the note to play. It is the base number where all note calculations are done
gc=gc+1
// skip over 9 and 0 – We are only insterested in 81-88 71-78 etc if it ends in 0 we want to skip over it
// Again we use the MOD operator to determine if it is a multiple of 10
pp=gc%10
// We also skip over if the remainder is 9 (ie 89, 79, 69 etc)
if pp==9 then gc=gc+1
// Calculate led to light
// gd = row ge = column
// calculate column
ge=gc%10
// If remainder is 0 we increment the note value
if ge==0 then gc=gc+1
// and set to the next column
if ge==0 then ge=ge+1
// calculater row
// Since rows go from top to bottome down, we have to reverse 10’s digit (which is row number)
gd=gc/10
gd=8-gd
// put together 10’s digit is row (reversed) and 1’s digit is column
pp=gd*10
pp=pp+ge
// pp now contains the note number
// capture last note for next iteration
gf=pp
// reset gp counter
ga=0
//set this to the last note (light displayed) before restarting
if pp==gg then ga=0
if pp==gg then gc=-1
// Special case to ensure we never go past last note on pad
if pp==18 then ga=0
if pp==18 then gc-1
You can find what every global variable is used for in 0.1 Init Global Variables