Harmony and voice leading

Asked for the rate, it answers a multiple

A reading that follows the chord rate rather than the bar can be asked what the rate is, and the shape of its errors is the whole of why it looked like a barline detector. Given two chords a bar it returns the right period a third of the time and something slower two thirds; given a chord every two bars it is right nine times in ten. It errs slow and essentially never fast, because a change every four slots also falls on every eighth slot and a slower grid inherits a faster rate's evidence — which is the same asymmetry that makes a pitch detector report an octave too low.

Assumes: The change reading follows the chords, not the bar · The chords mark the barline by changing there

The essay that turned the chord rate found that the harmonic barline reading is not a barline detector. It scores how much the pitch-class content changes at a boundary, and what it finds is where the chords change — which is the barline only when the chords change once a bar, and is nothing at all when they change twice. The essay that found the harmony marking the barline by changing there was made entirely at the first of those settings.

A measure that follows the chord rate is a harmonic-rhythm detector that has been asked the wrong question. The right question is what the rate is, and it can be scored the same way: instead of eight candidate alignments at one period, a set of candidate periods, each taken at its own best offset and standardised against the same shuffled null.

Asked that, the reading is much better than it looked — and its errors are all in one direction.

Asked for the rate, it answers a multiple of it. The change reading asked its own question — what period do the chords change at — over passages built at three harmonic rhythms, with its standardised score for each candidate period. Given 2 chords a bar it recovers the rate 33 per cent of the time and answers too slow 65; Given 1 chord a bar it recovers the rate 58 per cent of the time and answers too slow 38; Given a chord every two bars it recovers the rate 93 per cent of the time and answers too slow 0. It never errs fast in the way it errs slow, and the reason is structural: a chord change every four slots also produces a change at every eighth slot, so a slower grid inherits a faster rate's evidence and a faster grid cannot inherit a slower one's. That ambiguity is why the reading looked like a barline detector in the first place — the bar is a multiple of every harmonic rhythm that fits inside it.
Fig. 1 The reading’s standardised evidence for each candidate period, over passages built at three harmonic rhythms. The outlined cell in each row is the rate the passage was actually built at.

The errors are one-sided

Given passages that change chord every sixteen slots — once every two bars — the reading returns sixteen nine times in ten, and the remaining tenth it returns eight. Given one chord a bar it returns eight 60 per cent of the time and something slower 38. Given two chords a bar it returns four 33 per cent of the time and something slower 68.

The asymmetry is the finding. Over every setting, the reading errs slow and essentially never fast, and the reason is structural rather than statistical.

A chord change every four slots also produces a change at every eighth slot — every second change falls on the slower grid, so a grid of eight sees half the changes and sees them at a consistent offset. A grid of four, given a passage that changes every eight, sees a change on alternate grid points and nothing on the others, which is worse than useless: it dilutes the evidence rather than halving it.

So a slower candidate inherits a faster rate’s evidence at a discount, and a faster candidate cannot inherit a slower one’s at all. Multiples of the truth are available and divisors are not, which is exactly the asymmetry that makes an autocorrelation pitch detector report an octave too low.

Which is why the bar looked so convincing

Put that together with the essay below and the three essays before it stop being a puzzle.

The bar is a multiple of every harmonic rhythm that fits inside it. Two chords a bar, one a bar, a chord a beat: every one of them puts changes on the barline grid, at a discount but consistently. That is the ambiguity the chords never move the barline could not have seen, since it held the rate fixed too. So a reading scored at the barline period has evidence in every passage, whatever the harmonic rhythm — and the earlier essay, reading passages at one chord a bar, saw that evidence at full strength and concluded the reading had found the bar.

The change reading follows the chords, not the bar. How far above the other candidates the true barline stands, in standard units, for the reading that scores how much the pitch-class content changes at each candidate — at three harmonic rhythms. At 2 chords a bar the margin is 0.12 and the reading finds the barline 12 per cent of the time; At 1 chord a bar the margin is 1.66 and the reading finds the barline 42 per cent of the time; At a chord every two bars the margin is 0.47 and the reading finds the barline 27 per cent of the time, against a chance rate of 13 per cent. The passages read earlier all changed chord once a bar, which is the middle column and the only one where the reading has anything. Two chords a bar puts a change at the half-bar as well and the reading cannot tell the two apart; a chord every two bars leaves half the barlines with no change at all and the margin halves exactly.
Fig. 2 The essay below: the change reading’s margin at the barline, against how often the chords change. Its collapse at two chords a bar is the same phenomenon seen on the alignment axis — the barline and the half-bar both inherit the faster rate’s changes, equally, so neither wins.

