Comparing Music with Dynamic Programming String-Matching Algorithms


  • Rachel Huang
  • Dr. Fei Li



Existing commercial software compares songs based on qualitative characteristics such as key, tempo, and loudness, information that may not be very meaningful to the average user. In our project, we use the dynamic programming technique to compare songs based on temporal patterns in order to facilitate song recommendations. We begin by applying the standard string edit distance algorithm to sheet music that has been converted into text files; however, since this standard algorithm considers all characters to be of equal weight, the differences between various song comparisons are not apparent. We emphasize these discrepancies by weighting the aforementioned temporal patterns common to both strings as well as integer differences between consecutive notes based on values that we assigned to the chromatic scale. Our experimental results show that our approach of condensing two songs’ temporal similarities into one clear value is able to return the song that has the lowest output value, presumably the most similar-sounding song. These results can be extended with machine learning to automatically assign and adjust weights for these characteristics in order to further improve comparisons.





College of Engineering and Computing: Department of Computer Science