Generator

Ode to Joy as a path

Ode to Joy plotted as 30 notes against the 8 scale degrees it uses, one column per note. Its largest melodic interval is 2 semitones and it spans 7; the mean absolute step is 1.24 semitones. Beethoven, Ninth Symphony, finale, 1824 — the theme as first stated, eight bars.
Ode to Joy as a path. Ode to Joy plotted as 30 notes against the 8 scale degrees it uses, one column per note. Its largest melodic interval is 2 semitones and it spans 7; the mean absolute step is 1.24 semitones. Beethoven, Ninth Symphony, finale, 1824 — the theme as first stated, eight bars.

Drawn above with its standard settings, which is almost never how an essay draws it: an essay states the numbers it is arguing about, so the figure a reader meets there is about that argument rather than about the drawing in general. Every option a placement passes is checked against the ones this function actually reads, because an option it does not read is silently ignored and the figure quietly draws what is above instead.

It makes a noise. 56 of its 56 placements carry sound, built from the same numbers as the drawing, offering these buttons: Frère Jacques, Frère Jacques at 60, Frère Jacques, as phrased by the page, Frère Jacques, as written, Frère Jacques, evenly, Frère Jacques, in turn, Ode to Joy, Ode to Joy at 60 and 12 more.

Called by 9 essays

the blast radius of changing it

Ode to Joy as a path. Ode to Joy plotted as 30 notes against the 8 scale degrees it uses, one column per note. Its largest melodic interval is 2 semitones and it spans 7; the mean absolute step is 1.24 semitones. Beethoven, Ninth Symphony, finale, 1824 — the theme as first stated, eight bars.

A melody is a walk, not a set

Nine essays here are about which seven of the twelve a scale takes, and every one of them describes a set. A tune is not a set; it is a path across one, and the path is nearly all small steps. That is not a matter of taste. Above about eight notes a second the ear stops being able to hold a large interval and a small one in the same line, and at sixteen the choice disappears altogether — so a fast passage is scalar because a fast passage that leaps is two pieces of music.

scales · Melody
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.

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.

form · Melody
The arch is not a preference. Every sequence of 6 notes over 8 scale degrees — 262,144 of them, enumerated rather than sampled — classified by contour, under three constraints. With none, the nine classes are spread. Requiring the sequence to return to its starting degree leaves only the arch, the valley and the flat, at 42.2 per cent each for the first two. Requiring it to begin and end on the LOWEST degree leaves the arch alone, at 99.6 per cent. Nothing here prefers a rise followed by a fall; the constraint is that the melody comes home, and a melody that comes home from below has nowhere to go but up first.

The shape that survives everything else

Throw away a melody's key, its tuning, its instrument and the sizes of its intervals, and what is left is a string of pluses and minuses. That string is what a listener who cannot name a note still has, and it costs 37 per cent of the tune to keep. The arch that melodic shape is famous for is not in it as a preference: enumerate every six-note sequence that begins and ends on the lowest degree it uses and 99.6 per cent of them are arches, because a melody that comes home from below has nowhere to go first but up.

form · Melody
The same steps, counted by the clock. The step distribution of Ode to Joy and Twinkle, twinkle counted two ways: once per interval, which is what every earlier figure did, and once weighted by how long the note it leaves is held. The two disagree because a tune's long notes are not distributed evenly over its interval sizes — in Ode to Joy the 2-semitone step is 55.2 per cent of the moves and 60.0 per cent of the time. Which of the two a claim about melodic motion means has never been stated here, and the answer matters most exactly where a tune slows down, which is at the ends of its phrases.

The note that has a length

Every melodic figure so far reads a table where each note is a pair — a pitch and a duration — and throws the second number away. A step between two minims and a step between two quavers have been one event in every histogram it has drawn. Weighting the same statistics by time moves the step distribution by up to seven points, changes forty-four of a hundred and one contour signs, and turns up an off-by-one in the one figure that did use the durations: it took the length of the note arrived at where the time between two onsets is the length of the note left.

rhythm · Melody
Where the page ends a phrase, and where the ear does. Twinkle, twinkle with two sets of phrase boundaries on it. The lower curve is a local boundary detector — a peak in how much the interval and the note length change from one to the next, with nothing in it about bar lines or harmony — and the marks above it are where the notation puts the phrase ends. It finds 100 per cent of them and 2 boundaries the page does not have. Where the two agree it is because a long note is sitting at the join; where they disagree the page is marking a grammatical unit and the detector is finding a perceptual one.

