♪Music, Built

A sixty-eight-part course in music: sound, theory, history, craft, technology and industry

Music, Built

Stop a stretched string at half its length and it sounds an octave higher; at two thirds, a fifth. The Pythagoreans built a cosmos on that, and left a question that has been open for 2,500 years: why do simple ratios sound good? The course follows the string from a single wire to an orchestra, a studio and a model that writes songs. It derives its mathematics on screen, builds an instrument called Monochord in code, and plays what it builds: every sound is computed, and everything you hear you also see.

68 parts43 hours of lectures866 chapters68 runnable labs68 interactives68 problem sets with solutions

Contents

Each part opens as lecture notes: the text of every chapter, its key results, an interactive and a lab, problems with solutions, and sources.

Act ISound

1One StringWhy does a stretched string have a pitch, and why does one string sound like several notes at once?Foundations15 chapters · 54 min2Waves in AirWhat is it that travels from an instrument to your ear, how fast, and why does it bend round walls, hum in a bottle and drop in pitch as it passes?Foundations14 chapters · 41 min3The SpectrumCan every sound be taken apart into pure tones, what does the taking apart cost, and is the list of pure tones everything there is to a sound?Foundations13 chapters · 39 min4The EarWhat does the ear do to a sound before you hear it: how does it sort frequencies, how loud is loud, and where does a note's pitch come from?Foundations13 chapters · 60 min5ConsonanceWhy do some notes belong together: is it number, beating, fusion, or habit, and can the answer be computed?Foundations12 chapters · 47 min6TuningIf the pure intervals cannot all be had at once, where should an instrument put the error, and why did the world settle on twelve equal steps?Foundations12 chapters · 46 min7Strings, Hammers and BowsWhat turns a vibrating string into a guitar, a piano or a violin, and why is one of them so much harder to play than the others?Foundations12 chapters · 50 min8Pipes, Reeds and VoicesWhy does a reed lower a pipe by an octave, how does a tube with no holes play a tune, and what makes a vowel?Foundations12 chapters · 53 min9Drums, Bars and BellsWhy does a drum go thump when a string sings, how were skins, bars and bells taught to play in tune, and can one hear the shape of a drum?Foundations12 chapters · 43 min

Act IINotes

Act IIIVoices

Act IVA Thousand Years

Act VAfter Tonality

Act VIMany Musics

Act VIIThe Craft

Act VIIIThe Mind

Act IXElectric Sound

Act XThe Studio and the Stage

Act XIListening Machines

Act XIICoda

How to use the course

1 · Read or watch

Each part is a lecture built in code: derivations in full, every number computed or cited. Its page carries the lecture as text, chapter by chapter, so you can follow along with the film or read it on its own.

2 · Revise

Each part's page ends with its key results, the glossary, where each idea comes back, and what the film computes and builds.

3 · Run the lab

One lab per part, on Monochord. Seeded, a few seconds each, nothing to download. Each checks its own result and ends with three things to change.

4 · Work the problems

Problem sets with worked solutions, in English and (where the part has them) Chinese. Try them before opening the solutions.

5 · Check the sources

Every page lists the papers, books and data the film was checked against.

Four tracks through the same material

Every chapter has a home level. A track is the set of chapters to watch at that level; on each part's page a button shows them.

The story and the devices

The story

A string. The oldest experiment in science is a musical one. Stop a stretched string at half its length and it sounds an octave higher; at two thirds, a fifth. The Pythagoreans built a cosmos on that, and the question they left has been open for 2,500 years: why do simple ratios sound good? Mersenne measured the string, Sauveur found its overtones, Fourier gave them a mathematics, Helmholtz put the answer in the ear, and in 2016 an experiment in the Bolivian Amazon suggested that part of the answer is not in the ear at all. This series follows the string from a single wire to an orchestra, a studio, a streaming service and a model that writes songs. Each act puts a new question to it:

  • Act I, Sound (1–9). What is a musical sound, and why do some sounds go together? The string, the air, the spectrum, the ear, consonance and tuning; then the instruments, family by family, as physics.
  • Act II, Notes (10–15). How did sound become something you can write down? Notation, rhythm and meter, scales, chords, melody, and key as a thing in the listener.
  • Act III, Voices (16–22). How do many notes move together? Counterpoint derived from how hearing groups sounds, four-part harmony, chromatic harmony, canon and fugue, form, and analysis as parsing.
  • Act IV, A Thousand Years (23–27). How did Europe get from one line of chant to a Mahler symphony? Five eras, each a technical problem: writing rhythm, printing counterpoint, inventing the bass, staging a key, stretching it.
  • Act V, After Tonality (28–33). What is left when the key goes, and what does mathematics see in music? New scales and rhythms, twelve tones, sound itself as material; then transformations, the geometry of chords, and the combinatorics of rhythm and scale.
  • Act VI, Many Musics (34–40). What do the world's other answers look like? Raga and tala, maqam, the bells and gongs of Asia, African timelines, the blues and swing, jazz changes, and the song from Tin Pan Alley to the drop.
  • Act VII, The Craft (41–44). How is a piece actually made and played? Orchestration, composing, performing, and writing for picture and for play.
  • Act VIII, The Mind (45–47). What does a listener do? The auditory scene, expectation and emotion, and where music comes from.
  • Act IX, Electric Sound (48–53). How do numbers become sound? Sampling, filters and reverb, dynamics and pitch processing, two parts of synthesis, MIDI and the workstation.
  • Act X, The Studio and the Stage (54–60). How does music reach a million ears, and who gets paid? Microphones and loudspeakers, rooms and space, recording and mixing, mastering, codecs, live sound, the business.
  • Act XI, Listening Machines (61–66). Can a machine hear, and can it write? Transcription, beat and chords, finding music, source separation, symbolic generation, generative audio.
  • Act XII, Coda (67–68). How does the field know what it knows, and what did we build? Research methods and the open problems; then the Variations, performed.

