Have you looked at CSound?
http://csound.github.io/documentation.html I'm really into the idea of having a standard for music scoring, and not just for music scoring, but also for like... identifying the instrument.
I wish that the music tools that existed accept CSound (or any standard) more. Your JS array is solid though :thumbsup-emoji: