Note: all the code for this article can be found here as a Github gist. There’s also a nice discussion on Hacker News with lots of comments that might be of interest. I’m a self-taught guitarist of many years, and like a lot of self-taught musicians, am woefully inept at (Western) music theory.

Read more