How to describe the shape of a melodic phrase? Scholars have often relied on typologies with a small set of contour types. We question their adequacy: we find no evidence that phrase contours cluster into discrete types, neither in German or Chinese folksongs, nor in Gregorian chant. The test for clustering we propose applies the dist-dip test of multimodality after a UMAP dimensionality reduction. The test correctly identifies clustering in a synthetic dataset, but not in actual phrase contours. These results raise problems for discrete typologies. In particular, type frequencies may be unreliable, as we see with Huron's typology. We also show how a recent finding of four contour shapes may be an artefact of the analysis. Our findings suggest that melodic contour is best seen as a continuous phenomenon.
Figures & tables
Figure 1: Three contour typologies. (A) [ 10 ] divided Lakota songs into five contour classes, each identified by one representative song. (B) [ 1 ] considers all possible orderings of the four boundary pitches: the type 3412 means that the initial note (i.e., 3) is above the final (2). In between, the melody first reaches a higher (4) and then a lower (1) pitch. (C) [ 21 ] considers the ordering of the average pitch on the first, middle, and final parts of a melody.
Figure 2: Tempo distributions of songs of the Maidu and Nuu-chah-nulth. Shown are histograms and kernel density estimates ( kde ). The tempos in Maidu music (A) cluster in multiple groups, suggesting a typology with a slow , medium and possibly fast type—which would not be appropriate for music of the Nuu-chah-nulth (B) .
Figure 3: Preprocessing. All contours are represented as sequences of 50 pitches, sampled from a step curve interpolating the melody (A–B) . Pitch is then standardized in five ways (C) : not at all ( pitch ), by centering to mean 0, by tonicizing or finalizing so that the tonic or final note is 0, or by normalizing so that the range is [0,1] . We add two relative representations (E) : the intervals between consecutive notes and a smooth version thereof. Finally, we compute the cosine contour , here illustrated in 2d (D) . Pairwise distances are computed using Euclidean distance, dtw dissimilarity, or distance in a 10-dimensional umap projection.
Figure 4: The dip-dist test discriminates clustered and unclustered synthetic datasets. (A) Synthetic contours are samples from a Markov process whose parameters are estimated from actual phrase contours. We create a clustered dataset by subsampling contours close to five suitably chosen cluster centers. (B) A two-dimensional umap visualization of the uniform dataset (gray) in which the clustered dataset (colored) is projected. The grid of black contours illustrates that umap organizes the space almost exactly like two-dimensional cosine contours ( “ascendingness” horizontally, “archedness” vertically). The cluster centers (encircled) correspond to distinct shapes. (C) The dip-dist test applies the Hartigans’ dip test on pairwise distances: a multimodal dataset should have a multimodal distribution of pairwise distances. (D) The dist-dip test correctly identifies the clustered dataset as multimodal but only using distances in a ten-dimensional umap embedding. This lower dimensional manifold appears more informative in that it more clearly separates the clusters (E) .
Figure 5: Melodic phrase contours do not cluster. Shown are the distributions of pairwise distances between contours in various conditions. If contours cluster, we expect multimodal distance distributions. We test this using the Hartigans’ dip test and let colors indicate p -values, such that grey distributions are not significantly multimodal ( α=0.05) . Eight different representations (vertically) and two metrics (horizontally) are analyzed: Euclidean distance and the distance in a lower-dimensional umap embedding. The latter successfully discriminates unclustered from clustered synthetic data ( C vs. D ; see also Figure 4 ). However, neither in phrases (A) nor in random segments (B) does the test find clear evidence for clustering.
Figure 6: A tolerance parameter ϵ distorts type frequencies in Huron’s typology. This typology compares the average pitch on a contour’s start, middle, and end, considering two pitches equivalent if their absolute difference is below a tolerance ϵ . The value of ϵ strongly influences the type distribution (A) . We propose to choose the ϵ that divides contours over types as evenly as possible (B) . While a small value ( ϵ=0.2 ) obscures partly horizontal types, a large one ( ϵ=3.0 ) exaggerates it (C) . Shown is a umap projection of aggregate phrase contours for only 5 out of the 9 types. Frequencies of all types are shown as histograms (D-F) .
Figure 7: k-Means centroids reflect cosines. A 2d principal component projection of unclustered synthetic contours is shown, colored according to a (k=4) -means clustering A . A grid of black contours in (A) illustrates how the space is organized, with the first two components essentially measuring ascendingness and concavity. More precisely, the principal components of such data approximate cosines of increasing frequency (B) . The clustering is stable across bootstrapped runs, as shown by the close centroids (crosses in A), and by their similar shapes (C) . The centroids consistently fall close to the principal axes, resulting in ascending, descending, convex and concave shapes—for primarily mathematical, not musical reasons.
Figure 8: Average phrase contours differ across three traditions. The average phrase contours of German folksongs, Gregorian chant, and Chinese folksongs compared to baselines of random melodic segments from the respective corpus (gray). They support the overall tendency for arch- or descending average contours but show interesting differences: the Chinese average is not arch-shaped and, strictly speaking, a counter-example to the melodic arch hypothesis. This illustrates how a continuous approach to contour typology can directly reveal cultural differences.
Music and Audio Research Group, Seoul National University · Department of Intelligence and Information, Seoul National University · AIIS, Seoul National University +1