Heaps’ Law to Notes- Durations, Part II

by

in

Last week we got halfway through our exploration of the definition of notes and durations as “words” akin to words in language, and we finish up that discussion this week with the following figure:

Linear plot of Heaps’ Curve fit for pitch-duration “words”

Let’s walk through this plot, which uses the exact same data as the one last week but plots the points in a “log-log” plot.  All it means is that the logarithm of each point on the horizontal and vertical axis is plotted, not the raw number itself. The Heaps Curve is a power-law function, and a log-log plot rescales both axes logarithmically, which turns power-law relationships into straight lines and makes multiplicative growth patterns easier to analyze. 

This log-log plot clearly shows the convexity discussed by Serra-Peralta and by the newer 2026 discovery-dynamics paper.  The curve is not a perfect straight line, but not wildly inconsistent either.  

The important point is the deviations are structured.  This strongly suggests that the curve reflects genuine musical-historical dynamics rather than random noise.  Specifically early acceleration, mid-corpus consolidation, late diversification can all be seen in the above plot.  

Even though the curve is not perfectly linear, the fact that a single exponent still explains the data reasonably well across nearly 5 million tokens is statistically significant.  If there were no structure or grammar to the notes and durations, such a plot would not typically maintain stable sublinear growth, which just means that we continue discovering new note/duration combinations, but the rate of discovery gradually slows down.

Note that the blue curve moves upward at about a 45-degree angle for the first 5,000 “words” or so, suggesting that at first, the Skiptune database is discovering new “words” at a one-for-one pace.  At the start of any corpus, almost everything is novel, and repetitions are rare because the vocabulary has barely been explored yet.  

That transition point at about 5,000 “words” on the horizontal scale is important because at that point the corpus begins substantially reusing existing note-duration “words”.  That it stays with the fitted Heaps Curve (the orange curve in the figure) means the vocabulary begins stabilizing statistically, thus revealing the underlying generative structure of Western melody.

After that point, the fact that the observed curve stays very close to the fitted Heaps curve over millions of tokens is striking.  That implies the corpus is statistically self-consistent, the growth dynamics are remarkably stable, and the same generative constraints continue operating across different composers, different era, and different genres.  Tunes no matter what are still drawing from a common constrained vocabulary system.  

This is not a trivial finding.  The implication is that Western melodic construction may possess something analogous to a linguistic lexicon.  The result strongly suggests that pitch-duration events form a coherent statistical vocabulary.

Relationship to the Korean court-music paper

 

These results are surprisingly consistent with the Korean court-music findings:

Corpus

Unique pitch-duration types

Tokens

Approximate beta

Korean court music

555

65,817

~0.36

Skiptune

3,940

4,873,715

0.32

The Skiptune corpus is vastly larger and more stylistically diverse, yet the scaling regime remains similar.  That strongly supports the idea that pitch-duration vocabularies in music naturally inhabit a lower-beta regime than language.

 

Most Important Conceptual Implication

This experiment of defining a musical “word” as a pitch-duration pairs suggests that pitch-duration pairs are meaningful musical primitives, but they are probably not equivalent to full linguistic “words.” Instead, they behave more like syllables, phoneme clusters, or morphemic units. Morphemic units are parts of words that can’t be divided up any more, but taken together form a full word. The word “replayed”, for instance, has three morphemic units: “re”, “play”, and “ed”.

Despite the outstanding Heaps’ Law curve fit above, we suspect the pitch-duration pair is not quite a full “word” because the vocabulary is too compact, reuse is too strong, and the novelty growth is too constrained for them to function like true lexical words.

While pitch alone and duration alone generally fail Zipf/Heaps analyses much more severely, the pairing appears to capture a musically meaningful intermediate symbolic level.

Critique of Analysis Thus Far

The most important next step is to repeat the analysis with shuffled melody order. The late upward deviation may partly reflect historical chronology, era clustering, or corpus ordering effects. If reshuffling preserves the overall shape, that strengthens the claim that the scaling is intrinsic to music itself. If reshuffling materially changes the curve, then the Heaps behavior is partly encoding historical musical evolution rather than only static vocabulary structure.

Either outcome would be musically interesting.  That’s next week.