This is loosely based on something I was messing with on my guitar the other day.
This post also serves as a reason to create a helper script to embed ABC notation into a page and render it with midi controls. An alternative to the script I wrote would be to just use the abcjs plugin that renders all abc on a page that it finds.
Click anywhere on the score to see the ABC notation of this and even edit it yourself.