notes… ok the issues stems from here… (this code is duplicated, so possibly needs changing in both places)
the issue is stripnote removes the note-off… (I’m not quite sure why you have makenote, as that’s not being used)
its a simple fix, just :
[r notes]->(note 1 $1 $2)->[s $0-iiwu]
I’m not sure what your other code is doing (not looked at it closely), so I don’t know if the stripnote code is needed or not, similarly ive not looked at the sequencer code, which is doing something similar, and probably also needs changing in some similar way.
but as least the above fix works for me for the main use case of playing from the keyboard