The Mathematics of Rhythm and Scale
Why does an algorithm for timing a neutron accelerator generate the rhythms of the world, and what else does the same mathematics build?
Bjorklund's algorithm for spreading k pulses over n slots is Euclid's algorithm run on sequences, and its output is the tresillo, the cinquillo, the West African bell and bossa nova, each a rotation of a Euclidean rhythm and the most even of its kind. Read the bell pattern's twelve pulses as semitones and it is the major scale: one maximally even shape, found twice. Stacks of fifths have two step sizes at 2, 3, 5, 7, 12, 17, 29, 41 and 53, the convergents of the fifth's continued fraction and their sums; the golden ratio gives the Fibonacci numbers. Arom's oddity property is impossible above half the pulses; homometric rhythms share every interval. A Vuza canon at period 72, found by exact cover and verified, tiles time with neither rhythm nor entries repeating. Sanskrit metre counted rhythms of light and heavy syllables and found Fibonacci, and its mnemonic yamātārājabhānasalagāḥ is a de Bruijn sequence. Plain Bob Minimus rings all 24 orders of four bells. Temperaments are linear maps with commas in the kernel, and a search rediscovers 12, 19, 31 and 53; Bohlen and Pierce drop the octave for thirteen steps of the 3:1 tritave.
What you need. Part 6 for commas and temperaments; Part 11 for rhythm and syncopation; Part 12 for maximal evenness; Part 29 for homometry; Part 31 for Hamiltonian tours; Part 32 for evenness. Euclid's algorithm, continued fractions, the three-gap theorem, exact cover, permutation groups, linear maps.
- Ideas, mathematics and history
- Euclidean rhythms, well-formed scales and continued fractions, tiling canons and Vuza, de Bruijn sequences in Sanskrit, change ringing, regular temperaments
- What we build, compute and hear
- a Vuza canon found at period 72; a temperament finder that rediscovers 12, 19, 31 and 53
What you will be able to do
Foundations
- Hear and construct Euclidean rhythms, and recognise the same shape as a scale.
- Explain the oddity property and why it cannot hold above half the pulses.
- Explain change ringing as a walk through every order of the bells.
Full course
- Implement Bjorklund's algorithm and the moment-of-symmetry test, and relate them to continued fractions.
- Search for tiling canons by exact cover and test them for periodicity.
- Treat a temperament as a linear map and find the commas it tempers out.
Research
- Design a study of whether maximal evenness reflects culture or cognition.
Practice
- Choose an equal temperament for an instrument by the commas it tempers out and its errors.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Foundations 28 min · Full course 32 min · Research 35 min · Practice 32 min.
- 0A timing problem, solved by EuclidFoundations2 min
- 1Euclid's rhythmsFoundations4 min
- 2One shape, rhythm and scaleFoundations2 min
- 3Stacks of fifthsFoundations3 min
- 4Oddity and homometryFoundations3 min
- 5Tiling the lineFoundations4 min
- 6Pingala's syllablesFoundations3 min
- 7Change ringingFoundations3 min
- 8Temperaments as linear mapsPractice4 min
- 9A scale without octavesFoundations2 min
- 10Frontier: tilings and open problemsResearch3 min
- Variation 33, recap and problemsAll tracks2 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
A timing problem, solved by EuclidFoundations2 min
Three rhythms. The tresillo, three strokes in eight pulses, heard all over Cuban and Latin American music. The cinquillo, five in eight. And the bell pattern of West Africa, seven strokes in twelve pulses. Each is drawn as a necklace: the cycle of pulses round a circle, strokes as beads. Listen to all three.
These rhythms have a strange connection to physics. In 2003 Eric Bjorklund, an engineer, had to time the pulses of a neutron accelerator, the Spallation Neutron Source. His problem: spread k pulses over n time slots as evenly as possible. His solution turned out to be Euclid's ancient algorithm for the greatest common divisor, run on sequences instead of numbers. Two years later the computer scientist Godfried Toussaint noticed that the algorithm generates the traditional rhythms of Cuba, Ghana, Bulgaria, Persia and Brazil. The same mathematics makes scales, and this part follows it further.
Here is the plan. Euclid's rhythms, and why they are the most even. The discovery that the bell pattern and the major scale are one shape. Stacks of fifths, continued fractions, and which sizes of scale work. Rhythmic oddity, rhythms with the same intervals, and canons that tile time. Sanskrit prosody's Fibonacci numbers, and bells rung in every possible order. Temperaments as linear maps, and a scale with no octaves at all.
A word about Toussaint. Godfried Toussaint, who died in 2019, was a computational geometer at McGill University. He compared the rhythms of the world as geometric objects, measuring distances between necklaces. From those distances he built family trees of rhythms, as biologists build them for species. He asked why the son clave is so popular, and answered with evenness and several other measures. His book The Geometry of Musical Rhythm is this part's main source.
1Euclid's rhythmsFoundations4 min
How do you spread five strokes over thirteen pulses?
Here is the process for five strokes in thirteen pulses. Start with five strokes and eight rests. Tuck one rest behind each stroke: five groups of stroke-rest, and three rests left over. Tuck the leftovers behind the first three groups: now three groups of three and two of two. Do it again with the two smaller groups, and stop when one group or none is left over. Read the groups in order: x dot dot x dot, twice, then x dot dot. The strokes are as evenly spread as thirteen pulses allow.
Why Euclid? His algorithm finds the greatest common divisor of two numbers by repeated division with remainder: thirteen is two fives and three; five is one three and two; three is one two and one; two is two ones. The group counts in Bjorklund's steps follow exactly those remainders. When k divides n the result is perfectly even, like four strokes in sixteen; otherwise it is as even as the pulses allow. Toussaint wrote it E of k, n: the Euclidean rhythm.
Toussaint's paper lists dozens of traditional rhythms that are Euclidean, or rotations of Euclidean rhythms, which means starting the same necklace at a different bead. Here are nine, each checked by the program against the algorithm's output: the tresillo and the cinquillo of Cuba; Persian and Bulgarian and Turkish metres of two, three and four strokes; a Venda timeline; the West African bell; bossa nova and a samba pattern from Brazil. Composers and players found the most even way to spread strokes long before anyone wrote the algorithm down.
One subtlety. A timeline repeats, so only its necklace is fixed, not where you start counting. E of three, eight is x dot dot x dot dot x dot; started from its second stroke it is x dot dot x dot x dot dot; from its third, x dot x dot dot x dot dot. Each rotation sits differently against the beat: the downbeat chooses. So Toussaint's test is whether a rhythm is a rotation of a Euclidean one. Part 11's syncopation measure tells the rotations apart.
A question for your ears. Two rhythms, both with five strokes in eight pulses. One is spread as evenly as possible; the other bunches its strokes together. Which is the Euclidean one, A or B?
B is the Euclidean rhythm, the cinquillo: its gaps are two, one, two, one, two, never two short gaps together. A crowds three strokes into a row and then spaces the rest. On the necklace B's polygon is nearly regular; A's is lopsided. Many listeners also hear B as livelier; whether evenness predicts how much a rhythm makes people want to move is a question for Part 46.
How many five-stroke rhythms in eight pulses are there? Counting rotations as the same necklace, . Rank them by how far their strokes are from a perfectly even spacing. The cinquillo comes first, the only Euclidean one; the quiz's lopsided rhythm is second; and five strokes in a row, then silence, is last. Evenness is a single number, and Euclid's algorithm always finds the rhythm that minimizes it.
2One shape, rhythm and scaleFoundations2 min
What does a bell pattern have to do with a major scale?
Put the bell pattern's seven strokes round a clock of twelve, and read the clock as twelve semitones instead of twelve pulses. The strokes fall on C, D, E, F, G, A and B: the major scale. Its gaps, two, two, one, two, two, two, one, are the scale's tones and semitones. E of five, twelve gives the pentatonic scale, C, D, E, G, A. Both are rotations of the Euclidean necklaces. Listen: each rhythm on the clave, then the same positions played as notes.
Music theory had already named the shape. In 1991 John Clough and Jack Douthett defined maximally even sets: for any number of notes and any number of places there is exactly one most even arrangement, up to rotation. It is the Euclidean rhythm: the same object, found twice, once for scales and once for neutron pulses. Part 12 found the diatonic scale maximally even, and Part 32 found it the most even seven-note chord. Toussaint's surprise was that so many of the world's rhythmic timelines have the same shape.
Layer three Euclidean rhythms over the same sixteen pulses: the tresillo twice on a low drum, five strokes on a woodblock, seven on a clave. Each layer is as even as it can be on its own; together they interlock, coinciding on the first pulse and drifting apart in between. Electronic musicians build grooves exactly this way. Listen, four times round.
The shape turns up wherever things must be spread evenly. An approximate thirty-three-year leap-year scheme uses eight leap years; the modern Iranian calendar is determined astronomically rather than by this fixed cycle. A computer drawing a straight line on a grid of pixels steps up at Euclidean intervals, by Bresenham's algorithm. With an irrational rate the pattern never repeats: Sturmian words, and the golden ratio. It is always the same problem: k events in n slots, as smoothly as possible. The next chapter runs it with an irrational step, the perfect fifth.
3Stacks of fifthsFoundations3 min
Why five, seven and twelve notes?
Start at C and stack pure fifths, folding each new note back into one octave, as Part 12 did. After each new note, look at the gaps round the circle. With two, three, five, seven and twelve notes there are exactly two sizes of step; these are the gold circles. With four, six, eight or more notes up to eleven, there are three. The sizes that give two steps are the ones music uses: the pentatonic, the diatonic and the chromatic scale. Erv Wilson called them moments of symmetry.
There is a theorem behind the picture. The three-gap theorem, conjectured by Steinhaus and proved around 1958: take consecutive distinct multiples of a fixed generator around a circle: they leave at most three different gaps, and when there are three, the largest is the sum of the other two. So a scale built by stacking is never a jumble of step sizes. The sizes with just two steps are what Norman Carey and David Clampitt called well-formed scales.
Which sizes, and why? A pure fifth is of an octave, an irrational number. Its continued fraction gives the best approximations by fractions: one half, three fifths, seven twelfths, twenty-four forty-firsts, thirty-one fifty-thirds. The denominators, together with the intermediate-convergent denominators, are exactly the sizes with two step sizes: two, three, five, seven, twelve, seventeen, twenty-nine, forty-one, fifty-three. Twelve notes work because seven twelfths of an octave is very close to a fifth; fifty-three, studied in China and by Mercator, is closer still.
Hear three of them. Five notes generated by successive fifths from C make the pentatonic scale, with steps of about two hundred and three hundred cents. Seven generated notes make a scale with an F sharp, the Lydian mode, with whole tones and semitones. Twelve generated notes supply twelve pitch classes with Pythagorean tuning, with two sizes of semitone that equal temperament then makes equal.
Try another generator. Stack the golden ratio's fraction of a circle, nought point six one eight, instead of the fifth. Two step sizes appear at two, three, five, eight, thirteen, twenty-one, thirty-four and fifty-five points. These are the Fibonacci numbers, because the golden ratio's continued fraction is the simplest of all, every term a one. Its best approximations are ratios of neighbouring Fibonacci numbers. Chapter six meets the same numbers in Sanskrit poetry.
4Oddity and homometryFoundations3 min
Can a rhythm refuse to be cut in half?
The ethnomusicologist Simha Arom noticed something about the rhythms of the Aka people of Central Africa: no two strokes are ever exactly half a cycle apart. The necklace cannot be cut into two equal halves that start on strokes. He called it rhythmic oddity. The five-stroke Euclidean rhythm in twelve has it. The seven-stroke bell pattern cannot: seven strokes in twelve pulses must include two opposite each other, because there are only six opposite pairs of places, a pigeonhole argument.
A program can count the odd rhythms, treating rotations as the same rhythm. For twelve pulses there are twenty with four strokes, sixteen with five, six with six, and none with seven or more. For sixteen pulses the count peaks at five and six strokes. Above half the pulses there are none at all, by the same pigeonhole. Chemillier and Truchet later enumerated the Aka patterns' relatives this way, as words with the oddity property.
A question for your ears. Two rhythms, four strokes in eight pulses each. Neither is a rotation or a mirror image of the other. Do they contain the same intervals between their strokes, or different ones?
They do. Both have two pairs of strokes one pulse apart, one pair two apart, two pairs three apart and one pair four apart. Rhythms like these are called homometric, the word Part 29 borrowed from crystallography for chords. They sound different, yet every interval between strokes is shared. Among rhythms of four strokes in eight pulses this is the only such pair; among six strokes in twelve there are fifteen.
What do these properties mean in music? Oddity forbids strokes half a cycle apart; it does not imply aperiodicity. For example, strokes at zero, four and eight in twelve have oddity but repeat every four pulses. Arom read this as a way for players to keep their place in a long cycle. Homometry says that the intervals alone do not fix a rhythm. And the patterns belong to particular people and traditions; the mathematics describes them, it does not explain why they were chosen. Part 37 returns to timelines in their own musical worlds.
The two properties can be combined. E of five, twelve is both maximally even and odd. E of seven, twelve is maximally even but cannot be odd. Arom's Aka timelines live in longer cycles, where both properties can hold at once. Toussaint measured many of the world's timelines on both. Two simple properties, and a large share of traditional timelines satisfy them.
5Tiling the lineFoundations4 min
Can a canon fill every moment exactly once?
A canon in time. One voice plays a rhythm, strokes on pulses zero, one, four and five of an eight-pulse cycle. A second voice plays the same rhythm two pulses later. Together they strike every pulse of the cycle exactly once, no gaps and no collisions: the rhythm tiles the cycle. Mathematicians write it as a direct sum: the rhythm A plus the entries B is the whole cycle. Listen to the two voices, high and low.
But this canon has a weakness. The rhythm, zero one four five, repeats itself every four pulses: it is periodic, really a two-stroke rhythm played twice. The question Dan Tudor Vuza asked in 1991 was whether a canon can tile the cycle when neither the rhythm nor the entries repeat in this way.
Here is such a canon, of period seventy-two, found for this film by a program that tries to cover the cycle with copies of a rhythm, backtracking when it gets stuck. The rhythm has six strokes and repeats at no shift; twelve voices enter at twelve offsets that also repeat at no shift. Every one of the seventy-two pulses is struck by exactly one voice, and the program checks it. With this rhythm there are tilings in all, and of them have entries that never repeat. Listen: twelve voices on twelve pitches, one note on every pulse.
Why seventy-two? Canons with neither part periodic exist only for some lengths of cycle. The smallest is seventy-two: in every shorter cycle, one of the two parts of any tiling must repeat. Seventy-two is two times two times two times three times three, enough room for two separate periodicities to be broken at once. After it come one hundred and eight, one hundred and twenty, one hundred and forty-four and more. Vuza's result of 1991 rests on work by Hajós in the 1940s and de Bruijn in the 1950s, about factoring groups.
How did the program find it? It covers the seventy-two pulses with copies of the rhythm, one copy at a time. It always works on the earliest pulse still empty: there are only six ways to place a copy so that one of its strokes lands there. If a copy would strike a pulse already struck, it undoes the last choice and tries the next: backtracking. Every complete cover is a canon; the program keeps those whose entries repeat at no shift. The same exact-cover search solves Sudoku puzzles and packs polyominoes.
The mathematics came from geometry. In 1941 György Hajós proved a conjecture of Minkowski about filling space with cubes. His key step asked when a factoring of a finite group must have a periodic factor. The cyclic groups where it must are called good, and every cycle shorter than seventy-two is good. A question about cubes became, half a century later, a question about canons. The frontier chapter follows it to an open conjecture.
Composers have used these canons. Messiaen wrote rhythmic canons and loved symmetric rhythms, as Part 28 showed. Tom Johnson's Tilework, of 2003, builds pieces from tiling canons. Moreno Andreatta and colleagues at IRCAM made tiling canons a compositional tool. A Vuza canon is dense: one note on every pulse, each voice heard only by its register or timbre. The mathematics invites the music; the ear decides whether it works.
6Pingala's syllablesFoundations3 min
How many rhythms last five beats?
Sanskrit verse is built from light syllables, one mora long, and heavy ones, two morae long in this metrical model. Indian prosodists asked how many patterns fill a given number of beats. For five beats there are eight, listed here. Every pattern ends either in a light syllable, after a pattern of four beats, or in a heavy one, after a pattern of three. So the count for five is the count for four plus the count for three: five plus three. Listen to all eight, the heavy syllables louder.
Count for every length and the numbers are one, two, three, five, eight, thirteen, twenty-one: each the sum of the two before. Europe knows them as the Fibonacci numbers, after Leonardo of Pisa, who wrote them down in 1202 in a problem about rabbits. Indian scholars had them for metre centuries earlier: Virahanka about the seventh century, then Gopala and Hemachandra, all counting the rhythms of verse.
Split each count by how many heavy syllables the patterns contain. For eight beats: one pattern with no heavy syllable, seven with one, fifteen with two, ten with three, one with four. These are binomial coefficients, the numbers in the triangle the commentator Halayudha called the meru, read along a slanting line. And each row adds up to a Fibonacci number: the shallow diagonals of the triangle sum to Fibonacci, a fact found here first through rhythm.
Indian teachers also had a memory aid for the eight patterns of three syllables. The nonsense word ya-mā-tā-rā-ja-bhā-na-sa-la-gā, read as light and heavy syllables. Slide a window of three syllables along it: ya-mā-tā is light, heavy, heavy; mā-tā-rā is heavy, heavy, heavy; and so on. The eight windows are the eight possible feet, each exactly once. Mathematicians now call a string like this a de Bruijn sequence, after a paper of 1946; the mnemonic is far older.
This tradition is old. Pingala's treatise on metre, of uncertain date, often placed in the last few centuries BCE, lists metres as patterns of light and heavy. Its rules for listing and numbering the patterns amount to binary numbers. The commentator Halayudha, in the tenth century, drew the triangle of binomial coefficients, the meru, to count patterns with a given number of heavy syllables. Rhythm was one of the first places anyone did combinatorics at all. Part 34 hears the rhythms of Indian music in their own terms.
7Change ringingFoundations3 min
Can four bells ring every order without repeating?
In seventeenth-century England, ringers found a way to make music from heavy church bells that swing full circle and cannot be hurried. Under the conventional adjacent-change rule, each bell moves at most one place earlier or later in the order of striking from one round to the next, so each change swaps neighbours. The simplest pattern is plain hunt: swap every pair, then every inner pair, and repeat. Each bell weaves from the front to the back and back again; the gold line follows bell one. After eight changes the bells are back in rounds.
Six bells hunt by the same rule. Twelve changes and the bells are back in rounds. Each bell, like bell one in gold, works its way from the front to the back and up again. No bell ever moves more than one place at a change. But twelve rows are a tiny fraction of the seven hundred and twenty orders of six bells, and methods exist to reach them all. Listen to the plain hunt first.
Plain hunt alone repeats after eight rows. Plain Bob Minimus changes one step: at the end of each lead of eight, the first two bells hold their places while the others swap. Three leads give twenty-four rows, and then the bells come back to rounds. The program checks that the twenty-four rows are all different: every one of the twenty-four orders of four bells, each exactly once. Ringers call it an extent. Listen to it on four bells tuned E, D, C and G.
Mathematicians later recognised what the ringers were doing. The orders of n bells are the permutations of n things, the symmetric group, with n factorial elements. An extent is a complete traversal of the permutations; ordinary methods need not visit every permutation. A valid extent returning to rounds gives a Hamiltonian cycle in the chosen change graph, like Part 31's tours of the triads. Fabian Stedman's Campanalogia of 1677 worked with these structures by hand, using what would later be called cosets of subgroups, long before group theory had a name. On eight bells an extent has forty thousand three hundred and twenty changes, about eighteen hours of continuous ringing.
8Temperaments as linear mapsPractice4 min
Which equal divisions of the octave work, and why?
Part 6 met temperaments as compromises. There is a cleaner way to see them. Any just interval in the five-limit is a product of powers of two, three and five, so it is a vector of three exponents: the fifth, three halves, is minus one, one, zero. Twelve-note equal temperament sends the prime two to twelve steps, three to nineteen, five to twenty-eight. Then the size of any interval in steps is a dot product: the fifth is minus twelve plus nineteen, seven steps. And the syntonic comma, eighty-one eightieths, maps to zero steps: twelve-note temperament ignores it. A temperament is a linear map, and the commas it tempers out are its kernel.
Now a search. For every equal division from five to sixty steps, take the nearest steps to a pure fifth and a pure major third, and keep the worse error. List the divisions that beat every smaller one. The records are five, seven, nine, ten, twelve, nineteen, twenty-two, thirty-one, thirty-four and fifty-three. Twelve, nineteen, thirty-one and fifty-three are the ones history chose: nineteen and thirty-one were proposed in the sixteenth and seventeenth centuries, fifty-three by Mercator and Holder. The kernel explains their characters. Twelve tempers out the syntonic comma, the Pythagorean comma and the diesis; of those three named commas, nineteen and thirty-one temper out the syntonic comma, like meantone; fifty-three tempers out none of these three, only the tiny schisma, which is why it is so nearly just.
A question for your ears. One C major triad, four times, in four tunings: twelve, nineteen and thirty-one equal steps, and just intonation, in some order. Which uses the just ratios? Listen for reduced beating of corresponding partials in this synthesis; instrument inharmonicity and other interactions can remain.
B is just. A is nineteen steps, its third seven cents narrow; C is twelve, its third fourteen cents wide, the familiar shimmer of the piano; D is thirty-one, its third within one cent of pure but its fifth five cents narrow. The differences are small, and the ear hears them as motion inside the chord, the beating of Part 5.
The idea became a field. Paul Erlich and other theorists of the 2000s named temperaments by the commas in their kernels: meantone tempers out eighty-one eightieths; others with names like magic and porcupine temper out other commas. One temperament can be played in several equal divisions: meantone in twelve, nineteen and thirty-one. The same linear algebra now designs keyboards and tunings for new instruments. Part 6's history, rewritten as kernels and images.
Equal divisions beyond twelve have been built. Christiaan Huygens argued for thirty-one equal steps in 1691, and Adriaan Fokker built a thirty-one-tone organ in Haarlem in 1950. R. H. M. Bosanquet's generalized keyboard of the 1870s put fifty-three steps under the fingers in a regular grid. Nineteen and thirty-one keep meantone's spellings: C sharp and D flat become different keys. The cost is more keys, new fingerings, and a repertory written for twelve. The isomorphic keyboards of Part 31 make any regular temperament playable with one set of shapes.
9A scale without octavesFoundations2 min
What if the octave were not special?
Most tunings discussed so far have used octave repetition. What if it were not? In 1972 Heinz Bohlen, and independently Kees van Prooijen and John Pierce, divided the ratio three to one, an octave and a fifth, the tritave, into thirteen equal steps. Each step is about one hundred and forty-six cents. Its consonances are built only from odd numbers: three, five, seven is its major triad. And the steps approximate those ratios well: nine sevenths within four cents, seven fifths within three. It suits tones with only odd harmonics, like a clarinet's low register from Part 8, whose odd-harmonic spectrum changes the usual partial-overlap advantage of the octave.
Here is the scale, thirteen steps from G up to the D an octave and a fifth higher, on a synthetic tone of odd harmonics only. Notice there is no octave: it falls between the eighth and ninth steps. Then the three, five, seven chord, first on odd harmonics, where it sounds settled, then on tones with all harmonics, where the added partials change the interactions and perceived quality.
Why does it work at all? Part 5 showed that consonance depends on a timbre's partials, not only on the ratio. For tones with only odd harmonics the octave's partials do not line up well, while the tritave's do. Max Mathews, John Pierce and colleagues ran listening tests in the late 1980s and found its chords heard as consonant, especially on odd-harmonic tones. Timbre affects consonance; octave equivalence also involves perception, learning and musical practice, so this does not derive or abolish it. Part 52 builds timbres to fit any tuning.
The scale has a small life of its own. Clarinets built for it, the BP clarinets, were made by Stephen Fox in the 2000s. Composers including Georg Hajdu and Elaine Walker have written for it. A symposium on the scale was held in Boston in 2010. Its Lambda mode, nine of the thirteen steps, plays the role the diatonic scale plays in ours. A small repertory, and a fine test of how much of tonality is learned.
10Frontier: tilings and open problemsResearch3 min
What is still unknown?
The canons lead to an open problem. In 1974 Bent Fuglede conjectured that a shape tiles space by translation exactly when it carries a basis of pure frequencies, an orthogonal basis of complex exponentials for square-integrable functions on the shape. Spectral means such an orthogonal exponential basis exists; tiling means copies fill space. Terence Tao showed in 2004 that it is false in five dimensions and more, and later work brought counterexamples down to three. The low-dimensional Euclidean and finite cyclic-group versions are separate questions with their own hypotheses; the cited literature discusses unresolved cases. We do not establish their current general status here. A rhythmic canon is a tiling of a cycle, so the conjecture asks the same question of canons.
There is a sharper question. In 1999 Ethan Coven and Aaron Meyerowitz gave two conditions on a rhythm, written in terms of its polynomial, called T1 and T2. A rhythm satisfying both tiles, and every rhythm that tiles satisfies T1. Whether every tiling rhythm also satisfies T2 is open. Emmanuel Amiot and others have tested it on large families of Vuza canons by computer, without finding a counterexample. The canon of chapter five is one more data point.
Other questions are open too. Classifying all Vuza canons of a given period is done for the smallest periods, not in general. Why so many traditional timelines sit near maximal evenness, whether culture, motor control or memory, is not settled. Which temperaments make good harmony for which timbres is an open design question. And many of this part's counts have no formula, only enumeration. Part 67 is about doing research in music, including its mathematics.
A concrete version. Collect timelines from many traditions, with their sources documented. Measure each one's distance from maximal evenness, against random rhythms of the same size. Test whether evenness predicts how easily listeners tap along or remember the pattern. Is maximal evenness a cultural choice, or a constraint of the mind? Such results could distinguish cultural and cognitive contributions; these need not be mutually exclusive.
Mathematical music theory is now a field of its own. It has a society, founded in 2006, and its own journal. Its books include Guerino Mazzola's Topos of Music and the work of Lewin, Tymoczko, Toussaint and Amiot. Computation made much of it possible: enumerations and searches no one could do by hand. The best of its results explain something a musician already hears. This part's claims, like every part's, are checked in its tests.
Variation 33, recap and problemsAll tracks2 min
Every part ends by doing something to the Tune with what it built. First, the Vuza canon of chapter five, with the Tune's first twelve notes as its twelve voices: every pulse of seventy-two is struck exactly once, and a new melody falls out of the tiling. Then plain hunt on four bells tuned to the Tune's first four different pitches. Then the Tune's opening in the Bohlen–Pierce scale, each degree of the major scale moved to a degree of its Lambda mode, on a tone of odd harmonics.
Row thirty-three of the ledger: seconds; the measurement is the tiling, the changes and the thirteen steps.
What did we find? Euclid's algorithm spreads strokes as evenly as possible and matches selected timelines from several traditions. The bell pattern and the major scale are one maximally even shape. Stacks of fifths have two step sizes exactly at five, seven, twelve and other convergent or intermediate-convergent denominators. Oddity, homometry, and a canon that tiles seventy-two pulses with neither part repeating. Fibonacci numbers in Sanskrit metre, and every order of four bells in Plain Bob. Temperaments as linear maps, and a scale with no octave.
Five problems. One to compute, one to prove, one for your ears, one to build, and a research problem, marked with a star. Solutions are in this part's notes. Pause here.
Where does this come back? In the cycles of tala, next. In timelines in their own musical worlds. In tunings for new instruments. In algorithmic composition. And in doing research in music.
And in practice. Many drum machines and sequencers offer Euclidean pattern generators. Producers rotate and layer them for polyrhythm. Microtonal musicians choose equal divisions by the commas they temper out. And bell ringers still ring extents and compose new methods.
The books and papers this part follows. The full list, with notes, is in the README.
Where it goes next. Tala in Part 34; timelines in their musical worlds in Part 37; tunings for new instruments in Part 52; algorithmic composition in Part 65; research in music in Part 67.
Key results
The part's results in one place, for revision.
Try it
Lab 33 · Rhythm and scale, computed
Generate Euclidean rhythms and check their evenness; find the scale sizes a generator makes with two step sizes; test rhythms for oddity and shared intervals; search for tiling canons; and rank equal temperaments.
python -m videos.music.labs 33
needs numpy, scipy, matplotlib · download lab33.py ·
source on GitHubE(5,12) x..x.x..x.x.; steps [3, 2, 3, 2, 2]; oddity True
in Toussaint's catalogue here a timeline of the Venda (South Africa)
moments of symmetry of generator 0.58496 [2, 3, 5, 7, 12, 17, 29, 41, 53]
homometric classes, 4 strokes in 8 / 6 in 12 1 / 15
tilings of Z_16 by (0, 1, 4, 5); with aperiodic entries 8; 0; rhythm periodic: False
the film's Vuza canon at 72: tiles, A periodic, B periodic True, False, False
Plain Bob Minimus: distinct rows, back to rounds 24, True
record-setting equal divisions up to 60 (worst of 3/2 and 5/4) [5, 7, 9, 10, 12, 19, 22, 31, 34, 53]
ear problem: Euclidean or not, in the order played (listen first) Euclidean, not, Euclidean, Euclidean, not, not
Euclid's algorithm never leaves gaps differing by more than one pulse; stacks of a generator have two step sizes exactly at the denominators of its continued fraction and their sums; and the canon at 72 tiles with neither part repeating.
The code (89 lines; it asserts its own result)
"""Lab 33: the mathematics of rhythm and scale, computed: Euclidean rhythms and their evenness, moments of symmetry
from any generator, oddity and homometry, tiling canons by exact cover, Plain Bob, and a temperament finder."""
from math import log2
import numpy as np
from videos.coursekit import labs
from explainer.music.monochord import SR, Clip, concat, mix
from explainer.music.monochord import mathmusic as MM
from explainer.music.monochord.instruments import drumkit as DK
TITLE = "Rhythm and scale, computed"
GOAL = ("Generate Euclidean rhythms and check their evenness; find the scale sizes a generator makes with two step sizes; "
"test rhythms for oddity and shared intervals; search for tiling canons; and rank equal temperaments.")
TASKS = [
"Change K and N. Is E(K, N) a rotation of a rhythm you know? Does it have the oddity property?",
"Change GENERATOR (as a fraction of the octave). At which sizes does a stack of it have exactly two step sizes?",
"Choose a RHYTHM and a cycle length CYCLE. Does it tile the cycle, and are any of its tilings free of periodicity?",
]
K, N = 5, 12
GENERATOR = log2(1.5)
RHYTHM, CYCLE = (0, 1, 4, 5), 16
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
p = MM.euclid(K, N)
s = "".join("x" if x else "." for x in p)
lab.row(f"E({K},{N})", f"{s}; steps {MM.steps(p)}; oddity {MM.oddity(MM.onsets(p), N) if N % 2 == 0 else 'n/a (odd cycle)'}")
named = [r["name"] for r in MM.named_euclidean() if r["k"] == K and r["n"] == N]
lab.row("in Toussaint's catalogue here", ", ".join(named) or "(not in the selection)")
lab.row(f"moments of symmetry of generator {GENERATOR:.5f}", str(MM.mos_sizes(GENERATOR, 60)))
lab.row("homometric classes, 4 strokes in 8 / 6 in 12", f"{len(MM.homometric_pairs(4, 8))} / {len(MM.homometric_pairs(6, 12))}")
T = MM.tilings(RHYTHM, CYCLE, limit=5000)
aper = [B for B in T if not MM.is_periodic(B, CYCLE)]
lab.row(f"tilings of Z_{CYCLE} by {RHYTHM}; with aperiodic entries", f"{len(T)}; {len(aper)}; rhythm periodic: {MM.is_periodic(RHYTHM, CYCLE)}")
chk = MM.vuza_check()
lab.row("the film's Vuza canon at 72: tiles, A periodic, B periodic", f"{chk['tiles']}, {chk['A_periodic']}, {chk['B_periodic']}")
assert chk["tiles"] and not chk["A_periodic"] and not chk["B_periodic"]
bob = MM.plain_bob_minimus()
lab.row("Plain Bob Minimus: distinct rows, back to rounds", f"{len(set(bob[:-1]))}, {bob[-1] == bob[0]}")
lab.row("record-setting equal divisions up to 60 (worst of 3/2 and 5/4)", str([e["n"] for e in MM.best_edos(60)]))
# Problem 3: six rhythms of five strokes in twelve pulses, three Euclidean (rotated) and three not
pool = []
from itertools import combinations
for c in combinations(range(12), 5):
if c[0] == 0:
pool.append(c)
euc = [MM.onsets(MM.euclid(5, 12))]
kinds, clips = [], []
for i in range(6):
if i % 2 == 0:
r = int(rng.integers(12))
ons = sorted((x + r) % 12 for x in euc[0])
kinds.append("Euclidean")
else:
while True:
ons = list(pool[int(rng.integers(len(pool)))])
if not MM.is_rotation(MM.pattern_of(ons, 12), MM.euclid(5, 12)):
break
kinds.append("not")
parts = []
for cyc in range(3):
for o in ons:
parts.append((Clip(DK.clave(), SR), (cyc * 12 + o) * 0.16, 0.0))
clips.append(Clip(mix(parts, duration=36 * 0.16 + 0.5).y, SR).at_level(-20.0))
order = rng.permutation(6)
lab.audio = concat([clips[i] for i in order], gap=1.0)
lab.row("ear problem: Euclidean or not, in the order played (listen first)", ", ".join(kinds[i] for i in order))
fig, (a, b) = labs.figure(2)
ks = list(range(1, N + 1))
a.bar(ks, [max(MM.steps(MM.euclid(k, N))) - min(MM.steps(MM.euclid(k, N))) if k < N else 0 for k in ks], color=labs.GOLD)
a.set_xlabel("strokes k")
a.set_ylabel("largest minus smallest gap")
a.set_title(f"E(k, {N}): never more than one pulse of difference")
e = MM.best_edos(60)
b.plot([x["n"] for x in e], [x["worst"] for x in e], "o-", color=labs.BLUE)
b.set_xlabel("steps to the octave")
b.set_ylabel("worst error, cents")
b.set_title("record-setting equal temperaments")
lab.fig = fig
lab.note = ("Euclid's algorithm never leaves gaps differing by more than one pulse; stacks of a generator have two step "
"sizes exactly at the denominators of its continued fraction and their sums; and the canon at 72 tiles "
"with neither part repeating.")
return lab
Now change it
- Change K and N. Is E(K, N) a rotation of a rhythm you know? Does it have the oddity property?
- Change GENERATOR (as a fraction of the octave). At which sizes does a stack of it have exactly two step sizes?
- Choose a RHYTHM and a cycle length CYCLE. Does it tile the cycle, and are any of its tilings free of periodicity?
Problems, with solutions
Try each problem before opening its solution.
-
Compute. Compute E(5, 9) and E(4, 11) by Bjorklund's process, and find a tradition that uses one of them.
Solution
E(5,9): x.x.x.x.x (gaps 2, 2, 2, 2, 1); Toussaint lists it as the Arabic rhythm aqsaq samāʿī and in other traditions. E(4,11): x..x..x..x. (gaps 3, 3, 3, 2); Toussaint notes it in Frank Zappa's use of an eleven-pulse pattern. The lab prints both.
-
Prove. Prove that a rhythm with the oddity property has at most n/2 strokes in n pulses.
Solution
Pair each pulse i with its opposite i + n/2: there are n/2 such pairs, and an odd rhythm takes at most one pulse from each pair. So it has at most n/2 strokes (pigeonhole).
-
Ear. The lab plays rhythms of five strokes in twelve pulses; say which are Euclidean.
Solution
The lab prints the answers. The Euclidean ones have gaps of only two sizes, 2 and 3, never two 2s in a row more than once; the others contain a run of strokes or a long hole.
-
Build. Write a temperament finder for the 7-limit, and find which divisions temper out 225/224.
Where to look. Extend
mathmusic.PRIMESto (2, 3, 5, 7) andpatent_valaccordingly; 225/224 = [−5, 2, 2, −1⟩. Among small divisions, 12 (⟨12 19 28 34]: −60 + 38 + 56 − 34 = 0), 31 and 72 temper it out; check others by the dot product, and rank by the worst error on 3/2, 5/4 and 7/4. -
★ Is maximal evenness a cultural choice or a cognitive constraint?
Where the frontier is. Assemble timelines from many traditions with documented sources; compare their evenness with random rhythms of the same size and with rhythms from the same traditions that are not timelines; test whether evenness predicts ease of tapping, memory and perceived stability in listeners from several cultures; report effects with intervals and the uncertainty in the corpus.
Notes and sources
Sources
- G. Toussaint, "The Euclidean algorithm generates traditional musical rhythms", BRIDGES (2005), and The Geometry of Musical Rhythm (2013; 2nd ed. 2019); E. Bjorklund, "The theory of rep-rate pattern generation in the SNS timing system", SNS-NOTE-CNTRL-99 (2003).
- J. Clough and J. Douthett, "Maximally even sets", Journal of Music Theory (1991); N. Carey and D. Clampitt, "Aspects of well-formed scales", Music Theory Spectrum (1989).
- S. Arom, African Polyphony and Polyrhythm (1991); M. Chemillier and C. Truchet, "Computation of words satisfying the rhythmic oddity property", Information Processing Letters (2003).
- D. T. Vuza, "Supplementary sets and regular complementary unending canons", Perspectives of New Music (1991–93); E. Amiot, Music Through Fourier Space (2016); E. M. Coven and A. Meyerowitz, "Tiling the integers with translates of one finite set", Journal of Algebra (1999); T. Tao, "Fuglede's conjecture is false in 5 and higher dimensions" (2004).
- P. Singh, "The so-called Fibonacci numbers in ancient and medieval India", Historia Mathematica (1985); N. G. de Bruijn, "A combinatorial problem" (1946).
- F. Stedman, Campanalogia (1677); A. T. White, "Fabian Stedman: the first group theorist?", American Mathematical Monthly (1996).
- P. Erlich, "A middle path between just intonation and the equal temperaments" (2006); D. J. Benson, Music: A Mathematical Offering (2006).
- M. Mathews, J. R. Pierce, A. Reeves and L. A. Roberts, "Theoretical and experimental explorations of the Bohlen–Pierce scale", JASA (1988).
- Part 6 for temperaments; Part 11 for rhythm; Part 12 for maximal evenness; Part 29 for homometry.
About this partfrom its README
Part 33 of a sixty-eight-part course in music (see the series plan and
the syllabus), the last part of Act V. An algorithm written to time pulses in a neutron accelerator
turned out to generate the rhythms of Cuba, Ghana, Bulgaria and Persia: it is Euclid's algorithm. This part follows the
same mathematics to scales, continued fractions, rhythmic oddity and homometry, canons that tile time (to a Vuza canon of
period 72, found by search and verified), Sanskrit prosody's Fibonacci numbers and de Bruijn mnemonic, change ringing,
temperaments as linear maps, and the Bohlen–Pierce scale, ending at an open conjecture about tiling. The mathematics is
Monochord's (explainer/music/monochord/mathmusic.py); rhythms are played on Part 11's kit and Part 9's drum, notes on
Part 7's piano, changes on Part 9's bells, and the Bohlen–Pierce tones are synthesized. Published findings are the ones
listed under Sources.
- A timing problem, solved by Euclid. The tresillo E(3,8), the cinquillo E(5,8) and the West African bell E(7,12), heard as necklaces; Bjorklund (2003) and Toussaint (2005); Toussaint's work on rhythm; the plan.
- 1. Euclid's rhythms. Bjorklund's process for E(5,13) step by step; why it is Euclid's algorithm; where the cycle starts (rotations); Toussaint's catalogue, nine rhythms each checked as a rotation of E(k,n); an ear question (two rhythms of five in eight: the cinquillo is the even one); all 7 five-in-eight necklaces ranked by evenness.
- 2. One shape, rhythm and scale. E(7,12) is the major scale and E(5,12) the pentatonic, heard as rhythms and as notes; Clough and Douthett's maximally even sets; three Euclidean rhythms layered, heard; the same shape in calendars, pixel lines and Sturmian words.
- 3. Stacks of fifths. Two step sizes after 2, 3, 5, 7 and 12 fifths, three otherwise; the three-gap theorem; continued fractions of the fifth (7/12, 24/41, 31/53) and the moments of symmetry up to 60 (2, 3, 5, 7, 12, 17, 29, 41, 53); stacks of 5, 7 and 12 heard; the golden ratio, whose sizes are the Fibonacci numbers.
- 4. Oddity and homometry. Arom's oddity property, impossible above half the pulses; odd rhythms counted (in twelve pulses: 20 of four strokes, 16 of five, 6 of six, none of seven); an ear question (two rhythms with the same intervals: 0 1 2 5 and 0 1 3 4, the only such pair of four in eight; 15 classes of six in twelve); the two properties together; what they mean.
- 5. Tiling the line. A small canon (0 1 4 5 entering at 0 and 2 fills eight pulses), heard, and why it is periodic; a Vuza canon of period 72 ({0, 8, 16, 18, 26, 34} entering at {0, 1, 5, 24, 25, 29, 30, 36, 49, 53, 60, 66}), heard, with 1,296 tilings by its rhythm and 432 of them aperiodic; how the search works; why 72 (the non-Hajós lengths 72, 108, 120, 144, 168, 180 ...); composers; from Hajós's cubes to canons.
- 6. Pingala's syllables. The eight rhythms of five beats, heard; Fibonacci counts (1, 2, 3, 5, 8, 13, 21 ...); Halayudha's meru (patterns by number of heavy syllables); yamātārājabhānasalagāḥ as a de Bruijn sequence, heard; combinatorics in prosody.
- 7. Change ringing. Plain hunt on four bells; plain hunt on six, heard; Plain Bob Minimus, all 24 orders of four bells and back to rounds, heard; bells and the symmetric group.
- 8. Temperaments as linear maps. Vals, monzos and commas in the kernel; a temperament finder (records up to 60: 5, 7, 9, 10, 12, 19, 22, 31, 34, 53) and which commas each of 12, 19, 31 and 53 tempers out; an ear question (one triad in 19, just, 12 and 31: which is just?); instruments for more than twelve; regular temperaments.
- 9. A scale without octaves. The Bohlen–Pierce scale: 13 steps of 146.3 cents in the 3:1 tritave; its scale and its 3:5:7 chord on odd and on all harmonics, heard; why it works; its life since.
- 10. Frontier: tilings and open problems. Fuglede's spectral conjecture; Coven and Meyerowitz's conditions; other open problems; mathematical music theory as a field; ★ research problem: is maximal evenness a cultural choice or a cognitive constraint?
- Variation 33, recap and problems. The Tune's first twelve notes as the twelve voices of the Vuza canon; plain hunt on bells tuned to its first four pitches; its opening in the Bohlen–Pierce Lambda mode; the ledger; what we found; five problems; where it comes back; in practice; references; Part 34.
What is computed and built
python -m videos.music.music33.compute (about ten seconds) fills .cache/music33/.
| Item | What it computes | Checked against |
|---|---|---|
hook, euclid, rank, layers |
Euclidean rhythms; Bjorklund's stages; the catalogue; evenness of all five-in-eight necklaces; layers | Toussaint's rotations (tests) |
even |
E(7,12) and E(5,12) as rhythms and scales | — |
mos, golden |
continued fractions; moment-of-symmetry sizes for the fifth and the golden ratio | the three-gap theorem |
oddity |
odd rhythms counted for 8, 12, 16 pulses; homometric classes | the pigeonhole bound |
canon |
a small canon; the Vuza canon at 72 and every tiling by its rhythm | tiling and periodicity checks |
prosody, meru |
Pingala's counts; the rhythms of five; the de Bruijn mnemonic; heavy-syllable counts | Fibonacci; binomials |
ringing, hunt6 |
plain hunt on four and six bells; Plain Bob Minimus | all 24 rows distinct |
temper |
record-setting equal divisions; vals; commas tempered out; four tunings of a triad | known commas |
bp |
the Bohlen–Pierce step and its approximations | — |
tune, variation |
Variation 33 | — |
Monochord's tools are held in tests/music/test_mathmusic.py; this part's claims and clips in
tests/music/test_music33.py.
Sounds. Part 11's clave, woodblock and hat and Part 9's drum and bells (physical models), Part 7's piano (retuned for the temperaments), and additive tones for the Bohlen–Pierce scale. There are no recordings; the traditional rhythms are played as bare timelines, not as the music they belong to.
What the models are, and are not. A timeline here is a pattern of strokes on one instrument; in the music it comes from it is one part among many, with its own sound, accents and dance. Evenness is a distance to the perfectly even spacing; Toussaint and others use several other measures. The Vuza canon was found by this part's own search from one chosen rhythm; it is one of many. The temperament finder looks only at the fifth and the major third (the 5-limit), with each prime mapped to its nearest step.
Notes
Euclidean necklaces abstract away the downbeat, accent, microtiming and cultural use. Oddity forbids antipodal onset pairs and does not imply aperiodicity. Generated scale sizes include intermediate convergents; five generated notes require four generator steps. The thirty-three-year leap pattern is an approximation, not the modern Iranian calendar rule. Prosodic morae are metrical units, not a claim about exact spoken duration. A ringing method need not be an extent. Temperament kernel statements compare the named commas rather than all infinitely many kernel elements. Odd-harmonic consonance does not abolish octave equivalence; beating also depends on the synthesis. Fuglede spectrality requires an orthogonal exponential basis; the cited historical results are not presented as a verified 2026 survey of open cases.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: the tresillo, cinquillo and bell pattern heard as necklaces; Bjorklund and Toussaint; Toussaint's work; the plan.
- Euclid's rhythms: Bjorklund's process step by step; why it is Euclid's; rotations; Toussaint's catalogue checked; an ear question (which five-in-eight is even?); all seven necklaces ranked.
- One shape, rhythm and scale: E(7,12) is the major scale, heard both ways; maximal evenness; three layers heard; the shape elsewhere.
- Stacks of fifths: two or three step sizes; the three-gap theorem; continued fractions and moments of symmetry; 5, 7 and 12 heard; the golden ratio and Fibonacci.
- Oddity and homometry: Arom's property and the pigeonhole bound; odd rhythms counted; an ear question (same intervals?); both properties; meaning.
- Tiling the line: a small canon heard; a Vuza canon at 72 found, verified and heard; the search; why 72; composers; Hajós.
- Pingala's syllables: the rhythms of five beats heard; Fibonacci; the meru; yamātārāja as a de Bruijn sequence heard; history.
- Change ringing: plain hunt on four and six (heard); Plain Bob Minimus, every order once, heard; bells and groups.
- Temperaments as linear maps: vals and commas; the finder; an ear question (which triad is just?); instruments; regular temperaments.
- A scale without octaves: Bohlen–Pierce heard on odd and all harmonics; why it works; since.
- Frontier: Fuglede's conjecture; Coven–Meyerowitz; open problems; the field; the research problem.
- Variation 33: the Tune as a Vuza canon, in plain hunt, in Bohlen–Pierce. Outro: problems, payoffs.
Covers: Euclidean rhythms and maximal evenness; well-formed scales and continued fractions; rhythmic oddity;
homometry; tiling canons and Vuza's aperiodic canons; de Bruijn sequences and Fibonacci numbers in Sanskrit
prosody; change ringing as walks on a Cayley graph; regular temperaments as linear maps with commas in the
kernel; the Bohlen–Pierce scale.
Built and computed: monochord/mathmusic.py: Bjorklund's generator and its stages; Toussaint's catalogue checked
as rotations; moment-of-symmetry sizes and convergents; oddity counts and homometric classes; tilings by exact cover,
with a Vuza canon at period 72 found and verified (1,296 tilings by its rhythm, 432 aperiodic); Pingala's counts, the
meru and a de Bruijn check of the mnemonic; plain hunt and Plain Bob Minimus (24 distinct rows); vals, commas and a
temperament finder whose records include 12, 19, 31 and 53; the Bohlen–Pierce step.
Variation 33: the Tune as the twelve voices of the Vuza canon; rung in plain hunt; in Bohlen–Pierce.
Frontier: tilings and the spectral conjecture; open problems in mathematical music theory; whether maximal
evenness is cultural or cognitive.
Rights: every sound is the film's own (§2.4); traditional rhythms are played as bare timelines and attributed.
Reading: Toussaint, The Geometry of Musical Rhythm; Amiot; Hall's and Benson's surveys.
Build the film
python -m videos.music.music33.compute # the part's numbers, into .cache/music33
python tools/build.py music33 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music33 Hook # one chapter, silent, with a contact sheet
Scenes: videos/music/music33. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.music.music33.compute # numbers and sounds (about ten seconds)
EXPLAINER_TTS=silent python tools/build.py music33 -q l --fps 15 # a silent-narration preview, with the sounds
python tools/qa_sound.py music33 --sync # the sound gates
python tools/dead_air.py renders/music33_480p.mp4 --sound music33 # no empty screen; no sound over a still one
python tools/lecture_length.py music33 # 30 to 60 minutes, listening included
python tools/build.py music33 # 1080p30, narrated
python -m pytest -q tests/music # Monochord against its references; this part's claims and clips
python -m videos.music.labs 33 # the lab (writes a figure and a short WAV)