For the musicians out there, here's a macro that I use once in a while that was initially something I built with my basic HTML and JavaScript knowledge, but converted it to a simple KM macro.
I believe it's pretty self explanatory, but let me know if you find any issues: