Before using cluster analysis to see whether musical styles emerge naturally from the Skiptune database, we first needed to answer a more basic question: What characteristics of a tune should the computer measure?
34 Metrics
Early on in the Skiptune project, as we were entering tunes, we found ourselves wondering if certain patterns we were seeing were worth keeping track of. For instance, some tunes had a lot of the same pitches following one another, sometimes many times in a row. Other tunes seemed to have no pitches following each other, and instead would have an interval. We started keeping track of these as metrics and documented the 34 we came up with Comparing Tunes Using Metrics
Those metrics proved their worth in the creation of Chernoff faces. However, we created them by noticing interesting patterns as we were entering tunes, not in any systematic way. It is now time to to audit the existing 34-metric system for completeness, symmetry, implementation quality and redundancy. When that’s complete, we will add only the dimensions that were genuinely missing; and then prune the enlarged candidate set for redundancy.
Here are dthe original 34 metrics:
| # | Original metric |
| 1 | Number of Patterns Within a Tune As Percent of Notes |
| 2 | Number of Single-occurrence Patterns in Tune |
| 3 | Single-occurrence Patterns As Percent of Tune Patterns |
| 4 | Single-occurrence Patterns As Percent of Notes |
| 5 | Number of Rests per Note |
| 6 | Absolute Pitch Change Average |
| 7 | Relative Pitch Change Average |
| 8 | Use of Common Patterns |
| 9 | Use of Rare Patterns |
| 10 | Range of Pitches |
| 11 | Average Duration Ratio |
| 12 | Number of Runs Per Note |
| 13 | Average Run Length |
| 14 | Max Run Length |
| 15 | Repetitive Note Durations |
| 16 | Repetitive Note Pitches |
| 17 | Spread of Two-Note Pattern Frequencies, Weighted |
| 18 | Spread of Two-Note Pattern Frequencies, Unweighted |
| 19 | Pick-up Duration |
| 20 | Pick-up Percent |
| 21 | Average Duration Ratio Going to Rests |
| 22 | Average Duration Ratio Coming from Rests |
| 23 | Number of Different Pitches |
| 24 | Number of Different Pitch Differentials |
| 25 | Number of Different Durations |
| 26 | Number of Different Duration Ratios |
| 27 | Normalized Number of Different Pitches |
| 28 | Normalized Number of Pitch Differentials |
| 29 | Normalized Number of Durations |
| 30 | Normalized Number of Duration Ratios |
| 31 | Number of Repeated Intervals |
| 32 | Number of Repeated Duration Ratios |
| 33 | Percent of 3-Note Palindromes |
| 34 | Percent of Tunes with Same Individual Patterns |
Putting the Original Metrics into Families
The first step is conceptual rather than statistical. We group the metrics by the musical phenomenon they were intended to describe. This makes two things easier to see: Where several metrics were competing to describe the same phenomenon, and where an analogous musical dimension was missing.
| Family | Original metrics | What the family measures |
| Pattern vocabulary / rarity | 1, 2, 3, 4, 8, 9, 17, 18, 34 | Pattern diversity, rarity, commonness and corpus sharing |
| Rests | 5 | How much silence is present |
| Pitch vocabulary / range | 10, 23, 27 | Registral span and diversity of pitch vocabulary |
| Pitch movement / contour | 6, 7, 12, 13, 14, 24, 28, 31, 33 | Magnitude, interval vocabulary, persistence and local contour |
| Repeated pitch | 16 | Immediate pitch repetition |
| Rhythm / duration | 11, 15, 21, 22, 25, 26, 29, 30, 32 | Duration change, repetition, vocabulary and behavior around rests |
| Pickup / opening structure | 19, 20 | Anacrusis behavior |
To some extent, these categories are arbitrary. When a metric could reasonably be put into two or more categories, we had to pick one. For instance, “Rests” has just one metric (#5), but two of the Rhythm/duration metrics also include rests (#21 and #22). While we put them in the Rhythm/duration category, we must recognize that as a judgment call and that they could alsos have been placed into the Rests category.
What Was Missing from the Original 34 Metrics
The family audit showed that the original 34 were already broad, but they were not fully symmetrical or complete. The largest gaps were in duration movement and tonality.
Pitch had explicit run metrics (number of runs, average run length and maximum run length), but duration did not. Pitch and duration also lacked a clean pair of directional-change measures. Finally, the original system had no compact family explicitly describing tonal organization. Those omissions motivated Metrics 35–43.
| # | Added metric | Why it was added |
|---|---|---|
| 35 | Absolute Average Duration Change | Added as a cleaner measure of the magnitude of rhythmic movement and as a duration-side counterpart to pitch-movement magnitude. |
| 36 | Number of Duration Runs per Note | Added for symmetry with pitch Metric 12, Number of Runs Per Note. |
| 37 | Average Duration Run Length | Added for symmetry with pitch Metric 13, Average Run Length. |
| 38 | Maximum Duration Run Length | Added for symmetry with pitch Metric 14, Max Run Length. |
| 39 | Ascending Pitch Changes | Added to represent direction of pitch movement explicitly rather than only magnitude, range or persistence. |
| 40 | Increasing Duration Changes | Added as the rhythmic directional counterpart to Metric 39. |
| 41 | Diatonic Pitch Percentage | Added to supply an explicit measure of conformity to a diatonic pitch collection. |
| 42 | Tonic Emphasis | Added to measure concentration on the inferred tonic, a tonal property not captured by range or contour. |
| 43 | Pitch-Class Entropy | Added to measure concentration versus dispersion of pitch-class usage, completing a small tonal family. |
The enlarged candidate pool therefore contained 43 metrics: the original 34 plus nine deliberately chosen additions. The purpose of expansion was not to create more variables for their own sake. It was to make the candidate set sufficiently complete and symmetrical that pruning would be based on evidence rather than on omissions in the starting design.
Normalization Rule
While reviewing implementation, we adopted an important rule. When a metric is normalized for tune length, the denominator is based on the original tune events, not on a shortened derived sequence after rests or other events have been removed. The point of normalization is to prevent a long tune from receiving more opportunities to accumulate events merely because it is long. We don’t want to redefine the size of the composition after preprocessing as that would add an artificial distortion. Where a transition count naturally has n−1 opportunities, n−1 is appropriate, where n refers to the length of the original event sequence.
Next week we tackle the selection of which metrics we should keep for the purpose of cluster analysis, as well as any other analysis we might do where redundancy needs to obe considered.