# Melodic Topologies

Skip other details (including permanent urls, DOI, citation information)For more information, read Michigan Publishing's access and usage policy.

Page 00000111 Melodic Topologies Kamil Adiloglu, Klaus Obermayer Department of Electrical Engineering and Computer Science, Berlin University of Technology kamil@cs.tu-berlin.de oby@cs.tu-berlin.de Abstract The inheritance property, originally defined by Mazzola (7) and Buteau (3) (4), indicates that two similar motives have similar submotives. This paper explains the application ofthe inheritance property as a condition into the similarity neighborhood model to define melodic topologies. The similarity neighborhood model is a correlation based model to measure the similarities between melodies to extract the melodic structure of a given musical piece. The subsegment relations of the melodic segments are identified as well. In this paper, it will be shown that the subsegment relations, defined using the inheritance property forms a topological basis. content neighborhood set of a given melodic segment contains melodic segments that are either subsegments of the given melodic segment or similar to a subsegment of the given one. The relation of containing a melody or being contained by a melody explains itself considering the positions of the melodies within a given piece. The inheritance property is utilized as a condition to define the presence and content neighborhood sets in two different ways. A weak neighborhood set does not guarantee that both the containing and contained melodic segments are similar to each other respectively. However the strong neighborhood considers whether the melodic segments contained (containing from the content neighborhood point of view) are also similar. The weak neighborhood sets do not satisfy the inheritance property, whereas the strong neighborhood sets do. In this paper, we define presence and content neighborhood sets for the equivalence classes and show that the collection of these sets define a topological base, if the inheritance property is satisfied by these sets. This fact ensures that the neighborhood sets satisfy the properties to form a base. Introduction Buteau (3) (4) defined a topological space within which the motives are the objects. In her model, a motif is defined as a finite set of notes such that only one note is heard at a given onset. The 6 - neighborhoods are defined for each motif based on the similarity degree of these motives. The inheritance property, defined by Buteau guarantees that the similarity of two motives is passed on the submotives. This ensures that the set of all 6 - neighborhoods forms a base for a topology. Adiloglu and Obermayer (2) defined a correlation based model to identify the similarities between melodies. This model differs from the model defined by Buteau in that only the consecutive notes, namely melodic segments are considered as melodies. Based on these similarities, the neighborhood sets are defined for each melodic segment. The similarity neighborhood set of a given melodic segment contains melodic segments similar to the given one. Adiloglu and Obermayer (1) redefined the presence and content of a given melody, defined originally by Mazzola (7) and Buteau (3) (4) as presence and content neighborhood. The presence neighborhood set of a given melodic segment contains melodic segments that either contain the given melody or similar to the melody containing the given one. The Similarity of Melodies The similarity neighborhood model makes use of similarities between melodies to identify melodic variations and to construct the melodic structure of the given piece. We need to apply a mathematical distance measure, in order to be able to measure these similarities. Therefore some musical concepts are defined in mathematical terms. In this model, we ignore the onset values of a note and take only the pitch values to represent a note. Hence, we define a melody m of length n as a sequence of n integers (t1, t2, t,, t ) C Z'. Its coordinates tj denote chromatic pitch. Note that a given piece, indicated by the capital letter M is also an ambient melody. The length of a given piece, the summation of the lengths of the voices of the given piece, is indicated by the capital letter N. A melody within the given 111

