Form and structure

The leap that pays itself back

Every melody textbook teaches that a leap should be followed by a step in the opposite direction, and every corpus that has been counted agrees — around seven leaps in ten are answered that way. A random walk with two walls, no memory of the leap and no rule of any kind reverses after 61 per cent of them, and the residue is not a rule either. What is left when the walls are accounted for is a prediction the rule does not make, and it is the prediction that decides between them.

Assumes: A melody is a walk, not a set

There is a rule about melodic leaps that appears in every counterpoint manual, every orchestration primer and every undergraduate melody-writing exercise, in almost identical words: a leap should be followed by a step in the opposite direction.

Unlike most of the apparatus of eighteenth-century pedagogy, it is not merely a stylistic preference dressed as law. It is testable, it has been tested, and the tests agree. Counts over Western folk song, over Bach chorales, over Schubert and over several non-European repertoires all return the same order of magnitude — which is a good deal more than can be said for most of the rules taught alongside it: after a melodic leap of a third or more, something like seven in ten of the next intervals go the other way.

So the rule describes what melodies do. The question this essay is about is whether it explains it, and the way to find out is to build something that has no rule in it and see how much of the effect comes out anyway.

The null model, stated before it is run

The model is a random walk on scale degrees. It has exactly three components.

A step distribution, weighted toward small intervals, of roughly the shape the previous rung measured: mostly zero, one and two semitones, with a thin tail out to a fifth.

Two walls. The walk stays inside a range. When a step would take it outside, the step is taken in the other direction instead. This is the weakest form of a range constraint available — it does nothing at all until the walk actually reaches an edge.

How big a melody's moves are. The absolute size of every melodic interval in Twinkle, twinkle, Frère Jacques, as a fraction of that melody's moves. Twinkle, twinkle puts 90 per cent of its motion inside two semitones and never exceeds 7; Frère Jacques puts 65 per cent of its motion inside two semitones and never exceeds 7. The distributions are of the melodies named and of nothing else: three tunes are an illustration of the shape, not a measurement of it.
Fig. 1 The step distribution the walk is given, alongside the two tunes it is taken from. The model is handed the marginal statistics of melodic motion and nothing about how those moves are ordered — which is precisely the experiment: if the ordering rule is doing the work, a model with the right marginals and no ordering should fail.

Nothing else. No tonic. No memory of the previous interval. No preference for reversal, no arch, no phrase, no metre, no harmony. The direction of each step is a fair coin except where a wall intervenes.

A walk that knows nothing about melody. Forty-eight notes of a random walk inside 12 semitones with a pull of 0.60 toward the middle of the range. It has a step distribution and two walls and nothing else — no tonic, no memory of a leap, no preference for reversal, no phrase. 8 of its moves are leaps of three semitones or more, and the notes after them are marked.
Fig. 2 Forty-eight notes of such a walk, drawn the way a melody was drawn earlier. It looks like a melody in the way a cloud looks like a face — the resemblance is real and it is the resemblance of one statistic, not of a tune. The notes marked in violet are the ones immediately after a leap of three semitones or more, which are the events this essay counts.

The first thing to check is that the measurement works, and the check is available for nothing: with no walls at all, a walk whose direction is a fair coin must reverse after exactly half its leaps. Anything else means the counting is wrong.

It returns 50.0 per cent, on 5,521 leaps. So the instrument is calibrated.

What two walls buy

Put the same walk inside an octave and the number moves a long way.

How much of the rule a walk with no rule reproduces. Post-skip reversal in 20,000-note random walks with no melodic knowledge of any kind. An unbounded walk reverses after 50.0 per cent of leaps, which is the chance rate and is the check that the measurement is right. Confining it to 12 semitones raises that to 61.3 per cent. Reaching the 70 per cent that corpus studies report needs a central tendency of 0.95 — an almost deterministic pull back toward the middle at the edges of the range. A wall is not enough; there has to be a spring.
Fig. 3 Post-skip reversal in a twenty-thousand-note walk, against how strongly the walk is pulled toward the middle of its range. At zero pull — two hard walls and nothing else — it is 61.3 per cent, against the 50 per cent an unbounded walk gives and the 70 per cent the corpus studies report. The dashed line is the unbounded control, which is the figure’s own check on itself.

Sixty-one per cent, out of an object with no melodic knowledge in it whatsoever. That is not the whole effect and it is most of the distance from chance to the reported figure — a rule that was doing all the work would have had to account for twenty points, and there are eleven left.

The mechanism is regression to the mean and it needs no music in it at all. A large leap is, by definition, a large displacement; a large displacement inside a bounded range is more likely than a small one to have ended near an edge; and near an edge the next step is more likely to come back. Nothing prefers reversal. The reversals happen where the walk has run out of room.

