@philoop, lets turn it into an object. Would you care to chime in? I got a naive implementation here, the only thing I am missing is a trigger on note OFF.... So if you have an idea how to make "trigger on note off" I think we got it. Again, this is naive approach, we can always optimize it, lets just get it working first.
It's basically a "note on counter", every time you push a note, the counter will take a step forward, every time you release a note, it will take a step backwards. Another function latches the values of the notes hold, as you described.
Note counter.axp (15.5 KB)
Any suggestions for the note off trigger?