Lua implementation of the 5 principle of tonal music from the book A Geometry of Music by Dmitri Tymoczko