A wall is not enough, and that is the finding

The obvious thing to say next is that the rule is regression to the mean and the story is finished. The arithmetic does not permit it.

Sixty-one against seventy is a gap of nine points, and nine points on five and a half thousand leaps is not noise. Something is producing reversals that two hard walls do not produce, and the figure above says what would be required to close the gap with a mechanism of the same kind: a central tendency rather than a boundary — a probability of stepping back toward the middle that rises with distance from it. To reach seventy per cent that pull has to be set at 0.95 out of 1, which is very nearly deterministic. At the edges of the range such a walk essentially cannot step outward at all.

That is a much stronger claim about melody than “it stays in a range”. It says a melodic line is not merely bounded but actively centred — that the further from the middle of its tessitura it goes, the more strongly it is drawn back, all the way through the range and not only at the edges.

The slate for this essay predicted that a bounded walk would reproduce the rule and it does not quite. What it reproduces is most of it, and the shortfall names the thing that has to be added.

The range that produces the number is not the tune’s range

There is a second reading of the same shortfall, and it is the more interesting one because it is a prediction rather than a parameter.

The reversal rate a walk produces depends on how far apart the walls are, and it depends on it strongly.

How much of it is simply how wide the range is. Post-skip reversal in a walk with two walls and no rule, against how far apart the walls are. It falls from 88.1 per cent at 5 semitones to 53.2 at 30, because a wide range puts most leaps nowhere near a wall. The 70 per cent that corpus studies report lands at about 9 semitones — which is narrower than any melody's total compass and about the width of a phrase. That is a prediction, and a sharp one: the bound that produces the effect is local, not the tune's whole range.
Fig. 4 The same walk with no rule in it, at eight different range widths. Reversal falls from 88 per cent inside a fourth to 53 per cent inside two and a half octaves, because a wide range puts most leaps nowhere near a wall. The reported figure is reached at about nine semitones — a major sixth.

A major sixth is not the compass of a melody. The three tunes in this collection span a fifth, a sixth and a ninth over their whole length, and a singer’s usable range is wider than any of them. Nine semitones is the width of a phrase.

That is a testable claim and it is the one worth taking away. If the reversal effect is a boundary effect, the boundary that produces it is local: the range a melody occupies for the eight or twelve seconds of one phrase, not the range it occupies over three minutes. Melodies do not wander freely inside their compass; they sit in one register for the length of a phrase and move to another between phrases, in the way a piece sits in one key area and moves to another, and it is the local ceiling and floor that the leaps run into.

Read that way, the central tendency and the narrow range are the same thing said twice. A walk that is pulled toward the middle of a wide range spends its time in a narrow band; a walk with hard walls in a narrow band behaves the same way. Both are descriptions of a melody that stays put.

The measurement that separates a rule from a wall

None of the above decides between the two accounts. A rule and a boundary can produce the same aggregate number, and the aggregate number is what has always been quoted.

They do not produce the same conditional numbers, and the conditioning that separates them is where the leap ended.

Where the reversals actually are. Post-skip reversal split by where the leap ended: heading for the near edge of the range, or back toward the middle of it. In both walks the leaps that end near an edge reverse far above chance and the leaps that end in the middle reverse BELOW it. A melodic rule predicts neither asymmetry, so this is the measurement that separates the two accounts — and it is a prediction the null model makes rather than a fit it achieves.
Fig. 5 The same leaps, split by whether they ended nearer the edge of the range they were heading for or back toward the middle of it. In the walk with two walls, leaps that end near an edge reverse 69.2 per cent of the time and leaps that end in the middle reverse 45.1 per cent — which is below chance. Both walks show the same split, and neither has a rule in it.

The two halves point in opposite directions, and that is the whole test.

A melodic rule that says reverse after a leap has no reason to care where the leap landed. Whatever mechanism it names — a singer recovering, a listener’s expectation, a contrapuntal convention — applies equally to a leap that ends high and a leap that ends in the middle of the voice. It predicts an effect above chance in both halves.

A boundary predicts what the figure shows: strongly above chance for leaps that end near an edge, and below chance for leaps that end in the middle, because a leap that ended in the middle is one that came from an edge and the walk is still travelling away from where it was constrained.

So the discriminating measurement exists, it is easy to make, and it is not the measurement the literature usually reports. It is the same manoeuvre the diatonic census used against its own result: when two accounts predict one number, find the variable they disagree about and measure that instead. Counting reversals after leaps that begin and end in the middle third of a melody’s own local range would settle the question in an afternoon, on any corpus already encoded.

Three tunes have thirty-one qualifying leaps between them, which is nothing for estimating a rate and is not nothing for a test whose two halves are predicted to point in opposite directions. So it is worth making rather than only describing.