Where a phrase ends

Run a boundary detector over the three tunes used throughout and it agrees with the notated phrasing on one of them perfectly and on another almost not at all. The reason is which cue each tune uses: Twinkle's phrases all end on a long note, so a duration-weighted detector finds five of five with no false alarms; Ode to Joy's run on in crotchets and its phrasing is in the intervals, where a duration detector finds one of three and a pitch detector finds all three and eight others. No fixed weighting serves both, and the published one is worse on each tune than the single cue that tune uses.

form · Phrase
The boundaries that survive each amount of smoothing. The local boundary strengths of Twinkle, twinkle read at every scale: the curve is smoothed with a Gaussian of the width on the horizontal axis and the peaks that survive are counted. Small scales give 11 boundaries and large ones give one, and the notation marks 5. The level with that many falls at a width of 2, where the model finds 100 per cent of the notated boundaries and 100 per cent of what it finds is notated — a comparison with no threshold in it, which is what the scale parameter buys.

A boundary at a stated level

A boundary detector run over three tunes agreed with the notation on one and barely at all on another, and left two things owing: a version with a scale parameter, and a version run on performance timings. Both are paid here, and they pay differently — the scale removes a free parameter from the comparison and does not rescue the hard case, while two per cent of rubato does.

form · Phrase
Twinkle, twinkle, phrased at the level each tempo selects. The number of boundaries the model finds when its smoothing scale is set by the psychological present rather than chosen, against the tempo the tune is taken at. The scale in notes is the present's 3.5 seconds divided by the mean note length, so a fast tempo puts more notes inside the present and smooths harder. The page's own phrasing has 5 boundaries, drawn as the flat line; the model matches it best at 160 beats per minute, where the present holds 8.2 notes. The same tune at two tempos is read at two levels, which is the prediction and is not a free parameter.

The level the tempo chooses

The boundary detector has a scale parameter and an earlier essay left it free, ending with the sentence that names this one: the scale is in notes and the psychological present is in seconds. The psychological present is two to eight seconds, a tempo converts one to the other, and the level a listener reads then stops being a parameter at all — which is a prediction with teeth, because the same tune at two tempos should be phrased differently at levels the arithmetic names in advance.

form · Phrase
How far the detector looks, note by note. The number of notes that fit inside a 3.5-second present at each point of the tune, once the performance has lengthened its phrase-final notes by 30 per cent. It runs from 5 to 10 notes against a constant 7 for the unperformed version, and it dips exactly where a boundary is, because a boundary is where the performance slows. Reading the boundary-strength curve with that width at every point instead of one width everywhere gives an agreement of 0.55 with the notated phrasing, against 0.36 for the fixed width the present dictates and 0.71 for a fixed width fitted to this tune. The dips are marked, and the notated boundaries are the vertical lines: the detector narrows itself at the places it is supposed to find, which is the circularity this figure has to be honest about — the lengthening was put there by the notation.

A detector whose resolution the performance sets

The boundary detector lost its free parameter when the psychological present became a number of notes at a stated tempo, and what that held still was named at the time: a performance slows into a phrase end, so the number of notes inside the present is not the same everywhere in a tune — it falls exactly where a boundary is. Making the width follow the performance recovers half of what removing the parameter cost, and honestly leaves the other half.

form · Phrase
The same tune read at six widths of the psychological present. A later essay made the detector's smoothing width a function of position, which removed its last free parameter but one — and the one it cannot remove is the width of the psychological present, because that is a fact about listeners rather than a choice. So the honest object is not a reading but a family of them, one per width. A short present finds 6 boundaries and a long one finds 2, and the family agrees on 0 of them. The fixed-width control, at its own best width, scores 0.67 against the adaptive readings' 0.67, 0.75, 0.33, 0.33, 0.40, 0.40 — so the adaptation does not win, which is what that essay reported too. What the family adds is the ordering: a boundary in every row is a different claim from one in a single row, and a single reading has no way to say so.

A family of readings

Removing the detector's free parameter, and then its constant tempo, cost persistence both times — the property that made its boundaries ordered rather than merely found. Recovering it means a family of adaptive readings rather than one, indexed by the width of the psychological present, which is the one parameter that cannot be removed, because it is a fact about listeners.

rhythm · Phrase

All figures · What can be heard