Demonstration of extracting a key estimate from an SVG image of music notation.

Key analysis directly from SVG images

The following example generates a pitch-class histogram table directly from the displayed SVG image. As you mouse-over notes in the image or rows in the table, all similar pitch-classes will be highlighted in the notation. The pitch histogram is also analyzed to calculate an estimated musical key for the music, which is displayed above the pitch-class table. Columns in the table can be sorted by clicking on the little arrows to the right of the column headings.

Try editing the Humdrum data in the box below (or paste in new data). The notation should update as you change it, and the table of pitch-class counts/durations further below should update as well.





View the Markdown source for this page to view the JavaScript code for the example.