arXiv:2610.08236cs.SDOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.08236

Geometric Representations for Transformed Pattern Matching in Music

David Meredith

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

David Meredith

Aalborg University, Aalborg, Denmark

dave@create.aau.dk

https://www.titanmusic.com

Abstract. We review the notion of representing music using point sets and argue that such representations are better adapted than sequential representations for matching patterns in unvoiced, polyphonic music, such as keyboard music. Musical transformations such as transposition, inversion, diminution, augmentation and retrograde can be modelled by geometric transformations in pitch–time representations that combine translation with scaling parallel to and reflection in the time axis. We identify eight types of geometric pitch–time representation that use chromatic pitch, morphetic pitch, morph or chroma to represent pitch and either onset time or midtime to represent time. We illustrate how these types of representation allow us to characterise different types of musical transformation. For example, by using midtime instead of onset time, we can precisely characterise certain retrograde relationships; and by using morph and chroma pitch representations we can characterise transformations involving octave displacements and duplications. We present the concept of a transformation class and consider the three specific classes, F2STRF_{2STR}, F2STRMod7F_{2STRMod7} and F2STRMod12F_{2STRMod12}. We introduce the notion of an inter-pattern transformation graph for a set of patterns, S, and a transformation class, F. Each vertex in such a graph represents a pattern in S and there is an edge in the graph from pattern P1P_1 to pattern P2P_2 if and only if P1P_1 can be mapped onto P2P_2 by a transformation in F. We show, with the aid of such graphs, that the musical relationships between the occurrences of the HAYDN theme in Ravel's Menuet sur le nom d'Haydn can be precisely described in terms of transformations in F2STRF_{2STR}, F2STRMod7F_{2STRMod7} and F2STRMod12F_{2STRMod12} within the pitch–time representations considered.

1 Introduction

The main purpose of this paper is to review the idea of representing music using point sets and to present a number of specific types of point-set representation that prove to be particularly useful when one is interested in finding occurrences of patterns in music. Specifically, we consider the types of geometric representation that we need in order to find transformed matches of a user-supplied musical query pattern in a symbolic music encoding that we call a dataset that typically represents a piece or a collection of pieces. We assume that both the query pattern and the dataset are polyphonic. We also assume that they are unvoiced—that is, that the encodings of the query pattern and dataset do not contain explicit information about the voice or part to which each note belongs.

David Meredith

Figure

Fig. 1: Bars 0 to 8 of Maurice Ravel's Menuet sur le nom d'Haydn, showing one way of partitioning the notes into four "voices", indicated by the colours of the noteheads.

This problem of transformed pattern matching in unvoiced, polyphonic, symbolic music encodings can arise when the dataset is a symbolic encoding of a score (e.g., in Lilypond, MusicXML or MEI format) or a performance on a digital instrument (e.g., MIDI data), where information about voice structure is either entirely absent or needs to be ignored because it is unreliable, ambiguous or subjective. The problem is also relevant in the case of music which is unambiguously structured into voices (e.g., a baroque keyboard fugue, a string quartet or a choral work), but where one is interested in finding matches of a pattern that may contain notes from more than one voice.

The problem is particularly pertinent in the context of keyboard music, where it is not uncommon for voice structure to be ambiguous, as a result of the music not being explicitly constructed from concurrent parts associated with different instruments or singing voices. Indeed, in keyboard music, a voice can be something quite different from a monophonic vocal or instrumental part in a choral or orchestral work. A voice in keyboard music may consist of a homophonic sequence of chords or even a mixture of monophony and homophony, with chords containing a varying number of notes. Indeed, in keyboard music, a voice often corresponds more closely to an auditory stream [1], consisting of a sequence of events that are intended to be sequentially integrated in perception, than it does to a vocal part in a choral work. An example of this can be seen in the upper voice (coloured in red) in Fig. 1, which shows bars 0–8 of Maurice Ravel's Menuet sur le nom d'Haydn, composed in 1909. 1^{1} As exemplified by this excerpt, the score of a keyboard piece typically only hints at how the music is intended to be understood as being constructed from voices. It does this through various means, such as beaming or slurring together sequences of consecutive notes (or chords) in the same voice, or by using opposing stem directions for notes in different voices on the same staff. For example, the simultaneous blue and red chords on the first beat of bar 5 in Fig. 1 are assigned to different voices because the notes are attached to two different stems going in opposite directions, corresponding to the fact that the two chords are intended to be played by different hands. Moreover, because keyboard music is played on a single instrument, composers and editors are not compelled to be consistent (or even logical) in the way they structure the notes in the score into different voices. For example, one can find cases where notes that are apparently intended to be understood

1^{1}In this paper, we use the convention of numbering bars so that the first complete bar is assigned the number 1. Ravel’s Menuet begins with a one-crotchet anacrusis which is therefore assigned the bar number 0.

Figure

Fig. 2: Bars 33 to 36 of Maurice Ravel's Menuet sur le nom d'Haydn, showing three examples of a note in one voice being tied to a note in another.

to be in different voices are tied together—a physical impossibility in choral music (see Fig. 2).

These examples illustrate that the score of a piece of keyboard music does not always unambiguously communicate a single voice structure that we can reasonably expect will correspond to the way that all listeners will interpret the music. Consequently, if one wants to use computational tools to find matches of a query pattern in such music, and one adopts an encoding system or search algorithm that assumes that (1) each piece has a single, well-specified voice structure, and (2) that each match of the query pattern is contained within a single voice, then one runs the risk of failing to find matches of the query pattern that either contain notes from more than one voice, or that are contained within a single voice according to a different interpretation of the voice structure from the one that is encoded.

To address this problem, one might suggest considering “all possible” voice structures. However, it is not immediately obvious how one should define this universe of “possible” voice structures for any given score. One could, for example, be quite restrictive and require that every note in a voice must be one of the earliest notes following the end of the previous note in the same voice. However, as observed by Meredith [4, p. 5], even with this restrictive definition, the number of different voice structures will still typically be an exponential function of the number of notes, making the problem of searching through all of them seemingly intractable.

A case in point is shown in Fig. 3, which shows an occurrence of the HAYDN theme (B–A–D–D–G) at the end of Ravel's Menuet sur le nom d'Haydn that seems to have been overlooked in the literature on this piece, possibly because it is obscured by the voice structure indicated by the score, according to which the occurrence contains notes from different voices. Moreover, observe that the second D4 in the theme at the beginning of bar 53 lasts beyond the onset of the final G4 that starts on the third crotchet of bar 53. If we were to adopt a strategy of searching through “all possible” voice structures, we would therefore, in this case, have to remove the constraint that every note within a voice must start after the end of the preceding note, increasing still further the number of “possible” voice structures to search. In this paper, we therefore focus on methods that do not require that the encodings used contain information about voice structure.

David Meredith

Figure

Fig. 3: Bars 52 to 54 of Maurice Ravel's Menuet sur le nom d'Haydn, showing an occurrence of the HAYDN theme (in red) that includes notes that are from more than one notated "voice" and that overlap in time.