Contour Recursion and Auto-Segmentation

1. Introduction[1.1] Contour theory and analysis has a multi-disciplinary basis in music research with significant contributions from ethnomusicology(1), cognitive science(2), composition theory(3), music analysis(4), and music information retrieval.(5) The literature on melodic contour is unified by agreement that rises and falls in pitch are salient, but the type of comparisons made (local, global, or all possible) varies widely. The most promising application of contour analysis is comparing melodic segments that are perceptually similar (gestalt) but differ in interval content. Yet we lack formal criteria for picking out segments from musical works to draw comparisons.[1.2] One of the most useful tools for describing contour and measuring similarity is the COM-matrix introduced and formalized by Robert Morris in his 1987 book Composition with Pitch-Classes (see Figure 1). A COM-matrix is produced by making comparisons between all pitches in the segment up to the possible degrees of adjacency (from 1 to \(n-1\)). Two segments of the same cardinality (n), whether found or generated, are considered equivalent if they produce the same matrix and sum to the same CSEG. If not, a calculation of similarity can be made, called CSIM by Marvin and Laprade (1987). The COM-matrix, CSEG classes, and CSIM have limited utility in computational analysis because of the need for manual segmentation. A computer must be told where to look and what cardinality to use. The COM-matrix also has a rigid standard for equivalence (hence the need for CSIM) and does not accommodate comparing segments of different lengths. Furthermore, these tools are intended for highly varied pitch content and struggle with recurring pitches within a melodic segment, which are likely to be found in tonal and non-Western musics. These issues--(1) segmentation, (2) equivalence, (3) cardinality sensitivity, and (4) pitch multiplicity--have motivated revisions and alternative formulations by theorists including Robert Morris (who devised the COM-matrix), David Huron, Larry Polansky and Ian Quinn.[1.3] Morris's contour reduction algorithm (1993) provides a much less rigid form of equivalence and fully accommodates comparison of different cardinalities of contour segments. Through pruning all but time- and height-extreme contour pitches, CSEGs are reduced to a prime of two, three, or four elements. However, the algorithm still depends upon segmentation, and segments reduced to primes lose characteristics that may be important. Complexity is tracked through the assignment of a depth based on the number of passes necessary to reach prime form. Still, Morris's algorithm continues to be a mainstay in music theory: it is central to recent dissertations by Schultz (2009), Bor (2009), and Sekula (2014), and Ohriner (2012) has applied it to rubato.[1.4] A concurrent body of work on contour comes from computational (or systematic) musicology, and more recently music information retrieval (MIR). Huron offers operational concepts of similarity, not restricted to contour, that make it possible to "characterize degrees of resemblance" beyond "absolute matches" (2002, 21). The Humdrum Toolkit (1994) includes two commands that can be used to calculate similarity between melodic contour segments, correl and simil. The user has the prerogative to set constraints on pattern matching, including assigning a penalty to deletions and insertions that make one object more like another. Another method, implemented by Huron in Humdrum, is a reduction based on initial pitch, final pitch, and the mean pitch in between, producing nine varieties of three-point gross shapes (1996).(6) The reduction of contour slices introduced in Section 7 of this article is more sympathetic to calculating an edit distance between segments of cardinality 10 and 11 (as in the simil command in Humdrum) than reducing all segments under consideration to primes (Morris 1993) or gross shapes (Huron 1996). …