The two figures are one result drawn twice. On the alignment axis a rate that is a divisor of the bar puts equal evidence at the barline and the half-bar, so the margin vanishes; on the period axis the same rate puts evidence on its own grid and on every multiple of it, so the answer drifts slow. Both are the statement that a change-based measure cannot distinguish a period from its multiples.

Why a slow rate is easier than a fast one

The recovery rates rise steeply with the period — a third, then three fifths, then nine tenths — and two separate things are pushing them up, which is worth separating because only one of them is about the bias.

A slow rate has fewer competitors below it. A passage at sixteen slots can be mistaken for thirty-two and nothing else in the candidate set, because there is nothing slower drawn. A passage at four can be mistaken for eight, sixteen or thirty-two, and the bias sends probability to all three. So part of the climb is the edge of the candidate set rather than a property of the measure, and a figure drawn out to thirty-two would flatten the top row somewhat.

And a slow rate gives cleaner comparisons. At sixteen slots a chord occupies a whole window, so the two windows either side of a boundary contain one chord each and differ as much as two chords can. At four slots a window is four slots long and often contains three notes, so the comparison is between two small samples and the difference between them is mostly sampling noise. The measure is not only biased at fast rates; it is noisier there, because there is less to average.

Those two together mean the honest reading of the figure is directional rather than quantitative. The reading recovers a slow harmonic rhythm well and a fast one poorly, the bias is one-sided at every rate, and the precise recovery percentages depend on how many candidate periods are offered and how long the passages are.

What that makes the measure good for

A detector with one-sided errors is not a bad detector; it is a detector with a known bias, and a known bias is usable in a way that noise is not.

The reading’s answer is an upper bound on the rate. If it returns eight, the chords change every eight slots or faster — never slower. That is a real piece of information about a passage and it is stated with a confidence the rate-recovery figures can put a number on: given sixteen it never returns thirty-two.

Four bars and eight barlines: the metre ties the barline with the half-bar, and the chords decide. A constructed passage of four bars of eight quavers, its barline at the first slot and its chords Am, G, Em, C. Notes: slot 1 E, slot 5 E, slot 9 G, slot 11 B, slot 13 B, slot 16 B, slot 17 G, slot 21 G, slot 23 G, slot 25 G, slot 29 E. For each of the eight places the barline could fall: as written metre score 21, metre, scaled 1.00, chords 0.500, product 0.500; 1 quaver late metre score -27, metre, scaled 0.00, chords 0.500, product 0.000; 2 quavers late metre score -15, metre, scaled 0.25, chords 0.500, product 0.125; 3 quavers late metre score -21, metre, scaled 0.13, chords 0.583, product 0.073; 4 quavers late metre score 21, metre, scaled 1.00, chords 0.583, product 0.583; 5 quavers late metre score -27, metre, scaled 0.00, chords 0.583, product 0.000; 6 quavers late metre score -15, metre, scaled 0.25, chords 0.583, product 0.146; 7 quavers late metre score -21, metre, scaled 0.13, chords 0.583, product 0.073. Best metre score: as written and 4 late. Best metre, scaled: as written and 4 late. Best chords: 3 late and 4 late and 5 late and 6 late and 7 late. Best product: 4 late.
Fig. 3 One passage and its change score at each candidate. Read as an alignment detector this picture is a claim about where the bar starts; read as a period detector, the same numbers are a claim about how fast the chords go, and only the second claim is one the measure can support.

And the bias is correctable in principle, because it has a known source. The evidence a slow grid inherits from a fast rate is diluted — it sees half the changes and half its comparisons cross no boundary at all — so the inherited score is systematically lower than a genuine one. A measure that compared each period’s score against what a true rate at that period would give, rather than against a shuffled null, would penalise the inherited evidence. That is a different standardisation rather than a different measure, and it is the obvious next thing to try.

What it would not fix is the question of alignment, and that is worth keeping separate. Recovering the rate reliably says nothing about where in the cycle the bar starts; the offset the reading returns is the offset of the chord changes, and where the barline sits among them is the question these five essays have not answered.

The reading and the metre are now measuring different things

The clean statement of the argument now stands is that the two cues the earlier essay set against each other were never competitors.