Every part ends on the question the next part answers. Every act ends on the limit the next act gets past.

Four devices hold the series together.

  1. Monochord (explainer/music/monochord/): the instrument the series builds, in code. It starts in Part 1 as one simulated string and each part adds the layer it teaches:

    • the physics: strings, tubes, membranes, bars and bells by finite differences and modes; a cochlea model;
    • the theory: pitch, tuning, score, rhythm, scale, chord and key modules; counterpoint and voice-leading checkers; a harmonizer; a canon solver; a grammar parser; the transformational and geometric tools;
    • the instruments: bowed, plucked and struck strings, reeds, brass, a singing voice, tuned percussion;
    • the electronics: oscillators, filters, envelopes, FM, grains, waveguides, effects, a sequencer and audio graph;
    • the studio: virtual microphones and loudspeakers, rooms, a mixer, a mastering chain with a loudness meter, a lossless and a perceptual codec, a PA and feedback simulator;
    • the listeners: pitch and onset detection, transcription, beat and chord tracking, a fingerprinter, a recommender, a separator, and small generative models.

    Each layer is checked against something that does not share its code: closed-form solutions, scipy.signal, published measurements and standards (ISO 226, ITU-R BS.1770 against ffmpeg's meter), public instrument samples and head-related transfer functions, and scores whose analysis is known.

  2. The Tune and the Variations (explainer.music.variations): one melody carried through every part. The Tune is Ah! vous dirai-je, maman (France, published 1761), which the world sings as Twinkle, Twinkle, Little Star and on which Mozart wrote twelve variations. It opens on a rising fifth, the 3:2 of Part 1. Every part writes one variation with what it has just taught: on one string, in eight temperaments, as a species counterpoint, a chorale, a fugue, an isorhythmic motet, a twelve-tone row, a raga elaboration, a bebop head, a pop single, a film cue, an FM patch, a mix, a master at 32 kbit/s, a transcription, a model's continuation. Each variation adds a row to the ledger: the score, the rendered audio, and what was measured. The finale performs them.

  3. The Chain (explainer.music.chain): the path a piece of music travels, drawn on every chapter card with the part's links lit: mind → score → hands → instrument → air → ear → mind, and the industrial detour through microphone → mix → master → codec → stream. Beside it runs the timeline strip (from the Hohle Fels flute to 2030, on a compressed scale). Payoff cards link ideas forward; each part closes with an In practice card.

  4. The Library (explainer/music/library/): the series' sources, with their provenance and rights recorded per item. Public-domain scores as data (Bach's chorales and Well-Tempered Clavier, Mozart's K. 265, folk-tune collections, Joplin's rags), and measured references (instrument samples, HRTFs, equal-loudness contours, published tunings of gamelans and maqam performances).

How it looks and sounds

The series draws in the manner of 3Blue1Brown with the lecture set pieces of explainer.ai.lecture, plus its own instruments in explainer/music/:

  • The playhead is always visible. When sound plays, something on screen moves with it: a cursor on the staff, a bead on the string, a column on the spectrogram.
  • One sound, many pictures. The same four bars are shown as a score, a piano roll, a spectrogram, a path on the Tonnetz and a path in chord space, and the camera moves between them without the sound stopping.
  • Continuity. A waveform unrolls into its spectrum. A polyrhythm speeds up until it is an interval. The circle of fifths lifts into a spiral, then into the tuning lattice. A reverb tail resolves into individual reflections in a drawn room.
  • Listening windows. The narration stops, the example plays, and the screen says what to listen for. Every part has pause-and-listen questions: the ear-training thread of a music degree, run inside the lecture.
  • Color is meaning. The twelve pitch classes keep one hue each, arranged by fifths so that near keys look alike. The Tune is always gold. Time, frequency and level keep their colors across every plot.
  • Honest playback. A demonstration that needs headphones, or low bass, or a difference smaller than a streaming codec preserves, says so on screen, and the argument is also made visually (a difference signal, a measured curve), so the film works on a phone speaker and with the sound off.

Setup

git clone https://github.com/Sir-Teo/explainer-videos.git
cd explainer-videos
bash tools/setup_linux.sh && source .venv/bin/activate
python -m videos.music.music1.compute   # the first part's numbers
python tools/build.py music1             # the first part

The plan of record is the syllabus: the standard every part meets and all 68 parts chapter by chapter. The sources are in the repository; the other courses are on the front page.