Form and structure

An ending that can be heard coming

Two measurements are both called hearing an ending coming and they point in opposite directions. By the halfway mark of an ordinary form almost nothing new arrives — and the cost of coding each bar has not fallen at all. Neither statistic says anything is about to stop, because no statistic over content can: predicting the next event well is not predicting that there will not be one.

Assumes: What makes an ending an ending · How much of this is new

A listener who has never heard a piece knows it is ending several seconds before it does. The previous rung found one of the reasons — the performance slows, and the slowing is a shape — but the phrase people use for the experience is hearing it coming, and that phrase covers two entirely different quantities.

One is statistical: a piece becomes more predictable as it goes on, and a listener who can predict what is next is in some sense ahead of it. The other is a set of signals that arrive at the end and say so.

Both are measurable here, and they disagree about almost everything: about when, about how much, and about what they are measuring at all.

Surprise, measured causally

How much of this is new built the machinery: a piece is a sequence of bars, each bar is a vector, and how novel a bar is can be computed against what has already been heard rather than against the whole piece.

The causal version is the one that matters here, because a listener at bar twenty has not heard bar thirty.

The boundary operator run over only what has been heard. Foote's checkerboard novelty on thirty-two-bar AABA at a kernel width of 4 bars, computed twice: once with the whole piece available, and once using only the bars heard up to and including each bar. The kernel reaches 4 bars forward, so every cell it needs has been heard 3 bars after its centre — the retrospective curve replotted 3 bars to the right lands on the causal one, and the operator turns out to be causal at a fixed delay rather than blind. The dashed verticals are the encoding's real section boundaries and are not an input.
Fig. 1 Novelty computed against what has been heard so far, bar by bar, through a thirty-two-bar song form. The curve is high at the start, drops through the second section, rises at the bridge — which is where the new material is — and comes down again for the last A. Nothing about the shape says the piece is nearly over.

The blunt version of the measurement is even clearer. Ask of each bar simply whether its chord in its key has been heard before, and count first occurrences by quarter.

Across the six schemes this collection carries, the first quarter is 51 per cent first occurrences on average. The second quarter is 6 per cent. The third is 11, and the last is 6.

By the halfway point of an ordinary form, the material has been exhausted. Whatever arrives afterwards is a rearrangement of things already heard, with the occasional new chord at a bridge.

And the coding cost does not fall

That looks like a story about predictability until the second measurement is made, and the second one does not agree.

The period, as the piece goes by. The strongest lag of thirty-two-bar AABA computed on only the bars heard so far, against how many bars that is. The final answer is 4 bars; it is revised 6 times on the way, and is not reached for the last time until bar 29 of 32, which is 91 per cent of the way through and 64 seconds at 108 beats a minute. Nothing about the boundary operator is involved: this is the global statistic, and it is the half of the form that a first hearing cannot have.
Fig. 2 The other statistic on the same schedule, and it is worse. The strongest lag computed on only the bars heard so far settles at four bars — and it is revised six times on the way, and not reached for the last time until bar 29 of 32, which is ninety-one per cent of the way through and sixty-four seconds in. A compression measure tells the same story from the other side: the cost per bar does not fall monotonically, and the quarterly means for this scheme run 3.80, 2.91, 5.16 and 3.11 bits. Only an ostinato — a form defined by having no new material at all — comes near a steady decline.

Run the coder incrementally and read off the cost of each bar as it arrives. For the thirty-two-bar song the quarterly means are 3.80, 2.91, 5.16 and 3.11 bits. For the rondo, 2.34, 2.74, 4.53, 2.84. For the sixteen-bar period, 1.83, 3.54, 2.45, 3.43.

The cost does not fall monotonically. Only the ostinato — which is a form defined by having no new material at all — comes near a steady decline.

Whether that is the music or the coder

That result is a claim about LZ78 until a second coder has been asked, and the essay’s own list of limitations says as much. So: the same six schemes, coded four ways — LZ78, and adaptive Markov models of order 0, 1 and 2, each charging −log₂ of the probability it assigned to the bar that arrived, which is a different family of coder with a different notion of what a repetition is worth.

LZ78 order-0 order-1 order-2
thirty-two-bar song no no no no
sixteen-bar period no no no no
rondo no no no yes
twelve-bar blues no no no yes
verse–chorus yes no no no
ostinato no yes yes yes

Does the cost fall from quarter to quarter?

No scheme falls under all four coders and no coder makes more than two of the six fall, so the headline survives the change of instrument. What does not survive is a smaller claim this section previously made — that the maximum is usually in the third quarter. Under LZ78 it is in the third quarter for the thirty-two-bar song and the rondo and nowhere else; under order-2 it is in the first quarter for five of the six. The two exceptions are the two forms with contrasting material in their second half, a bridge and a set of episodes, which is exactly the explanation the paragraph below gives — so the right statement is not that the peak is usually late but that it is late in the forms that put new material late, which is a fact about those forms rather than about coding.

And one of the two disagreements between coders is a defect in LZ78 worth naming. Its per-phrase price includes log₂ of the dictionary size, so the cost of describing a phrase rises as the coder learns more phrases, whatever the material is doing. On the ostinato that term is the whole story: LZ78 charges 1.07, 0.86, 0.48 and then 0.50 bits a bar, so the last quarter of a sequence that has been perfectly predictable for thirty bars comes out dearer than the one before it. The Markov coders, which have no such term, charge exactly zero from the second cycle on.

That is the correct answer and LZ78’s is an artefact. It also means a small part of the “the cost does not fall” result on every scheme is the dictionary term rather than the music — which is precisely why the second coder was needed, and why the conclusion is being rested on the four-coder table rather than on the numbers above it.

One thing the table settles that neither the essay nor its sources had asked: whether a better model of the piece would make the cost fall. The order-1 and order-2 coders are exactly that — each knows what usually follows what in this scheme, which the order-0 coder does not and LZ78 only half does — and they refuse to fall on the thirty-two-bar song and the sixteen-bar period as flatly as LZ78 did. So the failure is not a failure of modelling power. Giving the model more memory does not turn the second half of an ordinary form into cheap material, because the second half of an ordinary form is a choice among things all of which are now familiar, and a choice among familiar things costs bits.

The two measurements are not in conflict; they are measuring different things and both are honest. The first-occurrence count asks is this new, and the answer stops being yes early. The coding cost asks how expensive is it to say which of the known things this is, and that stays expensive as long as there are several known things to choose between. A form with a bridge has a wide vocabulary in its second half, and a wide vocabulary is dear per symbol however familiar each item is.

The boundary operator run over only what has been heard. Foote's checkerboard novelty on thirty-two-bar AABA at a kernel width of 8 bars, computed twice: once with the whole piece available, and once using only the bars heard up to and including each bar. The kernel reaches 8 bars forward, so every cell it needs has been heard 7 bars after its centre — the retrospective curve replotted 7 bars to the right lands on the causal one, and the operator turns out to be causal at a fixed delay rather than blind. The dashed verticals are the encoding's real section boundaries and are not an input.
Fig. 3 The same operator at a wider kernel, which is where the delay is a number. An eight-bar kernel reaches eight bars forward, so every cell it needs has been heard seven bars after its centre — and the causal curve is the retrospective one shifted by exactly that. Widening the kernel buys resolution at the boundaries and pays for it in lateness, one bar per bar of width, which is the whole trade a statistic over content has available.

Why no statistic over content can do this

Here is the reason the disagreement above is not a defect in either measurement, and it is the point of this rung.

Every quantity measured so far predicts what comes next. First-occurrence rates, coding costs, novelty curves, the probe-tone hierarchy and every expectation model in this collection answer the question given what has been heard, what is the next event likely to be.

An ending is not an event. It is the absence of a next event, and a model whose output is a distribution over next events has no state that corresponds to there not being one. A piece could be completely predictable, bar after bar, for ever, and nothing in the prediction would ever change to say it was about to stop.

The boundary operator run over only what has been heard. Foote's checkerboard novelty on a four-bar ostinato at a kernel width of 4 bars, computed twice: once with the whole piece available, and once using only the bars heard up to and including each bar. The kernel reaches 4 bars forward, so every cell it needs has been heard 3 bars after its centre — the retrospective curve replotted 3 bars to the right lands on the causal one, and the operator turns out to be causal at a fixed delay rather than blind. The dashed verticals are the encoding's real section boundaries and are not an input.
Fig. 4 An ostinato, scanned the same way. After the first cycle the novelty is essentially zero and stays there, which is what perfect predictability looks like. Nothing in this curve could ever indicate an ending, and an ostinato is precisely the form in which a cycle cannot cadence — because every point in it is followed by what it was always followed by.

So the statistical sense of heard coming is real and it is about content. It is not about closure, and it cannot be made to be.

The cues arrive late, and that is what they are for

The other sense is the closure signals, and their timing is the opposite of the statistics’.

The five components the first rung of this ladder measured are every one of them a property of the last chord or two: the root motion, the melodic degree, the metrical placement, the duration and the key. They arrive within the final two bars and before those two bars the vector says nothing at all. That is not a limitation. A signal that appeared thirty bars in advance would be useless, because it would have to be revised every time the piece did not end. The closure cues are late by design, they are strong, and they are the only thing in the piece whose content is this is the last one. The timing cue sits on the same schedule and slightly earlier: a ritardando begins a few bars from the end and is unambiguous within one or two of them — earlier than the harmonic cue and much later than any statistic.

