♪Music, Built

Act IV · A Thousand Years

Part 26 of 68

The Classical Style

Foundationsstarts at this level37 min of film11 chaptersprerequisites: Part 7, Part 15, Part 21, Part 22, Part 24, Part 25

What made the Classical style a shared language, and can a program hear who is speaking it?

In the early 1780s Mozart wrote twelve variations on a French song whose tune is the series' Tune. The style he wrote in ran on shared expectations, strong enough that Haydn could make a joke of an ending. Its phrases lean on four and eight bars, a question and its answer, though in the thirty-three quartet movements of the corpus most of 146 authentic cadences fall elsewhere. A key tracker that knows no themes reads sonata form in Haydn's Op. 74 No. 1, home, the dominant, a development through distant keys, home again, and 14 of 18 major-key movements whose readings it trusts go first to the dominant. The quartet is a conversation the first violin leads in 55 to 62 bars in 100, kept moving by accompaniment figures in a quarter of all bars. Beethoven made the language longer and wider and made a home key something to be won. A fair attribution test, one genre, one city, one generation, scores 55 in 100: better than shuffled names (33), worse than always saying Mozart (45). The fortepiano and the metronome changed what a score could ask for. The Tune becomes a Classical set: theme with Alberti bass, minore, adagio, finale.

What you need. Part 7 for the bowed string and the piano; Part 15 for keys; Part 18 for n-grams; Part 21 for the period, the sentence and sonata theory; Part 22 for topics; Part 24 for the attribution test; Part 25 for binary form and the ritornello. Leave-one-out classification; permutation tests.

Ideas, mathematics and history
schemata at work, periodic phrasing, sonata form as drama, Haydn's wit, Mozart's K. 265 on our Tune, Beethoven's motives and his metronome
What we build, compute and hear
Mozart's twelve variations measured; our own Classical set beside them

What you will be able to do

Foundations

  • Hear a half cadence and an authentic cadence, and a period built from them.
  • Follow a sonata-form movement's keys: exposition, development, recapitulation.
  • Hear block chords, an Alberti bass and repeated chords under one melody.

Full course

  • Detect authentic cadences and measure phrase lengths in a corpus of quartets.
  • Trace a movement's tonal plan with a windowed key tracker and find its second key.
  • Run a leave-one-out attribution test with a permutation null, and say what it can and cannot show.

Research

  • Design a style model that locates where two composers' styles differ within a movement.
  • Weigh the evidence on Beethoven's metronome marks.

Practice

  • Build a fair comparison for a classifier: hold genre, place and time fixed, and report the null.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Foundations 32 min · Full course 35 min · Research 37 min · Practice 35 min.

  1. 0Twelve variations on our TuneFoundations2 min
  2. 1A style of shared expectationsFoundations4 min
  3. 2Periodic phrasingFoundations3 min
  4. 3Sonata form on stageFoundations5 min
  5. 4The string quartet: a conversationFoundations3 min
  6. 5The accompanimentFoundations2 min
  7. 6Haydn, Mozart, BeethovenFoundations5 min
  8. 7Who wrote this, fairlyPractice3 min
  9. 8The fortepiano and the metronomeFoundations4 min
  10. 9Frontier: style as learned statisticsResearch2 min
  11. Variation 26, recap and problemsAll tracks3 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.

Twelve variations on our TuneFoundations2 min

Vienna, the early 1780s. Mozart, in his mid-twenties and newly free of his employer, the Archbishop of Salzburg, is making a living in the capital by teaching, publishing and playing. Among the pieces he writes is a set of twelve variations on a French song, Ah, vous dirai-je, maman. The song's tune is ours: the Tune this series has varied twenty-five times so far. Mozart's set, printed in 1785, is a teaching piece and, without meaning to be, a catalogue of a style. It is a style built on expectations so firm that breaking them could be a joke, and Haydn made exactly that joke in a quartet of 1781, whose finale stops, starts, and stops again, until the audience cannot tell whether it is over.

Here is the theme, as the film harmonizes it: the Tune over plain chords on the fortepiano of Part 7. Notice how little it needs: the tonic, the subdominant, the dominant, a chord every bar or two, and a cadence every four bars. A Viennese listener of 1781 would know, after two bars, many likely continuations, with individual responses and context still varying.

Mozart's set is not in this series' library of scores, so this part reads the style through another body of music, thirty-three string quartet movements by Haydn, Mozart and Beethoven. First the expectations, and the phrasing that makes them. Then sonata form, traced through a Haydn movement by Part 15's key-finder. The quartet as a conversation, and the accompaniment patterns that hold it up. The three composers, measured. The fair test of authorship that Part 24 asked for, and why it is hard. And the new instruments and the new metronome, before the frontier.

1A style of shared expectationsFoundations4 min

Why could a piece be funny?

The Classical style grew out of a lighter one. From about 1730 composers trained in Italian opera wrote in a galant manner, a tune over a simple bass, with short phrases, clear cadences, and harmony that moves slowly under a quick melody. Its audience was growing: public concerts, printed music for amateurs, a keyboard in every comfortable parlour. It rested on a shared vocabulary of stock patterns, the schemata of Part 18, which every trained musician knew. Charles Rosen's book The Classical Style argued that Haydn, Mozart and Beethoven turned this polite language into drama.

The galant was not the only new manner. Carl Philipp Emanuel Bach, Johann Sebastian's second son, worked for the Prussian king in Berlin and then in Hamburg, and his keyboard music cultivated the sensitive style: sudden changes of mood, sighing figures, silences, harmonies that turn where they are not expected. His Essay on the True Art of Playing Keyboard Instruments, published in two parts in 1753 and 1762, taught a generation how to play and how to improvise. Haydn is reported to have said that he owed a great deal to it. The galant's ease and the sensitive style's expression are the two sides that the Classical style joined.

Those patterns now have names. The musicologist Robert Gjerdingen, in 2007, systematized historical schemata, retaining some older names and introducing others: the Romanesca, the Prinner, the Fonte, the Monte, the Ponte, and a dozen more. Each is a bass line and a melody moving together in a known way. Apprentices learned them in Naples, through the partimenti of Part 25. A listener who knows them hears what is coming, and notices when it does not come. Part 18's detector found few of them in Bach's chorales, which was the wrong repertory: they belong to the galant and Classical style.

