Doing Research in Music
How does each kind of music research know what it claims, and how would it find out it was wrong?
An ear question: an ABX trial (X was the coded phrase), and why one trial proves nothing; the Mozart effect from 1993 to the meta-analyses. Six kinds of knowing, one question asked six ways, each kind's failure and check. Sources: the Tune copied by simulated scribes for four generations, 19 copies surviving, heard; neighbour joining on shared errors recovers 7 of 8 groupings; an ear question on the corrupt copy; the original rebuilt (1 or 2 notes wrong); other evidence in sources. Analysis and corpora: steps are 83 per cent of moves in Bach's chorale tunes and 67 in Part 14's tunes, heard. Fieldwork and ethics; transcription; a sung phrase only 29 per cent within 10 cents of a written note. A simulated literature: the funnel with a bite, the first significant study at 0.86 for a true 0.1, Egger and PET; p-hacking from 4 to 61 per cent. Listening tests: 20 ABX trials catch a 60 per cent listener 13 per cent of the time, 158 are needed; an ear question on a harder trial; MUSHRA panel sizes. Leakage measured (3.22 against 3.80 bits), this series' leaks and duplicates, annotator ceilings and two tappers heard. The series audits itself: five verdicts re-run, one weakened (Part 65's best order in 7 of 10 splits), errata. Standards, three pitch standards heard, units, reporting, a number reproduced. Reading papers, the 1993 paper read, practice as research. Frontier: 44 open problems from the parts' notes. Variation 67: the Tune's critical edition.
What you need. Part 14 for the tune corpus; Part 26 for Mozart's variations on the Tune; Part 58 for listening tests; Part 63 for leakage and fingerprints; Part 65 for chorale tunes and copying. Binomial tests and power, meta-analysis and funnel plots, neighbour joining and tree distances, the bootstrap.
- Ideas, mathematics and history
- the methods of musicology, theory, ethnomusicology, cognition, acoustics and MIR; listening tests; corpus bias; the open-problems map
- What we build, compute and hear
- the series audited: every verdict re-run with intervals
What you will be able to do
Foundations
- Hear an ABX trial and say what one trial can and cannot show; hear a corrupt copy and its reconstruction.
- Hear two corpora, a sung phrase against its notation, two tappers, and three pitch standards.
- Explain how selective publication, leakage and single runs mislead, and how each is checked.
Full course
- Recover a manuscript family by neighbour joining and score it by Robinson-Foulds; rebuild an original.
- Compute exact ABX power and MUSHRA sample sizes; simulate a literature and test its funnel.
- Re-run a computed verdict across seeds and splits and report its spread.
Research
- Design an open benchmark of music-research verdicts, re-run each year.
Practice
- State the claim and its refutation, plan power first, split by what repeats, and report the spread.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Foundations 29 min · Full course 34 min · Research 37 min · Practice 34 min.
- 0Ten minutes of MozartFoundations2 min
- 1Kinds of knowingFoundations3 min
- 2Sources and editionsFoundations4 min
- 3Analysis and the corpusFoundations2 min
- 4Fieldwork and ethicsFoundations2 min
- 5Experiments and their literaturesFoundations3 min
- 6Listening tests and their powerFoundations3 min
- 7Datasets, leakage and agreementFoundations3 min
- 8The series audits itselfFoundations4 min
- 9Standards and reportingPractice3 min
- 10Reading papers, and practice as researchPractice2 min
- 11Frontier: the open problems of this seriesResearch3 min
- Variation 67, 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.
Ten minutes of MozartFoundations2 min
A test of the kind researchers use. You will hear A, then B, then X, which is one of the two. Is X the same as A, or as B?
X was B, the phrase through Part 58's coder at kilobits a second. Did you hear it, or guess? One trial cannot say: a guess is right half the time. How many trials would it take to know? That question, and its cousins in every corner of music research, is this part.
The story begins in 1993. In the journal Nature, Frances Rauscher, Gordon Shaw and Katherine Ky reported that thirty-six students scored eight or nine points higher on spatial tasks after ten minutes of a Mozart sonata. By 1998 the governor of Georgia had proposed a classical CD for every newborn in the state. In 1999 Christopher Chabris's meta-analysis found the effect small, and no larger than that of anything else that raises arousal or mood. In 2010 a larger one, from Jakob Pietschnig and colleagues, found it small, similar for other music, and largest in the studies of the original laboratory. How did a field come to believe it, and how did it find out?
Here is the plan. The kinds of knowing in music research. Manuscripts copied and recovered, and a canon set against a wider corpus. Experiments and the literatures they make. Listening tests and how many trials they need. Datasets and leakage, and this series auditing its own verdicts. And standards, reading papers, and the open problems that sixty-six parts have left.
1Kinds of knowingFoundations3 min
What counts as evidence about music?
Music research knows things in at least six ways, and this series discusses all of them, while its own computations are mainly synthetic demonstrations and corpus analysis. From sources: what was written, by whom and when, from manuscripts, prints and letters. From analysis: an argument about how a piece works, tested against the score. From fieldwork: what music means to the people who make it, learnt by living with them. From experiment: what listeners do, under controlled conditions. From computation: what can be measured or built. And from practice: what is learnt by making it.
The six did not arrive peacefully. In 1960 Mantle Hood asked ethnomusicologists to learn to perform the music they study, and called it bi-musicality. In 1985 Joseph Kerman's Contemplating Music argued that musicology had become the gathering of facts about sources, and should be criticism as well. In 1992 the philosopher Lydia Goehr argued that the idea of a fixed musical work, the thing a performance is of, settled into place around 1800, and is itself historical. In 1998 Christopher Small went further: music is not a thing but an activity, musicking, and the listeners, the dancers, even the person taking tickets at the door, are doing it. Each of them moved what counts as evidence.
Take one question and ask it six ways: where does the Tune come from? From sources: it is a French song, Ah, vous dirai-je, maman, in print by 1761; its earlier history is uncertain. From analysis: its form, a pair of phrases, a contrasting pair, and the first pair again, and its harmony fit the galant style of that decade. From fieldwork: how children learn it now, in how many languages and to which words. From experiment and computation: how memorable it is, and how typical against a corpus of tunes. And from practice: Mozart's twelve variations on it, which Part 26 measured, and this series' sixty-seven.
Each way of knowing has its own way of going wrong. A misread source; an argument that sees what it expects; a field note that speaks for people who did not ask it to. An experiment that does not replicate; a model that learnt the wrong thing; a practice that cannot be shared. And each has its check: collation of sources, the counter-example, consent and the return of recordings, replication, held-out data, and the critique of peers. This part takes them one at a time, with something to compute for each.
2Sources and editionsFoundations4 min
How do you recover a piece when the composer's copy is lost?
Most early music survives only in copies of copies, and every scribe made mistakes that later scribes copied. Karl Lachmann's method, made for classical texts in the nineteenth century, uses shared errors to reveal who copied from whom. Build the family tree, the stemma, then reconstruct the lost original from its branches. Related tree-inference methods are also used in evolutionary biology, with different assumptions.
Monochord simulates one. The Tune, notes, is copied by scribes for four generations, each copy misreading about one note in twenty on top of its exemplar's mistakes: manuscripts in all. The original is lost, and so are many copies; survive. Here is how many notes each survivor gets wrong, from to , coloured by generation: later copies tend to accumulate inherited errors in this simulation; individual errors can also cancel. Every one of them is wrong somewhere.
Hear the first phrase as three surviving copies have it: one from the first generation of copying, one from the second, one from the fourth.
In this phrase the first two copies happen to be right; their errors fall later in the tune. The fourth-generation copy has notes wrong here, inherited and its own together. A listener who knew only that copy would hear its errors as the Tune.
Now forget the history and recover it. Count, for every pair of surviving copies, the notes on which they differ: copies that share a lost ancestor share its errors, and differ less. Neighbour joining, a method of Naruya Saitou and Masatoshi Nei from 1987, builds a tree using a corrected distance criterion, not simply the smallest raw pairwise distance. The true tree groups the survivors in ways; the recovered tree finds of them. What it misses are copies whose common ancestor made no mistake of its own, and so left no trace.
Your turn. Rebuild the original from the copies, and hear three versions: the Tune as written, the worst surviving copy, and the reconstruction, in some order. Which is the corrupt copy?
The second was the corrupt copy, notes wrong; the first was the Tune as written, and the third the reconstruction. A simple majority of the copies gets notes wrong. Lachmann's refinement, one vote for each branch of the tradition so that a prolific branch cannot outvote the rest, gets . Editors of real music face worse: copies that mix two exemplars, scribes who corrected what they thought were errors, and composers who changed their minds.
Readings are not the only evidence a source carries. The paper: watermarks and chain lines date a sheet and can match it to a mill and a year. The ruling: the rastrum that drew the staves leaves a signature in their spacing. The hand: a scribe's clefs and stems identify the same copyist across manuscripts. The print: plate numbers and later corrections put the issues of an edition in order. A family tree from readings is one witness among these, and an edition weighs them all.
3Analysis and the corpusFoundations2 min
Is a rule about music a rule about the music you chose?
Analysis is an argument: this chord prepares that one; this motive returns, changed. Its evidence is the score, and its test is the counter-example, a passage the argument cannot explain. The corpus turn added counting across many pieces, so that a claim about music rests on more than a few. But a corpus is a choice, and most corpora are canons: Bach, Mozart, Beethoven, the Beatles.
First, hear what the two corpora are: the opening of one of Bach's chorale tunes, then the opening of a tune from Part 14's collection.
A hymn tune made for a congregation to sing in long, even notes, and a song with repeated notes and leaps. Which is more typical of melody depends on what you mean by melody.
Take a rule every textbook states: melodies move mostly by step. Test it on two corpora. In Bach's chorale tunes, per cent of moves are steps. In Part 14's wider collection of folk songs, hymns and nursery tunes, per cent, and the intervals do not overlap. Both are mostly steps; but how mostly depends on the corpus, by a substantial difference for these two selected corpora. The tunes also repeat notes far more, per cent of the time against . A rule measured on a canon is a rule about the canon until it is tested elsewhere.
Corpus studies done well share a few habits. Say which corpus, how it was chosen, and what it leaves out. Resample by tunes, not by notes, because the notes of one tune are not independent; the intervals on that table were computed that way. Hold out: a claim found by searching one corpus should be checked on another. And remember the counter-example: one well-chosen passage can still refute a rule that a thousand passages obey.
4Fieldwork and ethicsFoundations2 min
Who speaks for a music, and who owns its recordings?
Ethnomusicology learns a music by taking part in it: lessons, performances, often years in one place, as Bruno Nettl described. The researcher is part of the evidence: who they talked to, what they were allowed to hear. And the line between insider and outsider has moved: musicians are scholars of their own music, and increasingly its authors in print. Act Six's raga, maqam, gamelan and polyrhythm came to Western study this way, each with its own theory first.
Fieldwork has an ethics older than machine learning's. Consent: recording a ceremony or a song may need a community's permission, not only the singer's. Archives: early twentieth-century collectors took wax cylinders home, and many are now being returned to the communities they came from. Credit and pay: field recordings have been sampled into hits whose sources were never paid, the rights of Part 60 ignored. They are the same questions as Part 66's training data: whose music, and on what terms.
And transcription is interpretation. Staff notation decides what counts as a note, a pitch and a beat. Bartók transcribed folk songs in extraordinary detail, and his choices still shaped what could be seen in them. Charles Seeger distinguished, in 1958, prescriptive notation, which tells a performer what to do, from descriptive notation, which describes what a performer did. Part 61's machines make the same choices silently: a grid of notes, twelve pitches to the octave, onsets and offsets.
Measure what notation discards. Here is the Tune's first phrase sung with a wide vibrato and slow glides, its pitch tracked, against the notes a transcription would write.
Only per cent of the voice's moments sit within ten cents of the written note, and per cent within a quarter of a semitone. The rest is vibrato, glide and arrival: everything the performer added, and details a basic note-only transcription omits; richer notation can indicate some of them.
5Experiments and their literaturesFoundations3 min
How can a field believe an effect that is not there, or much smaller than it seems? Small studies: thirty people a group measure an effect of a tenth of a standard deviation with an error more than twice as large. Selection: journals, and authors, prefer results that cross the line of significance. So the published studies are the lucky ones, and the first to cross is usually an overestimate: the winner's curse. Monochord simulates such a literature, with Statistics, Built's tools: a true effect of a tenth, a hundred and twenty studies, the significant ones published and the others mostly not.
Plot each study's estimate against its precision: a funnel, wide at the bottom where studies are small, narrow at the top. All one hundred and twenty studies scatter symmetrically around the true effect. Now keep only the published ones. The small studies that survive are those that happened to land right of the red line, in the region selected by this simulation's significance rule; the funnel's lower left is missing.
What would a reader believe? The first published significant study, people a group, found an effect of , more than eight times the truth. Pooling all published studies gives , still more than double. Pooling all hundred and twenty, which no reader can see, gives . One large preregistered replication finds . Egger's test, which looks for the missing corner, gives p of : suggestive, not conclusive, from studies; and the regression it rests on estimates the effect at infinite precision as , near the truth.
Selection by journals is one road to a false result; choices by authors are another. Joseph Simmons, Leif Nelson and Uri Simonsohn simulated studies with no effect at all. With one planned test, per cent find an effect, as they should. Each reasonable-looking choice raises it: two measures to pick from, ten more people if the first look fails, a covariate, a different comparison. All together, per cent of studies of nothing find something. Preregistration makes planned choices visible and helps distinguish confirmatory analyses from exploration.
The remedies are known. Preregistration: state the hypothesis, the sample and the analysis before collecting data. Registered reports: the journal accepts the study before the results exist, so it cannot prefer the lucky ones. Power: plan the sample for the effect you expect, which is usually small. Replication, by many laboratories at once, and meta-analysis that models the selection. Music psychology has increasingly taken up all four since the Mozart effect.
6Listening tests and their powerFoundations3 min
How many trials does it take to know that a difference is heard?
The hook's test, counted. In each trial a listener says whether X is A or B, and by guessing is right half the time. In twenty trials, passing at the five per cent level takes right. Now take a listener who really does hear the difference, though only sixty per cent of the time. That listener passes twenty trials only per cent of the time. So a nonsignificant result alone does not establish inaudibility; confidence bounds and power determine what differences it can rule out. Many audio debates have been settled by tests that could not have found what they looked for.
Here is the power of the test for listeners of four abilities, by the number of trials. A listener right ninety per cent of the time is caught in trials, eighty per cent of the time; seventy-five per cent, in . Sixty per cent needs , and fifty-five per cent . Small differences need many trials, or many listeners, and a study should say in advance which difference it can find.
Your turn again, harder this time. The Tune's second phrase: A, then B, then X. Is X the same as A, or as B?
X was A, the original; B was the coder at kilobits, where many listeners hear little or nothing. Two trials right out of two would happen by guessing a quarter of the time: to say anything, you would need the dozens of trials on the last page.
The same arithmetic for rating tests. In a MUSHRA test listeners rate each system from nought to a hundred, and suppose the standard deviation of paired rating differences is fifteen points. To find a difference of twenty points takes listeners; ten points, ; five points, ; three points, . Many published comparisons of codecs and separators use a dozen or two listeners, enough for large differences and not for small ones.
Running listening tests well takes more than trials. Listeners differ: pool many and report each, because a few may hear what most do not. Blind and randomized: neither the listener nor the person running the test may know which is which. Training and anchors: MUSHRA's hidden reference and low anchor, from Part 58, help assess test reliability, subject to prespecified screening rules. And online studies reach thousands, with headphones and rooms unknown, so screen for them with a headphone-screening test, which itself has false positives and false negatives.
7Datasets, leakage and agreementFoundations3 min
When does a benchmark measure what it claims?
Part 65 split Bach's chorales by hymn tune, because Bach harmonized many tunes twice. What if it had not? Split the chorales at random, ten times, and the order-two chain seems to need bits a note. Split by tune, . The leaky split looks better by more than half a bit, a bigger gain than any method in Part 65 achieved over another, because of its held-out chorales were tunes it had already learnt.
This series has met leaks before, and said so. In Part 63, a classifier learnt a mains hum, and a split by excerpt rather than by clip hid how little else it knew. In Part 64, a separator trained on phrases the Tune repeats scored eight and a half decibels; honestly, six point nine. In Part 65, an order-eight chain sounded most like Bach because it was Bach. And Bob Sturm found, in 2013, repeated excerpts, mislabels and distortions in GTZAN, a dataset used in a hundred papers. The rule: split by the unit that can repeat, and check what the test shares with the training data.
This series has duplicates of its own. Of its Variations, have their audio again in another clip of the library, because a part reused a sound. Part 63 found them by fingerprint and counted a match to either copy as right. Harmless there; but in a training set and a test set, the same audio twice is a leak. So a dataset's first audit is for duplicates, near-duplicates, and versions of one work.
The labels themselves are uncertain. They come from annotators, and annotators disagree: on chords, on beats, on where a section ends. Part 62 met this: two people annotating the same song often differ at the boundaries. Annotator agreement measures reference uncertainty; it is not a universal ceiling on a model's score against an individual or consensus annotation. So report the agreement between annotators beside every score, and keep more than one annotation.
Here is an illustration of annotation disagreement. Two simulated people tap the beat of one performance, a little early as people do, each with their own jitter, and the second sometimes taps the off-beat. Scored against the beats as played, with Part 62's seventy-millisecond window, they reach and . Against each other, . If they were a dataset's annotators, their disagreement would complicate evaluation, but a tracker could score above their pairwise agreement against a chosen reference.
Hear the two tappers: the opening of that performance, first with one person's taps as clicks, then with the other's.
Both are plausible annotations of the beat; neither perfectly reproduces the simulated played beats, and a model scored against either inherits its looseness.
8The series audits itselfFoundations4 min
Do this series' own verdicts survive a new seed?
Many demonstrations in this series report a particular run, split, seed or stretch of music. A result that changes with the seed needs its variability and scope reported. So re-run five of them: Part 61's pitch tracker, Part 63's fingerprinter, Part 64's median filter, Part 65's best order, and Part 66's watermark detector. With new seeds and new splits, and report the spread.
Here they are. Part 61 said YIN gets nine per cent of frames grossly wrong at nought decibels; over ten new noises, to per cent. It holds, with a spread worth stating. Part 64's median filter: to decibels over three stretches of the session; these finite trials support it within the tested scope. Part 63's fingerprinter, said to name sixty-one per cent of queries level with a bar's noise: to per cent over three new noises. Part 65 said order two predicts new tunes best. Over ten splits by tune it is best in , and order one in the rest: the claim was true for the split shown, and weaker than it sounded. Part 66's detector fired on of sixty unmarked phrases; these finite trials support it within the tested scope.
Here is one of the audit's queries, a Variation in a new draw of the bar's noise, the music no louder than the noise.
An audit is made of cases like this one, many times over; a single case, right or wrong, shows only what one trial looks like.
Look closer at the one that weakened. Split by split, the best order is two, two, one, two, and so on: order one and order two are close, and which wins depends on which tunes happen to be held out. Order two's own score ranges from to bits across splits: the choice of test tunes moves the number more than the choice of order does. That is the ordinary situation in small-data research, and the fix is ordinary too: report the spread, not one run.
An honest audit ends in errata, and this series has some. In Part 61 a quantizer with one tempo put one rubato onset in fourteen in the right place; it was replaced by one whose tempo may drift, which puts all fourteen there. In Part 63 a classifier split by excerpt looked better than chance; split by clip, it does not beat the majority baseline in the shown experiment. In Part 64 a network was trained on phrases the test repeats; it was retrained without them, and the leak is shown. Part 65's best order holds in seven splits of ten, and its notes now give the spread. And Part 38's piano cut each note's string force off abruptly, a faint click; it is fixed, but sounds stored by earlier parts keep it. Every one was found by checking, not by luck.
9Standards and reportingPractice3 min
What must a study say so that someone else can check it?
Some of what makes music research checkable is dull and essential: standards. Pitch: A at four hundred and forty hertz, set as ISO 16 in 1975, where historical pitch varied by more than a semitone. Loudness: the LUFS of Part 57, and the equal-loudness contours of Part 4. Listening tests: the ITU's recommendations for small impairments and for intermediate ones, MUSHRA, from Part 58. In music information retrieval, shared tasks and common scoring code. A standard specifies a shared procedure; calibration, implementation and uncertainty still matter.
Why a pitch standard matters: the Tune's first phrase at A equals four hundred and forty, then at four hundred and fifteen, a pitch often used for Baroque music today, then at four hundred and sixty-six, a high organ pitch of that era.
Four hundred and fifteen is cents below four hundred and forty; four hundred and sixty-six, above. A study of historical tuning, or of how singers' ranges have changed, must say which standard a score's notes meant.
Many disagreements in the literature are about units. A decibel alone means nothing: decibels of sound pressure, of a file's full scale, weighted to the ear, or of loudness, are four different things. A level in a file says nothing about the level at the ear until the playback chain is calibrated. Cents assume a reference: equal temperament, or the piece's own tuning, as in Part 6. Tempo assumes a beat level, Part 62's octave problem. Write the unit, the reference and how it was measured, every time.
And what must a study report so that someone else can check it? The data: which pieces, recordings or participants, how chosen, and how split. The procedure, fixed in advance: the hypotheses, the analyses, the sample size and why. Every result with its uncertainty, including the ones that did not work. The code and the data, where rights allow; this series puts every number in a compute file and checks it in a test. And the limits, what the study cannot say; every part's notes here have a section on what its models are, and are not.
The simplest check of all: compute it again. Part 65 stored the order-two chain's bits per note. Recomputed here, from the same tunes with the same split and the same code,
10Reading papers, and practice as researchPractice2 min
How do you read a paper in a field you do not know?
How do you read a paper in a corner of the field you do not know? First, find the claim, in one sentence, and ask what would make it false. Then the kind of evidence, from Chapter 1, and that kind's usual failure. Then the numbers: how many pieces, listeners or splits, with what uncertainty. And last, what the authors say they cannot show, and what they did not say at all.
And each subfield has its first question. In historical musicology: which sources, how dated, and what is inferred from silence. In theory and analysis: the counter-example, and the corpus behind any rule. In ethnomusicology: who was asked, who speaks, and who consented. In music psychology: the sample, whether it was preregistered, and the effect with its interval. In music information retrieval: the split, leakage, annotator agreement, and the baseline. And in music technology: the listening test's design, and what was heard rather than measured.
Read the 1993 paper that way. The claim: ten minutes of a Mozart sonata raises spatial reasoning, for about ten to fifteen minutes. What would challenge a Mozart-specific mechanism: no difference against other music, or against anything that simply wakes listeners up. The evidence is an experiment, whose usual failure is not to replicate. The numbers: thirty-six students, one laboratory, three conditions, and no preregistration reported in the account discussed here. And what was not said, but heard anyway: that Mozart makes babies smarter. The paper studied students, not babies.
Some research is made rather than written. Practice as research offers a composition, a performance or an instrument as the result, with an account of what was found. Its knowledge is often how-to: a way of bowing, of voicing a chord, of building a reed. Its check is that others can use it: the method is shown, and the work can be heard and taken apart. This series is one: Monochord, the Tune and its Variations, built so that every claim in it can be run again.
11Frontier: the open problems of this seriesResearch3 min
What did sixty-six parts leave unanswered?
Every part of this series ended with a research problem, marked with a star. Read them all from the parts' notes, and are open questions. Here they are by act. The later acts, where the series reaches the machines, the studio and the mind, pose the most; but every act has its open questions, including the oldest: sound itself, tuning, harmony.
Six of them, drawn at random so that none is chosen for being flattering. Each is phrased so that an answer could be computed, measured or heard, and each has a note in its part saying where to start. They are the most useful thing this series can leave: work that is not done.
Grouped, the open problems fall into five kinds. Perception: what listeners hear in tuning, timbre, rhythm and form, measured across cultures. History and analysis: claims about styles, tested on corpora that are not only canons. Machines: transcription, separation and generation that are calibrated and honest about their data. Evaluation: metrics that track what listeners value, and benchmarks that are re-run. And economics and rights: who is paid when music is streamed, sampled or learnt from.
And how could this series itself be wrong? Its instruments are models, a bowed string, a piano, a voice, built from physics and simplified. Its listeners are often simulated, with tastes and errors the series chose. Its corpora are small: Bach's chorales, a few dozen tunes, its own sixty-seven Variations. So its findings are about those models and corpora first. Each part says so in its notes, and the open problems are where to test them on the world.
How do you find a problem of your own? A good one is one you can make progress on this year, and that would matter if solved. Look where two ways of knowing meet: a question about sources with a computation, a corpus with a listening test. Look for a number nobody has measured, or a claim measured only once. This part's own research problem: build a shared, open benchmark of the verdicts of music research, re-run every year. The audit of Chapter 8 is its first entry.
Variation 67, recap and problemsAll tracks2 min
Every part ends by doing something to the Tune with what it built. Here the Tune becomes a lost original, known only through a tradition of copies, and is edited back: its critical edition. Hear it as written, as its most corrupt copy has it, and as rebuilt.
Row sixty-seven of the ledger. One row is left, and it is not a variation like the others.
What did we find? Music research knows in six ways, each with its failure and its check. Shared errors can support a family-tree reconstruction and a proposed original under explicit copying assumptions. A rule measured on a canon is a rule about the canon. Selective publication leaves a funnel with a bite out of it, and the first result is usually the luckiest. Listening tests need many trials. And data must be split by what repeats, with verdicts re-run and their spread reported, including this series' own.
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 concert at the end, where every Variation is heard with its sources and its corrections.
And in practice. State the claim in one sentence, with what would refute it. Plan the power before the data. Split by whatever can repeat: tunes, recordings, performers. And report the spread of many runs, including the ones that failed.
The books and papers this part follows. The full list, with notes, is in the README.
Where it goes next. Every Variation with its sources and errata in the concert of Part 68.
Key results
The part's results in one place, for revision.
Try it
Lab 67 · Research methods, computed
Copy the Tune through a simulated tradition of scribes and recover its family tree and original; work out how many listening trials a test needs; and watch selective publication bend a literature.
python -m videos.music.labs 67
needs numpy, scipy, matplotlib · download lab67.py ·
source on GitHubmanuscripts; surviving; errors per surviving copy (least to most) 34; 16; 0 to 12
true groupings of the copies; recovered by neighbour joining 9; 6
the original rebuilt by majority: notes wrong 1
ABX at a true hit rate of 70%: power of 20 trials; trials for 80% power 0.42; 37
a true effect of 0.1: pooled over all studies; over the published 0.07; 0.17
Egger's test on the published: intercept, p -0.41, 0.696
ear problem: the Tune, the worst copy and the rebuilt original; where are the wrong notes? (listen first) 2, 3, 10, 12, 14, 15, 16, 18, 19, 24, 29, 34
Shared errors reveal who copied from whom; small listening tests miss real differences; and a literature that publishes its lucky studies overstates its effects in a way its funnel plot can show.
The code (83 lines; it asserts its own result)
"""Lab 67: research methods, computed: a manuscript tradition copied and recovered by neighbour joining; the power of
ABX listening tests; and a literature with selective publication, its funnel and Egger's test."""
import numpy as np
from videos.coursekit import labs
from explainer.music.monochord import SR, Clip, concat
from explainer.music.monochord import melody as ML
from explainer.music.monochord import research as R
from explainer.music.monochord.partkit import organ_tone
from explainer.stats.kit import multiple as MT
TITLE = "Research methods, computed"
GOAL = ("Copy the Tune through a simulated tradition of scribes and recover its family tree and original; work out how "
"many listening trials a test needs; and watch selective publication bend a literature.")
TASKS = [
"Change ERROR, the scribes' error rate. When does the majority reconstruction start to fail?",
"Change HIT, the listener's true hit rate. How many ABX trials give 80% power?",
"Change PUBLISH_NULL, the chance that a non-significant study is published. How much does the pooled estimate improve?",
]
ERROR = 0.05
HIT = 0.7
PUBLISH_NULL = 0.15
def play(keys, beats, beat=0.4):
t, y = 0.0, np.zeros(int((sum(beats) * beat + 1) * SR))
for m, b in zip(keys, beats):
z = organ_tone(440 * 2 ** ((m - 69) / 12), b * beat * 0.95, partials=6, rolloff=0.7)
i = int(t * SR)
y[i:i + len(z)] += z[: len(y) - i]
t += b * beat
return Clip(y / (np.max(np.abs(y)) + 1e-12) * 0.8, SR)
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
m = ML.corpus()[0]
keys, beats = [60 + p for p in m.pitches], list(m.beats)
t = R.copy_tradition(keys, rng, generations=4, error_rate=ERROR)
sv = t["survive"]
W = [t["mss"][i]["notes"] for i in sv]
errs = [R.hamming(w, keys) for w in W]
D = np.array([[R.hamming(a, b) for b in W] for a in W])
rf = R.rf_distance(R.true_adjacency(t["mss"], sv), R.neighbor_joining(D, [str(i) for i in sv]), sv)
rec = R.reconstruct(W)
lab.row("manuscripts; surviving; errors per surviving copy (least to most)", f"{len(t['mss'])}; {len(sv)}; {min(errs)} to {max(errs)}")
lab.row("true groupings of the copies; recovered by neighbour joining", f"{rf['true_splits']}; {rf['recovered']}")
lab.row("the original rebuilt by majority: notes wrong", str(R.hamming(rec, keys)))
assert R.hamming(rec, keys) <= np.median(errs)
n80 = R.abx_trials_needed(HIT)
p20 = R.abx_power(HIT, 20)
lab.row(f"ABX at a true hit rate of {HIT:.0%}: power of 20 trials; trials for 80% power", f"{p20['power']:.2f}; {n80}")
assert R.abx_power(HIT, n80)["power"] >= 0.8
sim = MT.publication_sim(150, 0.1, rng, n_range=(12, 120), publish_null=PUBLISH_NULL)
est, se, pub = sim["est"], sim["se"], sim["published"]
fe = lambda e, s: float(np.sum(e / s ** 2) / np.sum(1 / s ** 2))
eg = MT.egger(est[pub], se[pub])
lab.row("a true effect of 0.1: pooled over all studies; over the published", f"{fe(est, se):.2f}; {fe(est[pub], se[pub]):.2f}")
lab.row("Egger's test on the published: intercept, p", f"{eg['intercept']:.2f}, {eg['p']:.3f}")
if PUBLISH_NULL < 0.5:
assert fe(est[pub], se[pub]) > fe(est, se)
worst = int(np.argmax(errs))
lab.audio = concat([play(keys, beats), play(W[worst], beats), play(rec, beats)], gap=0.8)
lab.row("ear problem: the Tune, the worst copy and the rebuilt original; where are the wrong notes? (listen first)",
", ".join(str(i + 1) for i, (a, b) in enumerate(zip(W[worst], keys)) if a != b))
fig, (ax1, ax2) = labs.figure(2)
ax1.scatter(est[~pub], 1 / se[~pub], s=8, color="0.75", label="unpublished")
ax1.scatter(est[pub], 1 / se[pub], s=10, color=labs.GOLD, label="published")
ax1.axvline(0.1, color="0.3", lw=1)
ax1.set_xlabel("estimate")
ax1.set_ylabel("precision (1/se)")
ax1.legend(fontsize=7)
ns = np.arange(8, 200, 4)
ax2.plot(ns, [R.abx_power(HIT, n)["power"] for n in ns], color=labs.GOLD)
ax2.axhline(0.8, color="0.6", ls="--")
ax2.set_xlabel("ABX trials")
ax2.set_ylabel("power")
lab.fig = fig
lab.note = ("Shared errors reveal who copied from whom; small listening tests miss real differences; and a literature "
"that publishes its lucky studies overstates its effects in a way its funnel plot can show.")
return lab
Now change it
- Change ERROR, the scribes' error rate. When does the majority reconstruction start to fail?
- Change HIT, the listener's true hit rate. How many ABX trials give 80% power?
- Change PUBLISH_NULL, the chance that a non-significant study is published. How much does the pooled estimate improve?
Problems, with solutions
Try each problem before opening its solution.
-
Compute. A listener hears a difference 70 % of the time. How many ABX trials give 80 % power at the 5 % level?
Solution
With n trials the test passes at the smallest c with P(Bin(n, ½) ≥ c) ≤ 0.05; the power is P(Bin(n, 0.7) ≥ c). Searching n upward, the first with power at least 0.8 is n = 37 (
research.abx_trials_needed(0.7)): roughly double the twenty that many published tests use. -
Prove. Show that if study i is published only when θ̂ᵢ / sᵢ > 1.96, small published studies overestimate θ most.
Solution
With θ̂ ~ N(θ, s²), a published estimate is drawn from the normal truncated below at 1.96 s, whose mean is θ + s λ((1.96 s − θ)/s), with λ the inverse Mills ratio φ/(1 − Φ). For fixed θ ≥ 0 the term s λ(1.96 − θ/s) grows with s, since λ is increasing and its argument grows towards 1.96 as s does. So the bias of the published estimate grows with the standard error: the smallest studies overestimate most, which is the funnel's missing corner.
-
Ear. The lab plays the Tune, its worst copy and the rebuilt original; find the wrong notes by ear, then check.
Solution
The lab prints the positions where the worst copy differs. Two in three wrong notes are a step or a tone off, which a listener who knows the Tune can usually hear; those in repeated-note passages are easier to miss. The same counting answers an ABX run: with h hits in 40 trials the one-sided p-value is P(Bin(40, ½) ≥ h), about 0.04 for 26 hits and 0.08 for 25.
-
Build. Add contamination to the manuscript tradition (a scribe copying from two exemplars) and test the tree.
Where to look. In
copy_tradition, let a copy take each note from one of two exemplars, chosen at random per passage; neighbour joining then sees a witness between two branches, and the recovered splits fall. Measure the Robinson-Foulds share against the share of contaminated copies, and compare majority and per-branch reconstruction. -
★ Build an open benchmark of the verdicts of music research, re-run each year.
Where the frontier is. Collect claims with their data and code (from this series, from shared tasks, from replication projects), re-run them on schedule with new seeds, splits and data, and publish which hold, which weaken and which fail, as this part did for five of its own.
Notes and sources
Sources
- E. Clarke and N. Cook (eds.), Empirical Musicology (2004); B. Nettl, The Study of Ethnomusicology (3rd ed., 2015); J. Grier, The Critical Editing of Music (1996); C. Seeger, "Prescriptive and descriptive music-writing", Musical Quarterly (1958).
- F. H. Rauscher, G. L. Shaw and K. N. Ky, "Music and spatial task performance", Nature (1993); C. F. Chabris, "Prelude or requiem for the 'Mozart effect'?", Nature (1999); J. Pietschnig, M. Voracek and A. K. Formann, "Mozart effect–Shmozart effect: a meta-analysis", Intelligence (2010).
- M. Egger et al., "Bias in meta-analysis detected by a simple, graphical test", BMJ (1997); J. P. Simmons, L. D. Nelson and U. Simonsohn, "False-positive psychology", Psychological Science (2011).
- N. Saitou and M. Nei, "The neighbor-joining method", Molecular Biology and Evolution (1987); D. F. Robinson and L. R. Foulds, "Comparison of phylogenetic trees", Mathematical Biosciences (1981).
- B. L. Sturm, "The GTZAN dataset" (2013) and "A simple method to determine if a music information retrieval system is a horse" (2014); ITU-R BS.1116 and BS.1534 (MUSHRA); ISO 16 (1975).
Review qualifications: annotator pairwise agreement is not a universal model-performance ceiling. Power calculations assume the stated independent-trial or paired-rating model; finite synthetic audits are scoped checks. The series discusses fieldwork but its computations are not substitutes for community-based ethnographic research.
- J. Kerman, Contemplating Music: Challenges to Musicology (1985); L. Goehr, The Imaginary Museum of Musical Works (1992); C. Small, Musicking: The Meanings of Performing and Listening (1998); M. Hood, "The challenge of 'bi-musicality'", Ethnomusicology 4 (1960): chapter 1's turns in the discipline.
About this partfrom its README
Part 67 of a sixty-eight-part course in music (see the series plan and
the syllabus), the first part of Act XII, Coda. In 1993 a study of thirty-six students reported that ten
minutes of Mozart raised a spatial score, and within five years a governor proposed a classical CD for every newborn in his
state; the effect did not replicate as claimed. This part asks how each kind of music research knows what it claims, and
gives each something to compute: a manuscript tradition recovered from its errors, a canon set against a wider corpus, a
literature bent by selective publication, the power of listening tests, leakage and annotation uncertainty, and an audit of
this series' own verdicts. The tools are Monochord's (explainer/music/monochord/research.py) and Statistics, Built's kit.
- Ten minutes of Mozart. An ear question (an ABX trial: X was B, the coder at 48 kbit/s; one trial proves nothing); Rauscher, Shaw and Ky (1993), Georgia's CDs, Chabris (1999), Pietschnig et al. (2010); the plan.
- 1. Kinds of knowing. Sources, analysis, fieldwork, experiment, computation and practice, where each appears in the series; one question (where does the Tune come from?) asked six ways; each kind's failure and check.
- 2. Sources and editions. Copies of copies and Lachmann's method; the Tune copied for four generations (33 manuscripts, 19 surviving, each with 2 to 9 notes wrong); three copies heard; neighbour joining on shared errors recovers 7 of the 8 true groupings; an ear question (which is the corrupt copy? the second); the original rebuilt by majority (2 wrong) and by one vote a branch (1 wrong); other evidence in the sources.
- 3. Analysis and the corpus. Arguments and counts; a chorale tune and a folk tune heard; "melodies move mostly by step": 83 % of moves in Bach's chorale tunes (82 to 84) against 67 % in Part 14's tunes (63 to 71); corpus studies done well.
- 4. Fieldwork and ethics. Learning by taking part (Nettl); consent, archives and repatriation, credit and pay; transcription as interpretation (Bartók, Seeger); what notation discards, measured on a sung phrase (29 % of its moments within 10 cents of a written note).
- 5. Experiments and their literatures. How a literature misleads; a simulated one (true effect 0.1; 120 studies; 33 published): the funnel with a bite out of it, the first significant study at 0.86, the published pooled at 0.27, all studies at 0.12, a large replication at 0.08, Egger p = 0.07 and PET 0.06; analysts' choices (Simmons, Nelson and Simonsohn: 4 % false positives with one test, 61 % with all the choices); remedies.
- 6. Listening tests and their power. The hook's test counted (20 trials need 15 right; a 60 % listener passes 13 % of the time); power by trials (90 %: 8 trials; 75 %: 23; 60 %: 158; 55 %: 620); a harder ABX trial heard (X was A; the coder at 128 kbit/s); listeners for MUSHRA (a 5-point difference: 73); listening panels.
- 7. Datasets, leakage and agreement. Part 65's chain split by chorale (3.22 bits) against by hymn tune (3.80); this series' leaks; its own duplicates (13 of 59 Variations recur in another clip); annotator agreement; two simulated tappers (0.94 and 0.72 against the performance, 0.88 against each other), heard.
- 8. The series audits itself. Five verdicts re-run: Part 61's YIN at 0 dB (6 to 13 %; holds), Part 63's fingerprinter at 0 dB (58 to 71 %; holds; one missed query heard), Part 64's median filter (7.8 dB; holds), Part 65's best order (2 in 7 of 10 splits, 1 in 3: weaker than said), Part 66's detector (no false alarms in 60); the order's spread; errata.
- 9. Standards and reporting. Pitch, loudness, listening-test and MIR standards; the Tune at A = 440, 415 and 466, heard; units; what to report; a Part 65 number reproduced to the last digit.
- 10. Reading papers, and practice as research. How to read a paper; what to check first, by subfield; the 1993 paper read that way; practice as research.
- 11. Frontier: the open problems of this series. 44 open questions from the parts' notes, by act; six drawn at random; the problems grouped; how this series could be wrong; finding a problem; ★ research problem: an open benchmark of the verdicts of music research, re-run each year.
- Variation 67, recap and problems. The Tune's critical edition: as written, as its most corrupt copy has it (9 notes wrong), and rebuilt from the 19 copies (2 wrong); the ledger; what we found; five problems; where it comes back; in practice; references; Part 68.
What is computed and built
python -m videos.music.music67.compute (some minutes: earlier parts' verdicts are re-run) fills .cache/music67/.
| Item | What it computes | Checked against |
|---|---|---|
hook, abx2, power, mushra |
ABX trials; exact binomial power; listeners for MUSHRA | the binomial and noncentral t (tests) |
stemma, copies, tune67 |
a simulated manuscript tradition; neighbour joining; reconstruction | the true tree and the Tune (tests) |
canon, canonheard |
step, leap and repeat shares, resampled by tune | — |
notation, pitchstd |
a sung phrase against equal temperament; three pitch standards | — |
meta, phack |
a simulated literature; Egger and PET; the p-hacking simulation | the true effect (tests) |
leakage, dupes, tappers, tapsheard |
a leaky split; duplicates in the library; annotator agreement | the honest split (tests) |
audit, audit63, auditheard, repro |
five verdicts re-run; one number reproduced | the parts' stored numbers (tests) |
stars |
every part's research problem | the parts' READMEs |
Monochord's tools are held in tests/music/test_research.py; this part's claims and clips in tests/music/test_music67.py.
Sounds. Part 38's piano, organ tones, Part 8's voice, Part 58's coder, Part 63's simulated bar.
What the models are, and are not. The manuscript tradition has only substitutions, no omissions, no contamination between branches and no scribe who corrects; real traditions have all of them. The literature is simulated, with the Mozart effect's history as its motivation, not its data: its numbers are not the real studies'. The tappers are simulated people. The audit re-runs five verdicts of the series, chosen because they were cheap to re-run, not at random.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: an ear question (an ABX trial); the Mozart effect's history; the plan.
- Kinds of knowing: six ways and where the series used them; one question six ways; failures and checks.
- Sources and editions: copies of copies; a simulated tradition, heard; a tree from shared errors; an ear question (which copy is corrupt?); other evidence.
- Analysis and the corpus: arguments and counts; two corpora heard; a textbook rule measured on both; corpus studies done well.
- Fieldwork and ethics: learning by taking part; consent and repatriation; transcription; what notation discards, measured.
- Experiments and their literatures: how a literature misleads; a simulated funnel; what readers would believe; p-hacking; remedies.
- Listening tests and their power: the hook's test counted; power by trials; an ear question (a harder ABX); listeners for MUSHRA; panels.
- Datasets, leakage and agreement: a leak measured; this series' leaks and duplicates; annotator agreement; two tappers, heard.
- The series audits itself: five verdicts re-run; a query heard; the weakened verdict; errata.
- Standards and reporting: standards; three pitch standards, heard; units; what to report; a number reproduced.
- Reading papers and practice as research: a method; by subfield; the 1993 paper read; practice as research.
- Frontier: the series' open problems by act; six at random; grouped; how the series could be wrong; finding a problem.
- Variation 67: the critical edition of the Tune. Outro: problems, payoffs.
Covers: sources, editions and attribution; analysis as argument and the corpus turn; fieldwork, transcription
and ethics; experiments, psychophysics and online studies; listening tests; dataset leakage and annotator
ceilings; measurement standards; practice as research; reading a paper in each subfield; finding a problem.
Built and computed: monochord/research.py: a manuscript tradition (19 surviving copies, 7 of 8 groupings
recovered by neighbour joining, the original rebuilt with 1 or 2 wrong); steps 83 % in Bach's chorale tunes
against 67 % in Part 14's tunes; a simulated literature (first significant study 0.86 for a true 0.1; published
pooled 0.27); ABX power (a 60 % listener needs 158 trials); a leak (3.22 against 3.80 bits); the series' audit
(Part 65's best order holds in 7 of 10 splits; four other verdicts hold); 44 open problems read from the parts.
Variation 67: the critical edition of the Tune: as written, as its worst copy has it, and rebuilt.
Frontier: the map of open problems, built from every part's ★.
Reading: Clarke & Cook (eds.), Empirical Musicology; Nettl, The Study of Ethnomusicology; Sturm (2014);
Pietschnig et al. (2010).
Build the film
python -m videos.music.music67.compute # the part's numbers, into .cache/music67
python tools/build.py music67 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music67 Hook # one chapter, silent, with a contact sheet
Scenes: videos/music/music67. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.music.music67.compute # numbers and sounds
EXPLAINER_TTS=silent python tools/build.py music67 -q l --fps 15 # a silent-narration preview, with the sounds
python tools/qa_sound.py music67 --sync # the sound gates
python tools/dead_air.py renders/music67_480p.mp4 --sound music67 # no empty screen; no sound over a still one
python tools/lecture_length.py music67 # 30 to 60 minutes, listening included
python tools/build.py music67 # 1080p30, narrated
python -m pytest -q tests/music # Monochord against its references; this part's claims and clips
python -m videos.music.labs 67 # the lab (writes a figure and a short WAV)