That is not a limitation. A signal that appeared thirty bars in advance would be useless, because it would have to be revised every time the piece did not end. The closure cues are late by design, they are strong, and they are the only thing in the piece whose content is this is the last one.

Which puts a number on the difference

The two senses of the phrase operate on scales two orders of magnitude apart.

The statistics settle within the first half of a piece, which for a four-minute song is about two minutes. The cues arrive within the last few seconds. Between those two there is nothing: a stretch of a piece in which the content is entirely predictable and the ending is entirely unannounced.

That gap is where the false ending lives, and its existence is the best evidence that the cues rather than the statistics are what a listener is using.

How many bars of agreement before the next bar agrees too. Over 2 of the six schemes encoded here — thirty-two-bar AABA and two eight-bar phrases — every lag of at least one repeat unit and every bar: given k bars in which a passage has matched an earlier passage, the proportion of cases in which the next bar matches as well. One bar of agreement continues 39 per cent of the time and two bars 57 per cent, and the rate first passes nine in ten at 3 bars. 4 runs of more than three bars still broke: 3 of them in the second half of a repeat unit and 1 at a unit's first bar, which is a different event. The number under each point is how many cases it is a rate over.
Fig. 5 The whole form has its internal cadences at bars eight, sixteen and twenty-four, and every one of them supplies most of the closure vector while only the last supplies all of it — so a listener who took the cues at face value would stop three times. This is why they do not: given k bars in which a passage has matched an earlier one, how often the next bar matches too. One bar of agreement continues 39 per cent of the time and a longer run continues much more often, so a listener inside a repeat has a rising expectation that it will keep going — which is exactly the expectation a false ending exploits. A deceptive cadence supplies the metre, the duration and the melodic descent and withholds the bass motion; a half cadence supplies the metre and withholds the rest. A statistical model has no equivalent trick available, because it has no notion of finished.

Half of the cadences in this repertoire are built to fail, which is the second rung’s result, and it is precisely the machinery that makes a false ending possible. A deceptive cadence supplies the metre, the duration and the melodic descent and withholds the bass motion; a half cadence supplies the metre and withholds the rest. Each is a nearly-complete ending signal, deliberately incomplete.

A statistical model has no equivalent trick available. It cannot be nearly-finished, because it has no notion of finished.

The one statistic that does say something, and its cost

There is an exception to the claim above, and stating it exactly is what keeps the claim honest.

A model of this piece’s content cannot predict cessation. A model of elapsed time against a learned distribution of piece lengths can, and does: a listener who knows that songs in a style last about three minutes has a prior over when the end is due, and that prior is a genuine predictor with nothing musical in it.

How many bars of agreement before the next bar agrees too. Over every scheme encoded here, every lag of at least one repeat unit and every bar: given k bars in which a passage has matched an earlier passage, the proportion of cases in which the next bar matches as well. One bar of agreement continues 49 per cent of the time and two bars 48 per cent, and the rate first passes nine in ten at 4 bars. 12 runs of more than three bars still broke: 8 of them in the second half of a repeat unit and 4 at a unit's first bar, which is a different event. The number under each point is how many cases it is a rate over.
Fig. 6 The predictive view of a rondo — how far ahead the structure can be anticipated at each point, given what has been heard. It rises as the form’s habits become known and it is a statement about what returns, never about whether anything more will. A model that knew how long a rondo usually is would be using a fact about rondos and not about this one.

The cost of that exception is that it is a fact about the style rather than about the piece, which puts it in the same category as the cadence: something a listener brings. So the exception does not rescue the statistical account; it demonstrates the same point from the other side.

It also predicts something checkable. In a style with no standard length, elapsed time should carry no information about the end, and the cues should carry all of it. That is the situation in a raga performance, in a free improvisation and in a great deal of ceremonial music, and it is exactly where the ending signals are most explicit and most conventionalised — a drum cue, a fixed cadential figure, a repeated phrase landing on a beat.

What a first hearing has

The form a first hearing cannot have established that a great deal of what analysis calls form is only available in retrospect: a listener at bar four does not know that bar four is the end of a section, because the evidence is the repetition that has not happened yet.

The same asymmetry runs through this rung, and it separates the two senses again.

The statistics are available on a first hearing, because they are computed causally by construction. A listener does accumulate a vocabulary as the piece goes on, and the accumulation is what makes a bridge sound like new material.

