Hi,
Nice project! Thanks for sharing.
Many things are going on. One formula in the Akay_TempoMaker grid seems to be selecting a y position based on the latest received midi note:
switch(midi.note.latest(1),89,30,88,40,87,50,86,60,85,70,84,80,83,90,99,60)
One tip to avoid having to manually calculate the percent value corresponding to each y position is to use the yToPercent function. You can simplify the formula this way, by using the y positions directly (I've used arbitrary positions in the example):
ytopercent(switch(midi.note.latest(1),8,7,8,4,7,4,3,6,5,7,8,8,8,9,9,6))
Another tip is to use the lastNoteIndex parameter of the midi.note.latest function. In the Akay_Scene_Selector grid:
IF(midi.note.latest(1) < 65,mem(0,(midi.note.latest(1)-1)%8)+1,last)
can become something like:
mem(0,(midi.note.latest(1, 1, 64)-1)%8)+1
And for the other sources using the result as their x position, the xToPercent function comes handy. So instead of:
IF(recall(1)>3 & recall(1)<9,recall(0)/8*100,last)
the formula becomes:
IF(recall(1)>3 & recall(1)<9, xtopercent(recall(0)),last)
The benefit is that if you resize the grid, it will still work since the width of 8 isn't hardcoded anymore. Also if you need the percent offset corresponding to one horizontal cell, you can use xToPercent(1).
As for the detection of start of the 1/16, maybe the timeout or the timeoutOrActive functions can help. Something like resetting a counter when there's a timeout of 5 seconds. So the formula in the Akay_TempoMaker grid becomes:
gmem(50,counter(1,16,onbeat(grid.powerat(x-2, y)),0,onbeat(midi.note(1, 90) | timeout(5,onbeat(grid.powerat(x-2, y)))) )/16*100-1)
The counter function resets when pressing the midi note 90 or if there's no beat detected for 5 seconds.