In a question at Mathoverflow, I asked about how to measure the similarity of two musical notes:
The method is described here, and I will link to it, since I can not write math formulas here: https://drive.google.com/file/d/1EhXpiG1XremKbdS5AENZT3TvBV8JAwM8/view?usp=sharing
Looking at the second matrix from a musician perspective: Is the ordering ok as it is there or not?
Edit: For those interested in algorithmic generation of music, here is a csv-dataset I released using the similarity functions for consonance (pitch) and volume, durations, is-rest:
Related answer: https://music.stackexchange.com/a/4441/74955