Mozart's set shows the vocabulary in order. Twelve variations, each keeping the theme's harmony and its plan of four-bar phrases. The first seven decorate it with running figures in one hand or the other, triplets and syncopations. The eighth turns to C minor, the minore, with the hands imitating each other. The eleventh is a slow, ornamented Adagio, and the twelfth a fast finale in triple time. That is the plan of a Classical variation set, and this part's own variation at the end follows it.

Haydn's joke shows how strong the expectations were. The finale of his String Quartet Opus 33 Number 2, of 1781, is a cheerful rondo, but near the end it slows to an Adagio, then breaks its tune into fragments separated by silences, each of which could be the end and is not, until after a long rest the opening phrase returns, and stops in mid-air. The joke only works because familiar conventions can support an ending joke, without assuming uniform knowledge across an audience. That is the Classical style: conventions so firmly shared that a composer could play with them, and the audience would get it.

Who listened? In Vienna, audiences in theatres, halls and private houses; in 1784 Mozart sold subscriptions to his own concerts. In London, the violinist and impresario Johann Peter Salomon brought Haydn over twice in the 1790s for concert seasons that made him a celebrity. Publishers in Vienna, Paris and London sold the parts, and keyboard arrangements for the home. Public concerts and domestic publishing helped circulate recognizable conventions, and the clarity of the style is partly a consequence of the width of its audience.

2Periodic phrasingFoundations3 min

How long is a Classical phrase?

A question for your ears. Two four-bar phrases on the Tune's opening. One sounds finished; the other sounds like a question, waiting for an answer. Which is finished, A or B?

B is finished: it falls to C over the tonic chord, an authentic cadence. A stops on G over the dominant, a half cadence, and asks to go on. Put A first and B second and you have the basic unit of Classical phrasing.

The answer to a half cadence is a full one. A period is an antecedent ending on a half cadence and a consequent, usually beginning the same way, ending on an authentic cadence: four bars and four, a question and its answer. The other common theme-type, which Part 21 heard, is the sentence: an idea, its repetition, and a faster continuation driving to the cadence. The theorist Heinrich Christoph Koch described this phrasing at the time, building melodies from two-bar units the way sentences are built from clauses. William Caplin's modern theory of formal functions gives a detailed analytical vocabulary.

Hear the two shapes on the Tune's own material. First a period: the antecedent to the half cadence, the consequent to the full one. Then a sentence: the idea, the idea again a step higher, and a quicker continuation in running notes, driving to the cadence.

How periodic is the real music? A program detects a restricted subset of candidate authentic cadences in the thirty-three quartet movements, of them, where the bass falls a fifth onto a downbeat and the top voice lands on the tonic or its third, and measures the bars between them. The peaks are at four and eight bars. But gaps of exactly four or eight are a minority: Mozart's are in a hundred, Haydn's . Real phrases stretch, overlap and elide; the four-bar norm is the background against which those departures are heard. These gap statistics mix phrase structure with the detector’s omissions; it is also strict, and misses cadences where the bass does not move by a fifth.

3Sonata form on stageFoundations5 min

What does a key-finder see in a sonata?

Sonata form is a drama of keys, and a key-finder can watch it. Part 15's key-finder reads Haydn's String Quartet Opus 74 Number 1, first movement, eight bars at a time, all four instruments together. It begins in C major. Within twenty bars it has moved to G, the dominant, and stays there to the end of the first section: the exposition, with its second group in the new key. Then the development wanders: G minor, E flat, D minor, A minor, keys related to the home key but not the home key. And at about bar ninety C major returns and holds, with only brief excursions, to the end: the recapitulation, where the music of the second group comes back, now at home. The program knows nothing about themes; the key estimates support parts of this interpretation, but do not independently identify themes or prove formal boundaries.

Here is a stretch of the development, bars sixty-one to sixty-eight, where the key-finder reads G minor turning to D minor. Listen for how unsettled it is: short fragments, passed between instruments, never staying long enough to feel like home.

Is that one movement typical? The same tracker reads every movement in the corpus and records the first new key that holds for two readings running. A movement counts only if the tracker reads the same key in its first eight bars and its last, so that we can trust what home is: of the thirty-three. Of the in major keys, go first to the dominant, a fifth up. Both minor-key movements go to the relative major, the key a minor third up with the same key signature. The others, mostly slow movements and finales, have freer plans. The movements left out are a warning: on a third of the corpus the tracker cannot even agree with itself about home, and one of them is a joke of Beethoven's that chapter six will hear.

Listen for the difference. Six bars from the exposition, in G, and six from the recapitulation, at home in C, in some order. Which is the recapitulation, A or B? Listen for which one sounds like home.

B, from bar , is the recapitulation, in C. A, from bar , is in G. Out of context the difference is subtle; in the movement, after a development that has avoided C, the return can be perceptually salient; this film has not measured listeners’ responses. That is the point of the form.

Where did the form come from? From Part 25's binary dance, whose first half goes from home to away and whose second half comes back, each half repeated. In the rounded binary, the opening music returns, at home, partway through the second half. Expand the start of that second half into a development, and the return into a full recapitulation, and you have sonata form. The repeat signs survive: the exposition is repeated, and in many early movements so is the rest. Sonata form is a binary form that learned to tell a story.

The concerto took on the form too. Mozart wrote a dozen piano concertos for his own concerts in Vienna between 1784 and 1786. Many first movements combine orchestral and solo rotations, often taught as a double exposition: the orchestra states the themes, staying at home, and then the soloist enters and restates them, this time making the move to the new key. The orchestral passages are what remains of Part 25's ritornello. Near the end the orchestra stops on a held chord and the soloist improvises a cadenza on the themes. It is sonata form as a drama between an individual and a group.

Put in words, the form is a drama. The exposition sets up two key areas, home and away, and dramatizes the move between them. The development takes fragments of the themes through distant keys. The recapitulation brings everything back, with the second group now at home, and the tension of the exposition is resolved. This textbook account was written down in the 1840s, by Adolf Bernhard Marx, mostly from Beethoven, long after Haydn and Mozart had written the music. Modern theory, as Part 21 said, treats the form as a set of expected moves that a composer meets, delays or refuses.

4The string quartet: a conversationFoundations3 min

Who has the tune?

The genre that best shows the style is the string quartet. Two violins, a viola and a cello: four equal players and, typically no continuo filling in the harmony. Haydn wrote about seventy quartets over forty years and was central to developing the genre, alongside earlier and contemporary contributors. Goethe later described a quartet as four rational people conversing. Mozart dedicated six quartets to Haydn in 1785, calling them the fruit of long and laborious toil. It was music for the players first, played at home among friends: chamber music.

