doi:10.1016/j.ins.2006.11.012
Copyright © 2006 Elsevier Inc. All rights reserved.
All maximal-pairs in step–leap representation of melodic sequence
Emilios Cambouropoulosa,
, Maxime Crochemoreb, c, 1,
,
, Costas S. Iliopoulosc, 2,
, Manal Mohamedc,
,
and Marie-France Sagotd, 3, 
aDepartment of Music Studies, University of Thessaloniki, 540006 Thessaloniki, Greece
bInstitut Gaspard-Monge, University of Marne-la-Vallée, 77454 Marne-la-Vallée Cedex 2, France
cDepartment of Computer Science, King’s College London, London WC2R 2LS, England, United Kingdom
dInria Rhône-Alpes, Laboratoire de Biométrie et Biologie Évolutive, Université Claude Bernard, 69622 Villeurbanne Cedex, France
Received 6 April 2005;
revised 23 November 2006;
accepted 25 November 2006.
Available online 20 December 2006.
References and further reading may be available for this article. To view references and further reading you must
purchase this article.
Abstract
This paper proposes an efficient pattern extraction algorithm that can be applied on melodic sequences that are represented as strings of abstract intervallic symbols; the melodic representation introduces special “binary don’t care” symbols for intervals that may belong to two partially overlapping intervallic categories. As a special case the well established “step–leap” representation is examined. In the step–leap representation, each melodic diatonic interval is classified as a step (±s), a leap (±l) or a unison (u). Binary don’t care symbols are used to represent the possible overlapping between the various abstract categories e.g. *=s, *=l and #=-s, #=-l. We propose an O(n+d(n-d)+z)-time algorithm for computing all maximal-pairs in a given sequence x=x[1..n], where x contains d occurrences of binary don’t cares and z is the number of reported maximal-pairs.
Keywords: String; Don’t care; Maximal-pair; Suffix tree; Lowest common ancestor; Combinatorial algorithm; Music retrieval; Repetitions
Fig. 1. Melodic pattern-matching example (the pitches of this example are taken from Bach’s Well-Tempered Clavier, Book I, Fugue in F# major).
Fig. 2. Melodic examples where an a = 1 interval (step) and an a = 2 (leap) should be matched (these positions are indicated by asterisks in the melodic examples). Brackets indicate extracted melodic maximal-pairs.
Fig. 3. The opening melody of Mussorgsky’s, pictures from an exhibition, Promenade. Extracted maximal-pairs are indicated by brackets.
Fig. 4. The suffix tree of xs = s s −s l l s −l s s −l l l s $.
Fig. 5. The suffix tree of xl = s s −l l l l −l s l −l l l s $.
Fig. 6. All-Maximal-Pairs algorithm.
Fig. 7. Jump&Report and Find-Maximal-Pairs subroutines.
Table 1.
Using dynamic programming to find all maximal-pairs

The bold values represent the periods of the reported maximal-pairs.
Table 2.
The values calculated and reported by All-Maximal-Pairs algorithm

The bold values represent the periods of the reported maximal-pairs.