*Seems* to me there's no need for the setTimeout

The bad thing about it is that you can see every key being played.  A
straight loop appears to perform better.