How else can you classify music.
Everyone knows that this business is very, very not simple. How hard it can be read at
kurokikaze . At one time I read the book by A.V. Voloshin "Mathematics and Art". And that's what came up.
We can try to find the melody by its small fragment, but for this we will need to translate it into some more simple form. For example, at the entrance we will have a file mp3, wav, ogg or some other. Next, we build the sonogram of this file, filter and, if necessary, select the lead melody as far as possible. Next, we transpose the resulting melody, that is, for example, from the key of A major translate into C major. With this, the programs for getting midi-files for cell phones do quite well. Aesthetics will not worry us much. Next, we build a table of transitions between notes. Usually, when analyzing, the frequency of occurrence of notes is used and histograms are built:

')
Horizontal serial number of the note, vertically its frequency of occurrence.
And we do it like this:

Horizontal and vertical ordinal number of the note. The larger the circle, the more often the transition between notes. The first graph can be easily obtained from the second, if we sum up the values in each column
Next we feed all of this to the database and try to find the most appropriate passage. The search criteria can be the difference between the matrices.
This can be used, for example, in searching for melodies, classifying a melody, if no data is known about it anymore, you can try to find the author of an unknown melody, maybe licensing (which singer from whom stole the song, and so on).
PSIf anyone is interested - in the pictures is Beethoven, a string quartet in E-flat major.