Here is how one opens: the first eight bars of Mozart's quartet K. 458, nicknamed The Hunt for its opening horn-call in six-eight time, sung by Part 7's bowed string from the encoding. Listen to the first violin lead, and the others answer and support it.

Is it a conversation, or a first violin with accompaniment? Count, bar by bar, which instrument has the most notes. In Haydn's movements the first violin leads in bars in a hundred; in Mozart's, , with the second violin busier; in Beethoven's, , with the viola and cello taking more of the lead. This note-attack proxy favors the first violin; it does not directly measure thematic leadership, but the others get the floor in a third to a half of the bars, and the lead changes hands in almost every other bar.

A Classical quartet usually has four movements: a fast sonata-form movement, a slow one, a minuet and trio, and a fast finale. The minuet is the one dance left from the Baroque suite of Part 25, still in three, still in two repeated halves; of the thirty-three movements here are in three-four time. Haydn's minuets are rarely courtly; listen to this one's energy.

One letter marks the turn. In 1781 Haydn offered his Opus 33 quartets to subscribers as written in a new and special way. It was a sales pitch, and also a fair description: the motives pass between all four players, and accompaniment and melody trade places, so that no part is mere filler. Mozart answered with six quartets dedicated to Haydn, written between 1782 and 1785, the Hunt among them. After hearing some of them, Haydn told Mozart's father that his son was the greatest composer he knew in person or by name.

5The accompanimentFoundations2 min

How do you keep a slow harmony moving?

The galant harmony changes slowly, a chord every bar or two. The accompaniment keeps it moving. Here is the Tune's first strain over the same chords three ways: block chords; an Alberti bass, named after Domenico Alberti, the low note, the high, the middle, the high, in even eighth notes; and repeated chords, a pulse of eighth notes over a held bass. The harmony is the same; the energy is not.

In a quartet, the second violin and viola do the same job. A program counts the bars in which one of the lower three instruments plays at least four notes drawn from one chord or one or two pitches: repeated notes, broken chords. It is a broad repeated-note or chordal-figure proxy, not specifically an Alberti-pattern detector, the inner voices pulsing. About a quarter of all bars have one: in a hundred in Haydn, in Mozart. The accompaniment is not filler; it is the motor of the style. And in Beethoven an accompaniment figure often turns out to be the idea the whole movement develops.

Around 1770 the style had a darker phase. Haydn and others wrote in minor keys, with wide leaps and sudden outbursts. His Farewell symphony, number forty-five, of 1772, is in the rare key of F sharp minor, and in its finale the players stop and leave one by one, a hint to the prince that the musicians wanted to go home to their families. In the same year three of his six Opus 20 quartets end with fugues. The label storm and stress was borrowed later from the literature of the time.

Counterpoint did not disappear. The galant manner had pushed it aside, but in the 1780s it came back as a topic, the learned style of Part 22's list: fugal passages in quartet finales, and the last movement of Mozart's Jupiter symphony, which combines five themes at once. Strict writing became a contrast, a special effect inside a style built on melody and accompaniment. Beethoven's late quartets push it furthest, in the Great Fugue.

6Haydn, Mozart, BeethovenFoundations5 min

What did each do with the same language?

Three composers, one city, overlapping lives. Joseph Haydn spent thirty years as music director to the Esterházy princes, then found fame in London in the 1790s. His art is economy: whole movements spun from one idea, with wit and surprise. Wolfgang Amadeus Mozart, a child prodigy, lived as a freelance in Vienna and brought the style to opera, in the ensembles of Figaro and Don Giovanni. Ludwig van Beethoven came to Vienna in 1792 to study with Haydn, and pushed the language outward: motives worked to exhaustion, movements longer, wider and louder. Calling them together the Viennese Classics is a later habit; they did not think of themselves as a school.

The expansion can be measured on the corpus. Haydn's and Mozart's quartet movements average about and bars; Beethoven's, , roughly three times as many notated bars in this small selected sample, though a bar is not a fixed unit of time and the figures are rough. And each of Beethoven's instruments covers about semitones on average, against about for Haydn and Mozart: nearly an octave more, the strings pushed higher and lower.

Haydn's career turned in 1790. His prince died, the household orchestra was dismissed, and the violinist and impresario Johann Peter Salomon brought him to London. On two visits, between 1791 and 1795, he wrote twelve symphonies for London's public concerts. In the slow movement of the Surprise symphony, a quiet tune is interrupted by a sudden loud chord, a joke on an audience that might be dozing. This was music addressed to a paying public, not to a court. He came home rich and famous, and wrote the oratorio The Creation.

Beethoven's other expansion was of the motive. His Fifth Symphony, of 1808, begins with four notes, three short and a long, and related rhythmic figures are often traced across the symphony; their identity and structural role require analysis. Development stops being one section of the form and becomes what the whole movement does; the codas grow into second developments. It is the Classical language pushed until it carries what listeners heard as a personal drama, and that is where Part 27 begins.

Here is that joke. The finale of Beethoven's second Razumovsky quartet is in E minor. But its theme begins firmly in C major, and only swerves to E minor at its cadence; then it starts again in C. Below the score, the tracker reads four bars at a time: C, E minor, C, E minor, as if it cannot decide. Listen for the swerve.

The theme keeps doing this, and the tracker only settles on E minor for good around bar . A listener who knows the style expects a movement to begin in its home key. Beethoven makes the home key something the movement has to win, and the expectation is what makes the joke work.

Two openings, half a century apart: Haydn's very first quartet, and one of Beethoven's from 1806. Which is Beethoven, A or B? Listen for the register, and for who has the tune.

B is Beethoven, the first of the quartets he wrote for Count Razumovsky in 1806, where the long opening tune is given to the cello, under a quietly pulsing accompaniment. A is Haydn's first quartet, from the 1750s, light and quick, the first violin on top.

Mozart's opera ensembles show what the language could do in a theatre. The end of the second act of The Marriage of Figaro, of 1786, is twenty minutes of continuous music in which characters arrive one at a time, each new turn of the plot marked by a new key, a new tempo, a new texture, until seven singers are singing at once, each still in character. It is the sonata's drama of keys put on a stage with real people.