Page 00000112 piece is a subsequence of the given piece. So, a segment of a melody m is defined as a subsequence m" = (ti,..., i+n') of m, where i + n' <= n. Variations like augmentation and diminution are represented the same as the original melody, due to the representation that we chose, however, transformations, inversion and retrograde are not. In order to distinguish these kinds of variations from the original melody, the shape of the melody m is defined as p(m) = (t2 - tl, t3 - t2,.. tn - tn--1) So, the shape of a given melody is the sequence of intervals between the consecutive pitches. In order to measure the similarity between two melodies within a given piece we apply the Pearson's correlation coefficient (5). These correlation values enable us to detect similarities between transformations and inversions. Diminutions and augmentations cannot be distinguished from the original melody, but can be recognized, because they have the same melodic contour as the original melody. The retrograde of a melody cannot be identified. 2.1 The Similarity Neighborhood Set of a Melodic Segment The occurrences of a given melody are identified by measuring the similarities between the given melody and other melodies within the given piece. By collecting the melodies similar to the given melody together, we create the similarity neighborhood of the given melody, which is defined as follows: Definition 1 The similarity neighborhood ofa given melody m of length n within a given piece M is defined as. Each equivalence class is then represented by a single melody, namely by the representative melody of the corresponding equivalence class. Definition 3 The representative melody m* of an equivalence class is defined to be the melody with the similarity neighborhood set of largest cardinality. Collecting the similarity neighborhood sets under equivalence classes reduces the amount of results extremely as well as indicates the second, third ang higher order similarities of melodies in a better way. Because all the similarity neighborhood sets with non-empty intersectiond are united, there is not any interaction between the equivalence classes anymore. Corollary 1 The intersection of any equivalence classes is the empty set. Inheritance Property U (m,,M) R = {M: d(p(m),pu(Ml))\| > R}I 1 where c is a constnt. -2n1 where cl is a constant. The similarity neighborhood set of a given melody m contains equal length melodies M' similar to the given melody. 2.2 Representative Melodies The similarity neighborhood sets of two similar melodies of the same length often contain a lot of common melodies. Therefore we first unite the similarity neighborhood sets of the melodies, which have an intersection that is not empty, by the single-linkage clustering algorithm (6), in order to construct the transitivity closure of them, which we call equivalence classes. Definition 2 An equivalence class En(M) of melodies of length n is defined as the fixed point set of the iterative procedure of unification. Every equivalence class is indexed by its corresponding representative melody m*. Mazzola (7) and Buteau (3) (4) defined the inheritance property to explain motif-submotif relationships. Intuitively speaking, the inheritance property says that similar melodies have similar submelodies. Hence, recognition of motives depends psychologically on the recognition of their submotives. Hence, following this idea, the inheritance property defined by Mazzola and Buteau implies only one-directional relationship between motives and submotives, namely from motives to submotives. The similarity of two motives imply the similarity of their corresponding submotives. However, the inheritance property, we define as a condition, implies bidirectional relationship, namely, not only from segments to subsegments, but also from subsegments to segments: Definition 4 Given two melodies m and m' of length n and n' respectively, where m' = m", 1. if there is a melody m, s.t.Fm U (m, M), there exists another melody m', where m' = m' and m' E U2 (m', M), 2. if there is a melody m', s.t. m' C U' (m', M), there exists another melody m, where m' = m and m U (m, M). The first part of this definition indicates the direction from segments to subsegments. In other words, two similar segments imply that their corresponding subsegments are similar too. The first part of the definition is the same as defined by Mazzola and Buteau. The second part, however, indicates the other direction, which is actually used as a condition. This part says that if there are two similar melodies, their corresponding super segments are also similar. This bidirectional relationship is shown in the Figure 1. 112

Page 00000113 Figure 1: Bidirectional Inheritance Property PEq n (En (M)) PEq (Ekn (M)) U m'CEE-'(M) TC Enk ( (M) E/ (M)|m7 = UPEq' (Ekn(M)). Finding Subsequences A music-theoretical melodic analysis explains how the melodic material is introduced and used throughout the given piece. Therefore the segment relationships between melodies should be identified as well. In order to investigate the segment relationships of melodies, the inheritance property is utilized as a condition to define two neighborhood sets. 4.1 Presence Neighborhood The presence of a given melody is the appearance of the melody within other ambient melodies of the same piece and within similar melodies to those ambient melodies. Presence Neighborhood for the Melodies The set of all segments similar to a melody m' containing the given melody m is called the weak presence neighborhood of m. The segments that are contained within the weak presence neighborhood do not assure that similar segments to the given melody are contained within them at the corresponding positions. Hence, in general, the inheritance property does not hold for the weak presence neighborhood. In order to ensure the inheritance property, we define the strong presence neighborhood. The strong presence neighborhood of a given melody m contains only those segments M" from the weak presence neighborhood, which -in addition to being similar to a prominent segment m' containing m- have the property that the analogous subsegment in m" is also similar to m. Presence Neighborhood for the Equivalence Classes The presence neighborhood sets for the melodies also refer to the other presence neighborhood sets and contain more or less the same melodies for similar melodies. Therefore we define the presence neighborhood sets for the equivalence classes. Definition 5 The presence n'-neighborhood for the equivalence class Ek' (M) is defined to be the equivalence classes E [1 (M) containing a melody mi' that contain a melody mT in the equivalence class En (M). The presence neighborhood for the equivalence class Ena (M) is the union of presence n '-neighborhood sets for n' c]length(m*), lerngth(M)]: All the similar melodies are brought together within an equivalence class. So, if there are any melodies that contain any similar melodies, they should also be similar to each other. Therefore they belong to the same equivalence class. Corollary 2 If there are melodies m' of length n' that contain a melody from the given equivalence class E' (M), then they all belong to the same equivalence class E' (M), if the first part of the inheritance property holds. 4.2 Content Neighborhood The content neighborhood aims to identify the subsegments of a given melody and the segments similar to them. Content Neighborhood for the Melodies The set of all melodies similar to a subsegment m' of a given melody m is called the weak content neighborhood of the given melody. The weak content neighborhood contains only submelodies of a given melody and similar melodies to those submelodies. However, it is not considered whether the melodies containing those submelodies are similar in analogy to the given melody m or not. In other words, the inheritance property to m does generally not hold for the weak content neighborhood set. In order to guarantee that the inheritance property also holds, we define the strong content neighborhood. The strong content neighborhood of a given melody m contains only those similar segments from the weak content neighborhood, so that the melodies analogously containing these segments are also similar to the given melody. Content Neighborhood for the Equivalence Classes The content neighborhood sets of the similar melodies contain nearly the same melodies. Therefore defining the content neighborhood for the equivalence classes, which contain all of the similar melodies, reduces the amount of the results enormously. Definition 6 The content n'-neighborhood for the equivalence class E' (M) of the melodies m is the equivalence classes E[' (M) containing a melody rn/ that are contained by the melody n. The content neighborhood for the equivalence class E' (M) is the union the content n'-neighborhood sets for nr G[minimum melody length, length(m*)[ 113

Page 00000114 CEqn (En('M)) CEq (Ekn(M)) U m'TEE (M) m Eng(M) E" (M) |'= 1 ~mi = UCEq(E;n(M)). Corollary 3 The melodies m' of length n' of the content n 'neighborhood set of the given equivalence class E' (M) that are contained by a melody from the given equivalence class belong to the same equivalence class E/, (M), if the second part of the inheritance property holds. 4.3 Melodic Topologies In a mathematical approach, the similarity of two objects are covered by the concept of topology. Mazzola (7) and Buteau (3) (4) defined motivic topologies to explain the similarities between motives. They simply defined a topological space by constructing a topological basis consisting of the open sets, which contain similar motives. In our approach, we constructed a similarity based model explaining the similarities of melodies. As the next step, we show that our presence and content neighborhood sets for the equivalence classes define a topological base as well, if the inheritance property is satisfied. Theorem 1 The collection ofpresence neighborhoodfor the equivalence classes sets {PEq(Ek (M))} for a given a musical piece M defines a base for a topology T on the set {mm m M}, if and only if the inheritance property is satisfied. Proof: It is enough to show that given melodies m c E (M), m' E E" '(M), such that m' E PEq(Eni (M)) the following is true: PEq(E" (M)) C PEq(E (M)). Due to Corollary 2, m' E PEq(En (M)) means that PEq n f(EnM)) = E - (M). Suppose that there exists a melody m" G PEq(Ep' (M)). This means that there exists at least a melody m" such that m",m" E Ej (M) and m' - m".n where m', m' E En'(M). If the inheritance property holds, there should exist an--n other melody o E7n (M) such that o = m. This in turn means o = m 1. So PEq (Ek ((M)) = Eqn"(M) = PEq (E"'(M)). Hence the proof is done. Without the inheritance property, the existence of the melody o cannot be assumed. Therefore if the inheritance property does not satisfied the proof is incomplete. Based on Corollary 1, the intersection of presence neighborhood for the equivalence classes sets are either empty sets or they contain each other. So the set collecting all of the presence neighborhood sets for the equivalence classes define a topological base. The following theorem expresses the same from the content neighborhood for the equivalence classes point of view. Theorem 2 The collection of content neighborhood for the equivalence classes sets {CEq(EJ (M))} for a given a musical piece M defines a base for a topology T on the set {mmI M} }, if and only if the inheritance property is satisfied. Proof: The proof of this theorem is similar to Theorem 1. Conclusion This analysis procedure provides the similarity relationships between melodies within a given piece from a paradigmatic point of view. The subsegment relations are also handled by introducing the two-way inheritance property. From a psychological viewpoint, the inheritance property means that similarity of melodies is based on the similarity of their submelodies. From the mathematical viewpoint, if the inheritance property is satisfied, the so called equivalence classes, which contain similar melodies, form a topological base. References [1] Adiloglu K. and Obermayer K.: Finding Subsequences of Melodies in a Musical Piece in Proceedings of the ICMC 2005, pp. 483-486, Barcelona, 2005. [2] Adiloglu K., Noll T, and Obermayer K.: A Paradigmatic Approach to Extract the Melodic Structure of Musical Piece in Journal of New Music Research (submitted), London, 2005. [3] Buteau C.: Reciprocity between Presence and Content Functions on a Motivic Composition Space in Tatra Mt.Math.Publ. 23, pp. 17-45, 2001. [4] Buteau C.: A Topological Model of Motivic Structure and Analysis of Music: Theory and Operationalization, PhD Thesis, Universitit Zurich, Zurich, 2003. [5] Freund J. E. and Simon G.A.: Modern Elementary Statistics, Prentice Hall Inc, Englewood Cliffs, New Jersey, 1992. [6] Duda, R. O., Hart, P. E. and Stork, D. G.: Pattern Classification, John Wiley and Sons, New York, 2001. [7] Mazzola G.: The Topos of Music, Birkhiuser, Basel, 2002. 114