Would be great to read a write-up on how you approached it. Also, it seems pretty tight - how are you doing the timing loop? Also also, Great job!
Thankfully the timing is handled by the Tone.js framework. It allows you to sync events with a callback function which passes in a 'time' argument that keeps everything in line.
Do you still gig?
Be sure to post it back here when you publish and also link to it from your Github repo (in case it doesn't land on the front page of HN).
I've been playing around with simply building a metronome using nothing but native JS and it's a chore. I'll have to check out Tone.js.
Great work!