Opera had its own revolution. In Vienna in 1762 Christoph Willibald Gluck staged Orfeo ed Euridice, and turned against the showpiece arias in which singers decorated the music to display themselves: the music should serve the drama. The preface to his Alceste, of 1769, asks for a beautiful simplicity. Recitative is accompanied by the whole orchestra, and the chorus takes part in the action. Mozart's operas inherit that reform and add to it the sonata's drama of keys.

7Who wrote this, fairlyPractice3 min

Can a program tell Haydn from Mozart?

Part 24 ended with a demand: a fair attribution test, holding genre, place and time fixed. These quartets hold genre more nearly fixed, but not date, source or generation. One genre, a small selected repertory, several decades and related movements, thirty-three movements. First, Part 24's twelve features, built for sixteenth-century counterpoint: hidden one at a time, the movements are attributed correctly times in a hundred. Then eight features built for this style: harmonic rhythm, periodic phrasing, cadence rate, who leads, how often the lead changes, density, register span, accompaniment figures. in a hundred. But always guessing Mozart, who has the most movements, would score . The table shows why: Beethoven is recognized two times in three, mostly by his register; Haydn and Mozart are confused with each other almost as often as not.

Look at the two best single features together, one dot for each movement. Across, the register span, from the cello's lowest note to the first violin's highest. Up, the cadences the detector finds in a hundred bars. Haydn's movements. Mozart's, on top of them. And Beethoven's, spread to the right: he uses more of the instruments' range, and that is most of what the test can see. Haydn and Mozart occupy the same cloud.

Is the test then learning nothing? The standard way to ask is to shuffle the names. Give the thirty-three movements their composers' names at random, run the same test, and count the hits; do it two thousand times. With shuffled names the test gets about right, by luck. With the real names it gets . About shuffles in a hundred do as well. This movement-level label shuffle suggests an association in the selected sample, assuming exchangeable movements; movements of a shared quartet violate independence and call for grouped testing, The score is two movements above the majority baseline. The shuffle tail is about 0.054, without a grouped-source validation.

Why so hard? Partly the sample: thirty-three movements, so that a few either way change the score. Partly the features, which know nothing of themes, harmony beyond its rate of change, or dynamics. But mostly the music: Haydn and Mozart wrote in one shared language and learned from each other; that was the point of the style. These features omit many candidate distinctions in motives, harmony and timing; that does not establish that those distinctions cannot be measured. The honest result is that no human-listener baseline is measured here, so relative human accuracy remains untested.

8The fortepiano and the metronomeFoundations4 min

What did the new instruments change?

The keyboard changed under the composers' hands. Bartolomeo Cristofori's harpsichord with hammers, built in Florence around 1700, had become by the 1780s the Viennese fortepiano: leather-covered hammers, a light action, five octaves, soft or loud by the touch of the finger, as Part 7 simulated. A single harpsichord note has little touch-sensitive dynamic range; texture, registration and articulation can still shape a crescendo; the fortepiano can, and dynamics became part of the composition, written into the score as piano, forte, sudden accents and crescendos. By Beethoven's last sonatas the instrument had six octaves and more, and iron bracing was on its way.

This is what the harpsichord could not do. The Tune's first phrase three times on Part 7's piano, the hammer striking a little faster on every note: a long crescendo. Listen for the modeled tone changing as it grows louder; the result depends on this hammer-and-string model.

The orchestra changed too. At Mannheim, the court of the Elector Palatine kept an orchestra famous across Europe for its discipline. Its signature was the crescendo: a long rise from soft to loud over a repeated figure, which visitors described as overwhelming. The symphony orchestra grew from strings with pairs of oboes and horns to include flutes, clarinets, trumpets and drums. Mozart heard the Mannheim players in 1777, and wrote to his father wishing that Salzburg had clarinets. Loud and soft became an effect of the whole orchestra, not of one instrument.

A machine changed tempo too. In 1815 Johann Nepomuk Maelzel patented the metronome, borrowing the design of the Dutch inventor Dietrich Winkel. In 1817 Beethoven published metronome marks for his first eight symphonies, and composers gained a widely adopted numerical tempo reference, following earlier attempts to measure tempo. Many of the marks are very fast, faster than most performers have dared, and the argument about them has run for two centuries.

There were two kinds of piano. Viennese makers like Johann Andreas Stein and Anton Walter built a light action and a clear, quickly fading tone. English makers like John Broadwood built a heavier action and a fuller, longer tone. Haydn wrote for the English sound in London, and Beethoven owned a Broadwood from 1818. The instrument shapes the writing: a longer tone allows held pedal, long lines, bigger chords. The piano model of Part 7 used in this film is closer to a modern grand, an anachronism worth admitting.

Can we hear this music as it sounded? From the 1960s and 70s, performers took up period instruments and the old treatises, as Part 25 described for the Baroque. Mozart's concertos on a Viennese fortepiano sound lighter and clearer than on a modern grand, each note fading sooner. Quartets on gut strings, with lighter bows and vibrato used as an ornament rather than all the time, sound leaner. But some things cannot be recovered: the rooms, the audiences, and the ears of people for whom this was the newest music. Part 7 can model an instrument. Nothing in this series models a listener of 1790.

There are three kinds of explanation. The machine was faulty; or Beethoven misread it, perhaps reading the scale at the wrong edge of the sliding weight, or misjudged because of his deafness; or he meant the marks, and later performers slowed down. The evidence is the marks themselves, across many works, the mechanics of the machine, and other composers' marks of the time. A statistical study published in 2020 compared his marks with tempos in recordings and argued for a systematic misreading worth about twelve beats a minute. The film could not obtain that study's data to recompute it; it stays here as a claim to check, which is what the problems at the end ask.

9Frontier: style as learned statisticsResearch2 min

Can a style be learned rather than described?

The frontier treats a style as statistics learned from music. The theorist Leonard Meyer argued in 1989 that a style is a set of choices made within constraints, and so, in effect, a set of probabilities. Models trained on a corpus, the n-grams of Part 18 and the grammars of Part 22, or neural networks, learn those probabilities directly. A model's surprise at each note then measures predictive fit under that model and training distribution, not an all-purpose stylistic typicality score, and composers become distributions: where in a phrase does Haydn surprise, and where Mozart? The limits are the ones this part ran into: small corpora, symbolic scores without performance, and models that know nothing of form or wit.

One more limit belongs to the frontier. Joseph Bologne, the Chevalier de Saint-Georges, was a celebrated violinist, composer and conductor in Paris; Luigi Boccherini in Madrid wrote over a hundred string quintets; Marianna Martines in Vienna wrote keyboard music and cantatas admired by Haydn and Mozart. The corpus has none of them, and a style learned only from three men is a narrow style. Encoding more of the repertory is itself a contribution to research.

