Retrieving Music --- To Index or not to Index

Pattern matching methods are used as an essential component in a large variation of multimedia applications. The search agents for Internet as well as various systems for retrieving images from image databases by image content are good examples. However, not too much research eeort has been directed yet for information retrieval in music databases. We present a coding of music (melodies) that is invariant under diierent musical keys and tempos. It can applied on melodies written in traditional notation using notes and staves. The conversion e.g. from MIDI les is straightforward. As our codes are linear discrete sequences, general string matching algorithms can be used for nding the occurrences of a melody sample in a music database. We report some experimental results on the performance of two alternative ways to organize such a search. One uses the suux-trie as an index for the database, the second makes an on{line search with the Boyer{Moore algorithm. Introduction In this paper we discuss some issues and ideas that we are experimenting with in our project which develops methods and software for music retrieval by music content. We use a simple two{dimensional relative coding to represent the melodies in the database. The coding of a note consists of two elements, the \vertical distance" or an interval between the note and its predecessor, and the \horizontal distance" or the relative duration of the note as compared to a designated base duration. The coding is invariant in two important respects, namely under transpositions and changes of the tempo. This considerably simpliies the music retrieval task. There are rather small number of intervals and relative durations of notes, that traditionally are used in (western) music. Therefore our coded presentation can be seen as a discrete linear string over a nite alphabet. Then the matching of a given melody sample, encoded in the same way, against the melodies in the database can be done by using the string matching algorithms originally designed for key{word matching in texts 3, 7].