
Trying to make a musical instrument that can play a note for a variable amount of time. I'm using the Stop all sounds block to terminate a note when another note starts - but there is some unpleasant clicking and some lag that I'm not sure how to get rid of. Press the A, S, or D keys for as long as you like (up to 20 beats). Tone stops when you release a key. Tone switches to another tone when you press on a different key.