The cues are available on a first hearing too, and this is the important part: the closure vector is a set of conventions a listener has learned from the whole repertoire rather than from this piece. A cadence works on a piece nobody has ever heard because the listener has heard a thousand others.

thirty-two-bar AABA, every bar against every other bar. A self-similarity matrix of 32 bars of thirty-two-bar AABA. Each cell is the cosine similarity of two bars' pitch-class vectors, with the chord's own notes weighted 1 and the rest of the key 0.5. Similarity is quantised into four bands for drawing and anything under 0.35 is left as paper. Nothing in the computation knows what a section is; the blocks and stripes are what the arithmetic returns.
Fig. 7 The distance matrix for the same form, which is the retrospective view: the whole piece compared with itself, with the repeated sections showing as blocks. This is the object analysis works with and it is the object a first hearing does not have — it requires having heard the end before describing the beginning.

So the honest summary is that a listener has two things at the end of a piece and they arrive from different places. The predictability comes from this piece and settles halfway through. The ending comes from every other piece in the style and arrives in the last few seconds.

The repeat, which is the cleanest test available

There is one place where a piece contains an explicit, in-the-notes answer to the question of whether it is about to stop, and this collection has already measured it.

Where a repeat is changed is about first and second endings: the same passage played twice, with the last bar or two different each time, precisely so that the first traversal continues and the second closes. That device is an admission, written into the score, that the material up to that point cannot distinguish the two cases — because it is the same material, and the composer had to append something to tell them apart.

A first- and second-time bar is a closure cue with the statistics held constant. Everything up to it is identical on both passes, so any difference in how it is heard is entirely attributable to the appended bar. That is as close to a controlled experiment as a score gets.

It also explains why the device is so short. If the ending had to be inferred from content, the second traversal would need to differ substantially; it needs one bar, because one bar is enough to supply the whole closure vector.

And it makes the same point about the statistics one more time. On the second pass, the material is more predictable than on the first — everything has now been heard twice — and that is the pass on which the piece ends. Predictability rose and the ending arrived; on the first pass predictability was lower and nothing ended. The correlation, over the only two cases the score provides, runs the wrong way.

Whose forms, and when

The schemes measured here are Anglo-American popular and common-practice forms — a twelve-bar blues, a thirty-two-bar song, a verse-chorus, a rondo, a sixteen-bar period, an ostinato — and every number in this essay is a number about those.

The argument that no content statistic can predict cessation is not repertoire-specific and does not need to be; it is a statement about what a predictive model’s output is. What is repertoire-specific is which cues a style uses, and the variety there is large.

A raga performance ends by convention and by cue rather than by harmony, and the cue is a coordinated acceleration and a fixed cadential figure. A gamelan ends on a drum signal, and the signal is a specific pattern that means what a cadence means. Both are learned conventions in exactly the way a cadence is, and neither is available to a statistical model of the piece’s own content either.

Which suggests the general form of the result. Closure is always a convention, in every repertoire, and it is always learned from outside the piece. What varies is whether the convention is harmonic, rhythmic, timbral or a cue from a drummer — and the reason a convention is needed at all is that the piece itself, considered as a sequence, contains no information about its own end.

What the picture cannot show

These are chord schemes, not pieces. Every measurement here is over a bar-by-bar harmonic reduction with a section label, which throws away the melody, the texture, the dynamics and the orchestration — all of which carry closure information, and one of which, the dynamic, is a strong cue this site does not model at all.

The coding cost is a property of a coder, and the section above is what happens when that is taken seriously rather than conceded. Three more coders agree on the negative result and disagree about the ranking of the quarters, which is the shape a conceded limitation usually has and is worth checking rather than stating: one of the disagreements turned out to be an artefact of LZ78’s dictionary term, and the ranking claim did not survive.

The novelty measure has a window and the window matters. Both the causal curve and the scan compare a bar against a neighbourhood, and the width of that neighbourhood decides which boundaries appear — which is the finding the boundary rung made and is not repeated here. The quarterly means are less sensitive to it than the peak positions are.

Nobody has been asked when they knew. The claim that listeners use the cues rather than the statistics is supported here by an argument about what the statistics could in principle say, and by the existence of false endings. It is not supported by a measurement of listeners, and the experiment — stop a recording at various points and ask how close to the end it was — is one this site cannot run.

The ladder from here

Four of the five closure components are present or absent. The fifth is not: silence has a continuous scale, so it is the one that can be given a threshold — and the threshold turns out to arrive from two directions that were not chosen to agree.

Part 4 of 13

One essay in the series on closure. The essays either side of this one:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

The objects named here

The third way in, after the field and the series: the things themselves, and every essay that touches each one.

CadenceClosureDescription lengthExpectationNoveltyRedundancySection boundarySegmentation