"Machine Musicianship is both a programming tutorial and an exploration of the foundational concepts of musical analysis, performance, and composition. The theoretical foundations are derived from the fields of music theory, computer music, music cognition, and artificial intell…