leaps in the three tunes reversals rate
all of them 13 of 31 0.42
ending in the outer sixth of the tune’s range 5 of 5 1.00
ending anywhere further in 8 of 26 0.31

Both halves land where the boundary account puts them and neither lands where the rule puts them. Leaps that end near an edge reverse every time, which at five trials has a probability of 0.031 against a fair coin. Leaps that end away from an edge reverse below chance, at eight of twenty-six, which has a probability of 0.038. A rule that says reverse after a leap has to predict above chance in both rows, and the second row is significantly the other way.

The size dependence goes the same way. Leaps of three or four semitones reverse 8 of 24; leaps of five or more reverse 5 of 7 — the rise with leap size the bounded walk produces and a size-indifferent rule does not.

Four things stop this being a settled result and all of them are about the sample. Thirty-one leaps is small enough that both p-values are one lucky note from being unremarkable. The cut point is a choice: taking the outer half of the range instead gives 6 of 9 against 7 of 22, the same direction and much weaker. Two cuts were tried, which is two chances at a threshold. And most awkwardly, these tunes do not reproduce the statistic the whole essay is about — their overall reversal rate is 0.42 against the 0.70 the corpus literature reports, so the test is being run on a sample that disagrees with the headline before the conditioning starts.

What survives all four is the direction, and the direction is the discriminating half. The measurement asked for above is a corpus measurement and remains one; what the three tunes add is that when it is made, on the only material available here, it does not come out ambiguous — it comes out against the rule, on both halves at once, which is the outcome the essay was written to say would be decisive.

The same three-tune limitation applies to every statistic this ladder quotes, which is why every one of them is a model here and not a measurement.

The size of the leap says something too

There is one more asymmetry, and it points the same way.

The bigger the leap, the more a wall reverses it. Post-skip reversal by the size of the leap, in three walks with no melodic rule in any of them. The unbounded walk is flat at chance, as it must be. Both bounded walks rise with leap size, because a larger leap is likelier to have ended near an edge — which is a prediction a melodic rule does not make: a rule that says reverse after a leap has no reason to care how big it was.
Fig. 6 Reversal against the size of the leap, in three walks. The unbounded one is flat at chance, as it must be. Both bounded walks rise with leap size: 58 per cent after a minor third, 62 after a fourth, 73 after a fifth. A larger leap is likelier to have ended near an edge, so a larger leap reverses more.

A rule stated as a leap is followed by a step in the opposite direction is indifferent to size — it is a rule about a category of interval, not a function of one. The walks are not indifferent, and the direction they are not indifferent in is the one a boundary implies.

The corpus literature does report a size dependence, and it reports it in this direction. That is a second point of agreement between the observations and a model containing no rule, and each additional point of agreement makes the rule account do less work.

What the rule is instead

None of this says the rule is false or that teaching it is a mistake. A rule of composition does not have to be a causal mechanism to be useful, and this one has the property that following it produces melodies with the statistics of melodies.

What the null model changes is what the rule is evidence of. It is normally presented as evidence that listeners expect reversal — that the leap creates a tension the step resolves, and that this is a fact about hearing. The walk suggests something considerably less interesting is sufficient: melodies stay in a register, a leap uses up most of that register, and the only place left to go is back.

There is a way to say what the two range sweeps above have between them, because on their own they look like the same figure twice. They are the same computation at the two ends of the published spread — a corpus target of 70 per cent and one of 75 — and what moves is the answer, from about nine semitones of range to about seven. The finding is not that the range is nine; it is that the range is a phrase and not a compass, and that survives the whole of the disagreement in the literature it is being fitted to. A conclusion that changed sign somewhere inside that spread would be a conclusion about which paper was read.

That is worth setting beside a result from the other end of this collection. The probe-tone experiments found that a listener’s sense of which notes belong is startlingly close to a count of how often those notes occur in the music they have heard — a hierarchy that looks like a theory turning out to be a frequency table. This is the same shape of finding one level down: a principle that looks like a rule of expectation turning out to be a consequence of a constraint on range.

The probe-tone profile, major against minor. How well each of the twelve pitch classes was rated as fitting, after a context establishing the key — Krumhansl and Kessler, 1982. The shading is not part of the measurement: it is the tonic, the rest of the tonic triad, the rest of the scale and the remaining five notes, which are categories this subject had before anybody ran the experiment. The profile separates all four without overlap.
Fig. 7 The tonal hierarchy as it was measured, major against minor: how well each of the twelve fits after a key-establishing context. It is one of the most reproduced results in the psychology of music, and its correlation with a plain count of note frequencies in the corresponding repertoire is high enough that the two are difficult to tell apart. A hierarchy that reads as a theory of expectation, and a frequency table, are hard to separate by the measurement that established the hierarchy.