A concrete version of the frontier. Train one model on Haydn's quartets and another on Mozart's. Score each held-out movement by both, and ask which model it surprises less. Compare the result with chapter seven's features and with listeners' judgements. And then ask the real question: where in a movement do the two styles differ most, in the themes, the transitions, the cadences, the development? An answer to that would be a statement about the music, not merely about a classifier.

Variation 26, recap and problemsAll tracks3 min

Every part ends by doing something to the Tune with what it has built, and this time Mozart got there first. So here is the film's own small Classical set, beside his: the theme over an Alberti bass; a minore, the Tune in C minor over repeated chords; an adagio, twice as slow, decorated with turns; and a finale in a quick six-eight.

Row twenty-six of the ledger. seconds. The measurement is the simplest one: the melody has notes in the theme and the minore, in the adagio, in the finale. Mozart's twelve variations do far more, and are worth hearing next.

What did we find? The Classical style runs on shared expectations, strong enough to joke with. Its phrases lean on four and eight bars, though most real cadences fall elsewhere. Sonata form is visible to a key-finder that knows no themes, and most retained major-key movements first sustain a dominant estimate under this tracker. The quartet is a conversation led, most of the time, by the first violin. Beethoven took the language longer and wider. And the numbers do know something about who wrote a quartet, with seventeen correct movements against fifteen for the majority baseline, and a shuffle tail near zero point zero five four: these scores do not establish human comparative accuracy.

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 Romantic century, which stretched the sonata and broke it. In the song, with its accompaniment figures. In orchestration, built on the Classical orchestra. In performing, where tempo is argued. In machines that learn and compose in a style. And in the last part, where the whole series becomes one set of variations, as Mozart's was.

And in practice. Pianists shape a period as a question and an answer. Quartet players know, bar by bar, who has the tune. Composers still use an accompaniment figure as a motor, and sometimes as a motive. And analysts can test claims about style only with fair comparisons.

The books and papers this part follows. The full list, with notes, is in the README.

Where it goes next. The Romantic century in Part 27; the song and its accompaniment in Part 40; orchestration in Part 41; performance and tempo in Part 43; style by statistics in Parts 62 and 65.

Key results

The part's results in one place, for revision.

Cadence gaps\(\displaystyle 146 \text{ cadences}; \ \text{exactly }\allowbreak \text{4 }\allowbreak \text{or }\allowbreak \text{8 }\allowbreak \text{bars: }\allowbreak \text{Mozart } 30\%, \ \text{Haydn } 11\%\)
The second key\(\displaystyle 14 \text{ of } 18 \text{ major-key }\allowbreak \text{movements} \to \text{V}; \ 2 \text{ of } 2 \text{ minor} \to \text{III}\)
Who leads\(\displaystyle \text{first }\allowbreak \text{violin: }\allowbreak \text{Haydn } 62\%, \ \text{Mozart } 59\%, \ \text{Beethoven } 55\%\)
Attribution\(\displaystyle 55\% \ \text{vs }\allowbreak \text{shuffled }\allowbreak \text{names } 33\% \ (p \approx 0.03), \ \text{always }\allowbreak \text{Mozart } 45\%\)
Beethoven's range\(\displaystyle \text{span } 35.2 \text{ semitones }\allowbreak \text{vs } 26.6 \text{ (Haydn)}, \ 25.8 \text{ (Mozart)}\)

Try it

Lab 26 · The Classical style, computed

Read a quartet movement's keys window by window and find its second key, count its cadences and phrase lengths and who leads each bar, run a fair attribution test with a permutation null, and hear the difference between a half cadence and an authentic one.

Figure produced by Lab 26: The Classical style, computed
Produced by the lab below, seed 0, in 1.6 s.
python -m videos.music.labs 26 needs numpy, scipy, matplotlib · download lab26.py · source on GitHub
opus74no1/movement1 (haydn, 154 bars): keys every 8 bars, hop 2             0 C major, 10 C major, 20 G major, 30 G major, 40 G major, 50 G major, 60 G minor, 70 A minor, 80 A minor, 90 C major, 100 C major, 110 G major, 120 C major, 130 C minor, 140 C major
home (first window) and the first new key that holds                        C major; G major from bar 16
authentic cadences (bars) and the gaps between them                         [1, 17, 45, 51, 126, 142, 148, 152]; gaps [16, 28, 6, 75, 16, 6, 4]
who leads (most onsets): 1st violin, 2nd violin, viola, cello, in 100 bars  65, 13, 6, 16
leave-one-out accuracy with 8 features / shuffled names (mean) / p          0.52 / 0.33 / 0.043
ear problem: the eight phrases in the order played (listen first)           half, half, authentic, authentic, authentic, authentic, half, half

A key tracker that knows no themes still sees the plan of a sonata movement; cadences fall at four and eight bars less often than the textbook says; and a fair attribution test can carry real information about the composer while still losing to a trivial rule.
The code (112 lines; it asserts its own result)
"""Lab 26: the Classical style, computed: a quartet movement's tonal plan read by a key tracker, its cadences and phrase
gaps, who leads bar by bar, a fair attribution test of Haydn, Mozart and Beethoven with its permutation null, and eight
phrases on the Tune sorted by ear into half and authentic cadences."""

import numpy as np

from videos.coursekit import labs
from explainer.music.monochord import SR, Clip, concat
from explainer.music.monochord import baroque as B
from explainer.music.monochord import classical as CL
from explainer.music.monochord import palestrina as PS
from explainer.music.monochord.partkit import organ_tone

TITLE = "The Classical style, computed"
GOAL = ("Read a quartet movement's keys window by window and find its second key, count its cadences and phrase lengths "
        "and who leads each bar, run a fair attribution test with a permutation null, and hear the difference between a "
        "half cadence and an authentic one.")
TASKS = [
    "Choose a MOVEMENT (try 'opus59no2/movement4' or 'k458/movement1'). Where does the tracker find its second key, and does it agree with the score?",
    "Change WINDOW, the tracker's window in bars. With 4 bars, what happens to Op. 59 No. 2's finale? With 16, what is lost?",
    "Choose FEATURES, a subset of the eight. Which subset scores best, and is it better than the shuffled names?",
]
MOVEMENT = "opus74no1/movement1"
WINDOW = 8
FEATURES = list(CL.FEATURES)
KN = ["C", "C#", "D", "Eb", "E", "F", "F#", "G", "Ab", "A", "Bb", "B"]


