How to trigger& stop one particular note

I see lots of information on playing patterns, which will no doubt be useful for what they do.

Right now I want to send a note (at a time) from an external midi keyboard, store its midi note number in an array, stop that particular note when I take my finger off the key. (Even if I’ve mapped that key to a different frequency.) There’s a way to do this directly in Supercollider; I don’t see what the foxdot equivalent would be.