Two of the three decisions take one value each. Every hypothesis the search holds for this passage: eight barline phases across, five cue mixtures down, each cell the key that hypothesis reads. With the histogram the joint search uses — one count per event, unweighted — the whole grid is C major, and it is that at every phase and every mixture because a bag of notes does not know where the barline is. Weight the histogram by the same cue the segmentation uses and 5 different keys appear in it. The strip above is the metre score at each phase: identical at all eight, because this passage has a note on every slot and rotating it gives the same pattern back. So on a passage of this shape the joint search is a search over the barline and the chord, with the key fixed in advance and entering only as a discount on a chord whose root falls outside it.
Fig. 4 The two axes as the earlier essay separated them. What has changed is what the second one is an axis of: not how well the harmony marks the bar, but how fast the harmony moves.

The metre reads an alignment and cannot read a rate, because it is given the bar length and asked only where it starts — and it cannot distinguish the barline from the half-bar, which caps it at one half. The chords are a weak witness to the barline is where that ceiling was established.

The harmony reads a rate and cannot read an alignment, because a change score is symmetric about any boundary it finds and the passages that would break the symmetry are exactly the ones where the rate is not a divisor of the bar.

Between them they leave the one question a listener actually answers unanswered: where the bar starts, in a passage whose harmonic rhythm is faster than the bar. Two measures that each solve half of a problem do not add up to a solution when the halves are the same half, and on this model they are: both are periodicity, one with the period fixed and one with the alignment free.

The same bias, seen in the earlier essay’ own numbers

The bias is not a new phenomenon discovered here; it is visible in the essays before once it is known to look for, and finding it there is the best check available that it is real rather than an artefact of this scoring.

How often the metre, the chords and their product find the barline. Constructed passages of four bars of eight quavers, 100 at each setting, with the barline at the first slot. Rhythm regularity is how much likelier a note is on a strong slot than a weak one; chord regularity is how much likelier a note is to be a tone of its bar's chord than a random scale tone. rhythm 0 · chords 0: metre finds it 10%, chords find it 12%, product finds it 8%; rhythm 0.25 · chords 0: metre finds it 31%, chords find it 11%, product finds it 26%; rhythm 0.5 · chords 0: metre finds it 50%, chords find it 12%, product finds it 41%; rhythm 0.75 · chords 0: metre finds it 50%, chords find it 11%, product finds it 56%; rhythm 1 · chords 0: metre finds it 50%, chords find it 13%, product finds it 51%; rhythm 0 · chords 0.5: metre finds it 12%, chords find it 20%, product finds it 15%; rhythm 0.25 · chords 0.5: metre finds it 35%, chords find it 21%, product finds it 47%; rhythm 0.5 · chords 0.5: metre finds it 49%, chords find it 19%, product finds it 54%; rhythm 0.75 · chords 0.5: metre finds it 50%, chords find it 21%, product finds it 55%; rhythm 1 · chords 0.5: metre finds it 50%, chords find it 11%, product finds it 45%; rhythm 0 · chords 1: metre finds it 10%, chords find it 41%, product finds it 16%; rhythm 0.25 · chords 1: metre finds it 34%, chords find it 35%, product finds it 56%; rhythm 0.5 · chords 1: metre finds it 49%, chords find it 21%, product finds it 66%; rhythm 0.75 · chords 1: metre finds it 50%, chords find it 17%, product finds it 56%; rhythm 1 · chords 1: metre finds it 50%, chords find it 11%, product finds it 45%.
Fig. 5 the earlier essay’ sweep, with the harmonic dial running from a passage whose notes ignore the chords to one whose notes are all chord tones. The harmony’s column climbs with that dial and the metre’s does not, which is what those essays reported.

Their harmonic dial is not the chord rate — it is how strictly each note belongs to its chord — and it acts as a signal-to-noise control on exactly the evidence this essay has just characterised. At a setting of nought a note is any scale tone, the chord changes leave almost no trace in the pitch-class content, and the reading has nothing at any period. At one every note is a chord tone, the changes are stark, and the reading is at its best.

So those essays swept the strength of the evidence and this one swept its period, and the two are independent. What they could not see is that at every setting of their dial the passage supplied the period as well, because the period was one chord a bar and the reading was scored at the bar.

The check that matters is the direction of the interaction. If the reading were a genuine barline detector, a stronger harmonic dial would help it at the barline and nowhere else. If it is a period detector, a stronger dial helps it at the true period and at every multiple of that period, because the inherited evidence is inherited at the same strength. The second is what the rate figure shows: raising the dial raises the score in the outlined cell and in the cells to its right together.

Which computation produced the numbers

The passages are the previous essay’s, with the chord length in slots as the parameter: four, eight or sixteen slots of an eight-slot bar, over eight bars, with notes placed at a stated density biased toward the metrically strong slots and each note’s pitch class drawn from its current chord.