Both are cases of a statistic being mistaken for a mechanism, and both were found the same way — by building the dullest possible thing that could produce the observation and discovering it does. It is worth noting how differently the two land. Nobody minds being told the tonal hierarchy tracks note frequency, because the hierarchy is a claim about a listener and a frequency count is a plausible way for a listener to have got one. The leap rule is a claim about composition, and finding it in a wall says the composers were not doing the thing the rule describes.

How much of it is simply how wide the range is. Post-skip reversal in a walk with two walls and no rule, against how far apart the walls are. It falls from 77.7 per cent at 7 semitones to 53.2 at 30, because a wide range puts most leaps nowhere near a wall. The 75 per cent that corpus studies report lands at about 7 semitones — which is narrower than any melody's total compass and about the width of a phrase. That is a prediction, and a sharp one: the bound that produces the effect is local, not the tune's whole range.
Fig. 8 The same range sweep with the corpus target set at 75 per cent rather than 70, which is within the spread of the published counts. The range that reproduces it moves from about nine semitones to about seven — still a phrase rather than a tune. The conclusion is not sensitive to which figure from the literature is taken; the ordering is what the model produces, and the target only says where on the curve to read.

Which computation produced the numbers

The walks are exact and reproducible. Each is generated from a fixed seed, so every figure here is the same walk every time it is drawn; a stochastic figure that changes underneath its own caption cannot be argued about.

A leap is a move of three semitones or more. A reversal is the next move having the opposite sign. Repeated notes are excluded from the denominator rather than counted as non-reversals: a unison is neither a reversal nor a continuation, and counting it as a continuation put the unbounded control at 44 per cent when symmetry says it must be exactly 50 — which is how the error was found.

The corpus figure of 70 per cent is quoted, not computed. It is the order of magnitude reported across several published counts and it is drawn as a target line rather than as a result; nothing in this essay measures it, and the three-tune corpus this site carries is far too small to.

A walk that knows nothing about melody. Forty-eight notes of a random walk inside 7 semitones with a pull of 0.90 toward the middle of the range. It has a step distribution and two walls and nothing else — no tonic, no memory of a leap, no preference for reversal, no phrase. 13 of its moves are leaps of three semitones or more, and the notes after them are marked.
Fig. 9 The same walk inside a fifth with a strong pull to the middle — the parameters that reproduce the reported reversal rate. It stays in the middle of its range, turns back quickly at the edges, and looks rather more like a phrase than the wide-range version does. That resemblance is a warning rather than a result: the parameters were fitted to one statistic, and a model fitted to one statistic will match it.

What the picture cannot show

It cannot show a melody. The walk has the right marginal statistics and nothing else — no phrase structure, no cadence, no motive, no relation to a harmony. Its resemblance to music is exactly one number deep and the figures say so.

It cannot distinguish a wall from a habit. The model imposes a range; a singer’s range is a physical fact, a violinist’s is not, and a composer’s sense of where a line should sit is neither. All three appear in this model as the same two walls.

It has no metre. Every note is one event, and the beat a listener infers is what makes some notes structural and others passing. A leap from a weak position and the same leap from a strong one are one event here.

The three-tune test uses each tune’s whole compass, not its phrase range. The section that runs it takes the outer sixth of a melody’s total span as “near an edge”, and the argument two sections earlier is that the boundary doing the work is the local one — the register a phrase sits in for eight or twelve seconds. Using the local range would move some middle-of-the-tune leaps into the outer group and would, if the argument is right, strengthen the split rather than weaken it. It would also need a phrase segmentation, which is a second model on top of the first, and the point of running the test on the whole compass is that it needs none.

And it cannot see what a leap is for. In practice a large melodic leap is an event — it opens a phrase, marks a climax, or lands on a structural note. A model in which every leap is the same leap has thrown that away before it starts, and the fact that it still reproduces the statistic is a comment on the statistic rather than on the music.

The ladder from here

This rung took the best-known claim about melodic shape and found most of it in a constraint. The next takes what is left of shape when everything else is removed — the sign sequence alone, with no interval sizes and no degrees — and finds that the most-noted fact about it, the prevalence of the arch, is not a preference at all but an arithmetic consequence of a melody coming home.

The measurement this essay could not make is a debt: post-skip reversal conditioned on where the leap ended, counted over a real corpus, with each melody’s local phrase range rather than its total compass as the boundary. Until somebody makes it, the rule and the wall remain two explanations of one number.

Part 2 of 8

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

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

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

ContourMelodic intervalNull modelPhrasePost-skip reversalRegression to the meanTessitura