def key_name(k) -> str:
    return f"{KN[k[0]]} {k[1]}"


def tone(m: float, seconds: float, gain: float) -> np.ndarray:
    return organ_tone(440 * 2 ** ((m - 69) / 12), seconds, partials=6, rolloff=0.7, decay=2.5) * gain


def phrase(kind: str) -> Clip:
    """Four bars of the Tune's opening over I, IV, I, then V (a half cadence) or V-I (an authentic cadence)."""
    mel = [72, 72, 79, 79, 81, 81, 79, None, 77, 77, 76, 76]
    mel += [74, 74, 79, None] if kind == "half" else [74, 74, 72, None]
    bass = [48, 53, 48, 43] if kind == "half" else [48, 53, 43, 48]
    beat = 0.36
    y = np.zeros(int(len(mel) * beat * SR + 1.0 * SR))
    for i, p in enumerate(mel):
        if p is not None:
            seg = tone(p, beat * (2 if i + 1 < len(mel) and mel[i + 1] is None else 1), 0.3)
            j = int(i * beat * SR)
            y[j:j + len(seg)] += seg[: len(y) - j]
    for b, p in enumerate(bass):
        for x in (p, p + 16, p + 19):        # the bass, its third and its fifth, above
            seg = tone(x, 4 * beat, 0.12)
            j = int(4 * b * beat * SR)
            y[j:j + len(seg)] += seg[: len(y) - j]
    return Clip(y, SR).fade(0.01, 0.2).at_level(-20.0)


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()
    ms = [CL.Movement(r) for r in B.load_quartets() if "movement" in r["name"]]
    m = [x for x in ms if x.name == MOVEMENT][0]

    # 1. the tonal plan and the second key
    plan = CL.tonal_plan(m, window_bars=WINDOW, hop_bars=2)
    lab.row(f"{m.name} ({m.composer}, {m.bars} bars): keys every {WINDOW} bars, hop 2",
            ", ".join(f"{t['bar']:.0f} {key_name(t['key'])}" for t in plan[:: max(1, len(plan) // 14)]))
    sk = CL.second_key(plan)
    lab.row("home (first window) and the first new key that holds", f"{key_name(plan[0]['key'])}; " +
            ("none" if sk is None else f"{key_name(((plan[0]['key'][0] + sk[0]) % 12, sk[1]))} from bar {sk[2]:.0f}"))

    # 2. cadences, phrase gaps, who leads
    cad = CL.cadences(m)
    gaps = CL.phrase_gaps(m)
    lab.row("authentic cadences (bars) and the gaps between them", f"{cad[:12]}{' ...' if len(cad) > 12 else ''}; gaps {gaps[:12]}")
    lead = CL.lead_voices(m)
    shares = np.bincount(lead, minlength=4) / max(len(lead), 1)
    lab.row("who leads (most onsets): 1st violin, 2nd violin, viola, cello, in 100 bars", ", ".join(f"{100 * s:.0f}" for s in shares))

    # 3. the attribution test and its null
    idx = [CL.FEATURES.index(f) for f in FEATURES]
    X = np.array([CL.features(x) for x in ms])[:, idx]
    y = [x.composer for x in ms]
    acc = PS.loo_centroid(X, y)["accuracy"]
    null = np.array([PS.loo_centroid(X, list(rng.permutation(y)))["accuracy"] for _ in range(300)])
    p = (1 + np.sum(null >= acc - 1e-12)) / (1 + len(null))
    lab.row(f"leave-one-out accuracy with {len(idx)} features / shuffled names (mean) / p",
            f"{acc:.2f} / {null.mean():.2f} / {p:.3f}")
    assert 0.0 <= acc <= 1.0 and 0.0 < p <= 1.0

    # 4. Problem 3: eight phrases, half or authentic
    kinds = list(rng.permutation(["half"] * 4 + ["authentic"] * 4))
    lab.audio = concat([phrase(k) for k in kinds], gap=0.9)
    lab.row("ear problem: the eight phrases in the order played (listen first)", ", ".join(kinds))

    fig, (a, b) = labs.figure(2)
    names = sorted({tuple(t["key"]) for t in plan}, key=lambda k: (k[1], k[0]))
    row = {k: i for i, k in enumerate(names)}
    for t in plan:
        a.barh(row[tuple(t["key"])], 2, left=t["bar"], color=labs.GOLD if tuple(t["key"]) == tuple(plan[0]["key"]) else labs.BLUE)
    a.set_yticks(range(len(names)))
    a.set_yticklabels([key_name(k) for k in names], fontsize=8)
    a.set_xlabel("bar")
    a.set_title(f"{m.name}: the key of each window")
    b.hist(null * len(y), bins=np.arange(0, len(y) + 2) - 0.5, color="#888")
    b.axvline(acc * len(y), color=labs.GOLD, lw=3)
    b.set_xlabel("movements attributed correctly")
    b.set_title("shuffled names (grey) and the real names (gold)")
    lab.fig = fig
    lab.note = ("A key tracker that knows no themes still sees the plan of a sonata movement; cadences fall at four and eight "
                "bars less often than the textbook says; and a fair attribution test can carry real information about the "
                "composer while still losing to a trivial rule.")
    return lab

Now change it

  1. Choose a MOVEMENT (try 'opus59no2/movement4' or 'k458/movement1'). Where does the tracker find its second key, and does it agree with the score?
  2. Change WINDOW, the tracker's window in bars. With 4 bars, what happens to Op. 59 No. 2's finale? With 16, what is lost?
  3. Choose FEATURES, a subset of the eight. Which subset scores best, and is it better than the shuffled names?

Problems, with solutions

Try each problem before opening its solution.

  1. Compute. A movement has cadences at bars 4, 8, 16, 22, 30 and 38. Compute its phrase gaps and the share that are 4 or 8 bars.

    Solution

    The gaps are 4, 8, 6, 8 and 8; four of the five (80 in 100) are 4 or 8 bars.

  2. Prove. Show that a nearest-centroid classifier with two classes and one feature is a threshold at the midpoint of the class means.

    Solution

    With means μ₁ < μ₂, a value x is assigned to class 1 when |x − μ₁| < |x − μ₂|. Squaring, x² − 2μ₁x + μ₁² < x² − 2μ₂x + μ₂², so 2(μ₂ − μ₁)x < μ₂² − μ₁², and since μ₂ − μ₁ > 0, x < (μ₁ + μ₂)/2. The rule is a threshold at the midpoint.

  3. Ear. The lab plays eight phrases on the Tune, some ending on a half cadence, some on an authentic one. Sort them.

    Solution

    The lab prints the answer key: a phrase is a half cadence when it ends on the dominant chord with the melody on G or B or D, and authentic when its bass falls from G to C with the melody on C.

  4. Build. Add a feature to the attribution test that measures surprise under a model of chord pairs, and report the leave-one-out accuracy.

    Where to look. Turn each beat's sounding pitch classes (Movement.sonority) into a chord label, fit a smoothed bigram model on the training movements of each composer (Part 18's n-grams), and add each held-out movement's mean surprise under each model as two features; refit inside the leave-one-out loop, so that the held-out movement never trains its own model, and compare against the permutation null.

  5. ★ Beethoven's metronome. Recompute the 2020 study of Beethoven's metronome marks from its published data, and test its central claim.

    Where the frontier is. Collect the marks and a sample of recorded tempos, model the recorded tempo as a function of the mark with a systematic offset (and a performer and era effect), and ask whether an offset of the size claimed explains the gap better than a proportional slowing or no offset at all; report the uncertainty, and what data would distinguish the explanations.

Notes and sources

Sources

  • C. Rosen, The Classical Style (1971; expanded 1997); L. Ratner, Classic Music (1980); R. Taruskin, The Oxford History of Western Music, vol. 2 (2005).
  • R. Gjerdingen, Music in the Galant Style (2007); W. Caplin, Classical Form (1998); J. Hepokoski and W. Darcy, Elements of Sonata Theory (2006); H. C. Koch, Versuch einer Anleitung zur Composition (1782–1793); A. B. Marx, Die Lehre von der musikalischen Komposition, vol. 3 (1845).
  • C. P. E. Bach, Versuch über die wahre Art das Clavier zu spielen (1753, 1762); C. W. Gluck, preface to Alceste (1769); L. B. Meyer, Style and Music (1989).
  • A. Martín-Castro and I. Ucar, "Conductors' tempo choices shed light over Beethoven's metronome", PLOS ONE (2020).
  • M. S. Cuthbert and C. Ariza, "music21" (ISMIR 2010), whose corpus holds the quartet encodings.
  • Part 7 for the bowed string and the piano; Part 15 for keys; Part 18 for n-grams; Part 21 for the period, the sentence and sonata theory; Part 22 for topics; Part 24 for the attribution test; Part 25 for the binary dance and the ritornello.
About this partfrom its README

Part 26 of a sixty-eight-part course in music (see the series plan and the syllabus), the fourth part of Act IV. Part 25 ended with Bach's death; this part follows the half-century from the galant to Beethoven's middle years. It starts from Mozart's twelve variations on Ah, vous dirai-je, maman, whose tune is the series' Tune, and follows a style of shared expectations through periodic phrasing, sonata form traced by a key-finder, the string quartet as a conversation, the accompaniment as a motor, three careers, a fair attribution test, and the instruments and machines that changed the music, ending with style as learned statistics. The tools are Monochord's (explainer/music/monochord/classical.py, with Part 15's key tracker and Part 24's stylometric test); the music is the thirty-three string-quartet movements by Haydn, Mozart and Beethoven in the music21 corpus (baroque.load_quartets). Mozart's K. 265 is not in the corpus, so the film describes it and measures the quartets instead. Published findings are the ones listed under Sources.

  • Twelve variations on our Tune. Mozart in Vienna; the Tune over plain Classical chords, heard; the plan.
  • 1. A style of shared expectations. From galant to Classical; C. P. E. Bach's sensitive style; the stock patterns (Gjerdingen's schemata); K. 265's twelve variations; Haydn's joke about endings (Op. 33 No. 2); a public for music.
  • 2. Periodic phrasing. An ear question (which four-bar phrase is finished?); the period and the sentence, ours, heard; 146 authentic cadences in the quartets, with peaks at 4 and 8 bars but exactly 4 or 8 a minority (Mozart 30, Haydn 11 in 100).
  • 3. Sonata form on stage. Haydn's Op. 74 No. 1 read eight bars at a time: C, G, a development through G minor, E♭, D minor and A minor, C again; the development, heard; a census: of the 20 movements whose first and last readings agree, 14 of 18 in major keys go first to the dominant and both minor-key ones to the relative major; an ear question (exposition or recapitulation?); where the form came from (the rounded binary); the Classical concerto; a drama of keys.
  • 4. The string quartet: a conversation. The genre; Mozart's 'Hunt' quartet, heard, with who leads bar by bar; the first violin leads 62 (Haydn), 59 (Mozart) and 55 (Beethoven) bars in 100; a minuet of Haydn's, heard; Op. 33's "new and special way".
  • 5. The accompaniment. The Tune over block chords, an Alberti bass and repeated chords, heard; accompaniment figures in about a quarter of the quartets' bars; storm and stress; the learned style returns.
  • 6. Haydn, Mozart, Beethoven. Three careers; their movements measured (Beethoven's three times as long, with nearly an octave more range); Haydn in London; a motive worked to exhaustion; Beethoven's Op. 59 No. 2 finale, an E minor movement that begins in C major, heard with the tracker undecided; an ear question (which is Beethoven?); Figaro's Act II finale; Gluck's reform.
  • 7. Who wrote this, fairly. One genre, related works across several decades: Part 24's features score 42 in 100, eight Classical features 52, always guessing Mozart 45; the two best features plotted; 2000 shuffles of the names score 33 on average and as well as the real names about 5.4 times in 100; why it is hard.
  • 8. The fortepiano and the metronome. An instrument that can be soft and loud; a crescendo on Part 7's piano, heard; the Mannheim orchestra; Maelzel's metronome and Beethoven's marks; Viennese and English pianos; period instruments; Beethoven's puzzling marks.
  • 9. Frontier: style as learned statistics. Meyer's style as probabilities; beyond the canon (Bologne, Boccherini, Martines); ★ research problem: where in a movement do Haydn's and Mozart's styles differ most?
  • Variation 26, recap and problems. The Tune as a Classical set: theme with Alberti bass, minore, adagio, finale; the ledger; what we found; five problems; where it comes back; in practice; Part 27.
What is computed and built

python -m videos.music.music26.compute (a few minutes: the bowed strings) fills .cache/music26/.

Item What it computes Checked against
hook, figures, forms the Tune over plain chords and three accompaniments; a period and a sentence, ours —
phrases two four-bar phrases (an ear question); authentic cadences and the gaps between them in 33 movements the cadence rule (tests)
plan, develop Op. 74 No. 1's keys, eight bars at a time; its development; an exposition and recapitulation passage the score's plan
keys every movement's first new key; Op. 59 No. 2's finale, four bars at a time the movements' keys
texture, minuet who leads each bar; accompaniment figures; the 'Hunt' opening; Haydn's minuet —
three lengths and ranges by composer; Haydn's Op. 1 No. 1 and Beethoven's Op. 59 No. 1 (an ear question) —
style leave-one-out nearest-centroid attribution with two feature sets; a 2000-shuffle permutation null Part 24's test
dynamics a crescendo on Part 7's piano —
tune Variation 26 —

Monochord's tools are held in tests/music/test_classical.py; this part's claims and clips in tests/music/test_music26.py.

Sounds. Quartets: Part 7's bowed string on its violin body, one model for all four instruments (physical model); the Tune's examples and Variation 26: Part 7's piano (physical model). There are no recordings.

What the models are, and are not. The key tracker is Part 15's Krumhansl–Schmuckler profile over all four voices in eight-bar windows; it misreads some openings (a slow introduction, a theme that begins off the tonic), which is why the census counts only movements whose first and last readings agree. The cadence detector is strict: the bass falls a fifth onto a downbeat and holds, and the top voice is on the bass note or its third, so it misses cadences with other basses and counts some that a listener would not. Who leads is the voice with the most onsets in a bar. The attribution test has thirty-three movements, so a few either way move its score; its permutation null shuffles the composers' names among the movements. The excerpts are played from the encodings at a chosen tempo, all four instruments on one bowed-string model; the piano is closer to a modern grand than to a Viennese fortepiano, as the film says.

What is computed and builtScope of the measurements

Cadence detection finds selected bass-fifth arrivals with upper tonic/third conditions, not every authentic cadence. Key-profile estimates can suggest tonal regions but do not independently identify themes, formal boundaries or a listener’s sense of home. Four- and eight-bar gaps are measured between detected events, not verified complete phrases.

Note-attack counts are a proxy for activity, with ties favoring earlier instruments, rather than thematic leadership. The accompaniment detector finds broad repeated/chordal figures, not specifically Alberti bass. Movement length in notated bars is not duration, and the uneven sample does not establish universal composer tendencies.

The attribution task holds genre more nearly fixed than Part 24, but date, edition, source and generation still differ. Leave-one-movement-out permits other movements of the same quartet in training; a genuinely independent test should hold out whole quartets and sources. The permutation test assumes exchangeable movements, which related movements undermine. Best single features are selected on this dataset. There is no measured human-listener baseline. Scaling uses the corrected training-fold-only routine from Part 24.

Periods can have weaker authentic antecedent closes as well as half cadences. Sonata and concerto descriptions are common templates with historical alternatives. Dynamics, measured tempo and independent chamber parts all have precedents; the fortepiano’s touch response and metronome’s adoption expanded existing possibilities.

With training-fold-only scaling, the Classical-feature classifier gets 17/33 (51.5%), the counterpoint features 14/33 (42.4%), and the majority baseline 15/33 (45.5%). The 2,000-shuffle tail is 109/2001 ≈ 0.0545; this is not below 0.05, even before addressing related-movement dependence.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: Mozart in Vienna; the Tune over plain Classical chords heard; the plan.
  2. A style of shared expectations: galant to Classical; the sensitive style; the schemata; K. 265; Haydn's joke; a public for music.
  3. Periodic phrasing: an ear question (which phrase is finished?); the period and the sentence heard; cadence gaps in the corpus.
  4. Sonata form on stage: Op. 74 No. 1's keys; its development heard; the second-key census; an ear question (exposition or recapitulation?); the rounded binary; the concerto; a drama of keys.
  5. The string quartet: the genre; the 'Hunt' heard, with who leads; first-violin shares; a minuet heard; Op. 33.
  6. The accompaniment: three figures heard; figures counted; storm and stress; the learned style.
  7. Haydn, Mozart, Beethoven: careers; measured; London; Beethoven's motive; the wrong-key finale heard; an ear question (which is Beethoven?); Figaro; Gluck.
  8. Who wrote this, fairly: the attribution test; two features plotted; the permutation null; why it is hard.
  9. The fortepiano and the metronome: a crescendo heard; Mannheim; the metronome; two pianos; period instruments; the marks debated.
  10. Frontier: style as probability; beyond the canon; the research problem.
  11. Variation 26: the Tune as a Classical set. Outro: problems, payoffs.

Covers: schemata in use; periodic phrasing; sonata form on stage; the quartet, symphony and concerto; Haydn's economy; Mozart's ensembles; Beethoven's motives and expansions; the fortepiano; the metronome and Beethoven's puzzling marks. Built and computed: monochord/classical.py: authentic cadences and phrase gaps, who leads each bar, accompaniment figures, eight style features, windowed tonal plans and second keys, on the music21 corpus's quartet movements; Part 24's leave-one-out attribution test with a permutation null. K. 265 is not in the corpus, and the tempo study's data could not be obtained, so both are described rather than recomputed (the study is the research problem). Variation 26: our own Classical set (Alberti bass, minore, adagio, finale). Frontier: style as learned statistics; the Beethoven tempo debate. Reading: Rosen, The Classical Style; Caplin; Gjerdingen.

Build the film

python -m videos.music.music26.compute        # the part's numbers, into .cache/music26
python tools/build.py music26                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music26 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/music/music26. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.music.music26.compute                          # numbers and sounds (a few minutes)
EXPLAINER_TTS=silent python tools/build.py music26 -q l --fps 15   # a silent-narration preview, with the sounds
python tools/qa_sound.py music26 --sync                         # the sound gates
python tools/dead_air.py renders/music26_480p.mp4 --sound music26  # no empty screen; no sound over a still one
python tools/lecture_length.py music26                          # 30 to 60 minutes, listening included
python tools/build.py music26                                   # 1080p30, narrated
python -m pytest -q tests/music                                 # Monochord against its references; this part's claims and clips
python -m videos.music.labs 26                                  # the lab (writes a figure and a short WAV)