P3 algorithm visualised

This applet visualises the third algorithm presented in the article Sweepline the Music! by Ukkonen, Lemström and Mäkinen (2000). The algorithm is used for matching a pattern of notes on another set of notes and can be used for content based music searching. It calculates the overlap of the notes in the two sets with different placements of the pattern in time and pitch.

The blue arrows show which positioning of the pattern in black is beeing considered at the moment. The horizontal arrow tells how much the pattern is advanced or delayed from the position where the first note starts at time 0; the vertical arrow tells how the pitch is translated from the position shown. To help distinguishing the overlap curves corresponding to the different pitch translations, the pitch translation identifying the curve is printed beside the curve when a local maximum has been reached.

The reset button starts the matching from beginning, and the arrow buttons step to the previous or next turning point of the sweepline procedure (there are four types of turning points). The auto button switches automatically repeated forward stepping on or off.