tracktable: fix cell color according to song structure
Rework player computation

* fix alternate repeat notation
* split some midi code from loop computation code
* add unit tests