# Musipedia

Musipedia is a search engine for identifying pieces of music. This can be done by whistling a theme, playing it on a virtual piano keyboard, tapping the rhythm on the computer keyboard, or entering the Parsons code. Anybody can modify the collection of melodies and enter MIDI files, bitmaps with sheet music (possibly generated by the Musipedia server after entering LilyPond or abc source code), lyrics or some text about the piece, or the melodic contours as Parsons Code. Certain features on the site may no longer work due to reliance on flash which became defunct in 2020.

## Search principles

Musipedia offers three ways of searching: Based on the melodic contour, based on pitches and onset times, or based on the rhythm alone. For the first two, users can draw notes, play them on a keyboard, or type out an ASCII version of a melody.

### Melody

The melodic contour search uses an editing distance. Because of this, the search engine finds not only entries with exactly the contour that is entered as a query, but also the most similar ones among the contours that are not identical. The similarity is measured by determining the editing steps (inserting, deleting, or replacing a character) that are needed for converting the query contour into that of the search result. Since only the melodic contour is relevant, one can find melodies even if the key, rhythm, or the exact intervals are unknown.

### Pitch and rhythm

The pitch and onset time-based search takes more properties of the melody into account. This search method, which is used by default, is still transposition-invariant and tempo-invariant, but it takes rhythm and intervals into account. The melody can be entered in various ways, for example by clicking on a virtual keyboard on the screen. The search engine then segments the query, converts each segment into a set of points in the two-dimensional space of onset time and pitch, and, by using the Earth Mover's Distance, compares each point set to pre-computed point sets representing segments of melodies from the database. As with the contour search, little alterations of the query will lead to correspondingly small changes in the results, which makes the search method somewhat error-tolerant.

### Tapping a rhythm

The "query by tapping" method that only takes the rhythm into account uses the same algorithm as the pitch and onset time method, but assumes all pitches to be the same. As a result, the algorithm can be used for tapped queries that only contain onset times.
This search method is also very easy to do for those with limited accessibility options or using very small input devices.

### Indexing

Both search algorithms are made faster with indices that are based on vantage objects. Instead of calculating the distance between the query and every single database entry, Musipedia just calculates the distance between the query and each of a few vantage objects. For every vantage object, the distance to each database entry is known. Since the triangle inequality holds for both the editing distance for contours and the variant of the Earth Mover's Distance used by Musipedia, the search algorithm needs, in a second step, to take a closer look at only those database entries whose distances to the vantage objects are similar to the distances between the query and the vantage objects.

## Comparisons with other audio search tools

Musipedia's search engine works differently from that of search engines such as Shazam. The latter can identify short snippets of audio (a few seconds taken from a recording), even if it is transmitted over a phone connection. Shazam uses Audio Fingerprinting for that, a technique that makes it possible to identify recordings. Musipedia, on the other hand, can identify pieces of music that contain a given melody. Shazam finds exactly the recording that contains a given snippet, but no other recordings of the same piece.
Musipedia is included in some library catalogs on music-finding, which include other papers and online resources.

## History

Musipedia was started by Rainer Typke in 1997 and has been developed by him since then. Before the Wikipedia-like collaboration features were added (editing and deleting existing entries has been possible only since 2004), he called the music search engine "Melodyhound".
Since 2006, the Musipedia search engine can also be used for searching the World Wide Web for MIDI files. Musipedia locates the MIDI files that go into its search index by using the Alexa Web Search service, which has been available since December 2005, through a partnership with Alexa.