This code models a technique for mapping key press duration to musical duration within the "play note" block. It is a hack, but it works (mostly!). Press keys a, s, d, f, g, h, j, & k to play the notes of a major scale. They will sustain for however long you hold down each key, without retriggering the beginning of the note.
Performamatics@NYU http://experiencingaudio.org/.