For a candidate period, the evidence is how far the pitch-class content in one window differs from the content in the window before it, averaged over the boundaries that period implies, taken at whichever of that period’s own offsets scores highest. The windows are one period long, so a long period compares long windows.

That last point is why the standardisation is necessary rather than tidy. A long window averages more notes and differs less from its neighbour, so raw scores fall with the period and every comparison across periods would be a comparison of window lengths. Each period’s score is therefore standardised against the same passage with its slots shuffled — which preserves the note count, the pitch-class distribution and the window lengths, and destroys only the alignment.

The reading’s answer is the period with the highest standardised score, and the recovery rate is how often that is the rate the passage was built at, over eighty passages.

Where the model stops

The candidate periods are powers of two. Two, four, eight and sixteen slots are the rates that divide the metre, and the interesting failure case is a harmonic rhythm that does not — three slots to a chord in a bar of eight. Whether the reading returns six, or twelve, or the bar, is not computed here and is the case where a rate detector’s bias would be most visible.

And the rate is constant. A real passage accelerates into a cadence, so a real reading is a rate as a function of position rather than a number — and which notes are the chord is where the segmentation that would supply it lives. A detector that returned one period for a passage whose rate doubles halfway through would be right about neither half.

Every chord change is worth the same. A passage here changes by a whole triad or not at all, so each boundary offers the reading an equal quantity of evidence, equally spaced. Real harmony does not: a tonic moving to its own first inversion shares two notes with what preceded it and a tonic moving to the dominant shares one, so the evidence at a boundary varies by a factor of two or three from bar to bar. A detector summing unequal evidence at equal spacing would find the true period marked by a run of strong changes and a run of weak ones rather than by one height, and there is no reason to expect the doubling bias to survive that unchanged — it might be sharpened, because a weak change at the half-way slot is easier to skip, or blunted, because a strong one is harder. Which of those happens is a measurement this construction cannot make and the next one should.

Eighty passages is a modest number for a proportion near a third, and the recovery rates quoted here carry a standard error of about five points. The one-sidedness does not depend on that: errors fast are not few, they are absent.

What the picture cannot show

It cannot show the bass. Every note is a pitch class with no register, and a harmonic change is most audible in the bass moving — a bass line is not a list of roots is the essay where that becomes a measurement, and it is on a different account.

Nor a listener tracking. The reading is cold: each passage is scored from nothing. A listener four bars in has a rate hypothesis and is deciding whether to revise it, which is the sequential problem a progression is a path sets up, which is a sequential problem rather than a scoring one and would have quite different error statistics.

And it cannot show what the rate is for. A harmonic rhythm is not only a periodicity; it is the thing how often the chord changes measured — it accelerates at a cadence and stalls in a prolongation, and its musical meaning is in those departures rather than in its average. A detector that returns a single period has averaged away everything a listener would call harmonic rhythm.

Where the argument now stands

Fifteen essays, and the last five of them are one argument that went somewhere its first three essays did not intend.

The eleventh, twelfth and thirteenth essay asked whether the harmony marks the barline, separated two cues carefully, and found that the harmony marks it by changing there rather than by being more consonant there. The fourteenth turned the one dial the construction had fixed and found that the finding was about the chord rate. This one asks the measure its own question and finds it answers well, with a bias that explains the whole sequence.

What survives is a measure and a limit. The change score is a usable harmonic-rhythm detector with a known one-sided error. It is not a barline detector, the metre is not either, and the two fail in the same way — so the question the eleventh essay opened is open, and it is open more specifically than it was: what marks a downbeat in a passage whose chords change faster than the bar?

Still open: the cues that are not pitch classes

Every reading on these five essays is computed from a list of pitch classes and slots. That is a deliberate restriction and it has now run out.

What a passage at two chords a bar has that this model does not is register, articulation, dynamic and duration — and of those, register is the one that is both certainly present and cheaply computed. A chord change in the bass is a different event from the same change in an inner voice, and a barline is far more often marked by the bass moving than by an alto. The passages here have no bass because they have no octaves.

Adding octaves to the passage model is small: give each note a register drawn from a part, let the lowest sounding note be the bass, and score a second axis on how far the bass moves at each candidate rather than how far the content changes. The prediction is that the bass axis is an alignment detector where the content axis is a rate detector — because a bass moves at a chord change and also arpeggiates within a chord, so its evidence is not symmetric about a boundary the way a content difference is.

If that is right, the eleventh essay’s question has an answer and it is in the register rather than in the pitch classes, and five essays of careful work on the wrong axis will have been the way to find it.

Part 15 of 17

One essay in the series on progression. 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.

Chord segmentationDownbeatHarmonic rhythmMetreProgression