The Ear
What 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?
In 1978 David Kemp put a microphone in an ear canal and recorded the ear sending sound back; thirty years earlier Thomas Gold had argued that the inner ear must contain an amplifier, against Békésy, whose Nobel-winning travelling waves were seen in the ears of cadavers. The part follows a sound in. The middle ear is a transformer that matches air to fluid, and the ear canal a quarter-wave pipe from Part 2. In a model cochlea a wave travels along the membrane and stops where the membrane's own note matches it, so that equal ratios of frequency are equal distances. Fletcher's experiment gives the width of the ear's filters: a little over a whole tone, wider in the bass, so the first eight partials of a note are heard singly and the rest as a crowd. Loudness is not pressure (ten times the power is twice as loud), and a loud sound hides its neighbours. The nerve also carries timing, up to a few thousand hertz, and from timing comes pitch: a note keeps its pitch without its fundamental, follows Schouten's shift, and stops being a note where the piano stops. Shepard's endless scale separates chroma from height. A chapter without sound works out a safe dose. At the frontier the outer hair cells turn out to be Gold's amplifier: sharp, compressive, and audible as a third tone that the ear adds to two. The Tune is played with no fundamentals, and then with no octaves.
What you need. Parts 1 to 3: partials, pipes and impedance, the spectrum and the spectrogram. Decibels and logarithms. A mass on a spring and its resonance.
- Ideas, mathematics and history
- the cochlea as a frequency analyzer, critical bands, loudness and equal-loudness contours, masking, pitch by place and by timing, the missing fundamental, hearing loss
- What we build, compute and hear
- a gammatone cochlea; the Tune with its fundamentals removed, and as Shepard tones
What you will be able to do
Foundations
- Trace a sound from the ear canal to the auditory nerve and say what each stage does.
- Explain the cochlea's place map, a critical band, and why a note keeps its pitch without its fundamental.
- Work out a safe listening time from a level in dBA.
Full course
- Compute the middle ear's pressure gain and the power transmitted with and without it.
- Use the ERB formula to decide which partials of a note are resolved, and read a masked threshold.
- Describe the autocorrelation model of pitch and what it predicts for a shifted complex.
Research
- Explain why an oscillator at a Hopf bifurcation compresses, sharpens and distorts.
- Describe cochlear synaptopathy and why an audiogram does not show it.
- Say what a cochlear implant removes from the two codes of pitch.
Practice
- Read levels in dBA, phons and sones, and know which one a meter shows.
- Use masking to decide what in a mix or a codec can be dropped or must be moved.
- Imply a bass note with its partials on a system that cannot reproduce it.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Foundations 45 min · Full course 53 min · Research 60 min · Practice 53 min.
- 0The ear that singsFoundations3 min
- 1From air to waterFoundations4 min
- 2A wave that sortsFoundations6 min
- 3How fine is the ruler?Foundations7 min
- 4How loud is loud?Foundations5 min
- 5What a loud sound hidesPractice4 min
- 6A second clockFoundations4 min
- 7The pitch that is not thereFoundations7 min
- 8Where pitch stopsFoundations2 min
- 9Two kinds of highFoundations3 min
- 10The only pair you getPractice4 min
- 11Frontier: the ear is aliveResearch7 min
- Variation 4, recap and problemsAll tracks4 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.
The ear that singsFoundations3 min
Two pure tones, a thousand hertz and twelve hundred, and nothing else. The synthesized signal contains only these two tones. And yet many listeners hear a third tone underneath the two: lower, and faint, at eight hundred hertz. If you did not hear it, do not worry. Before this part is over we will help you find it. Your inner ear can generate such combination tones. Playback equipment can also distort, so this demonstration alone cannot prove where a tone you hear was made.
In 1978, in London, David Kemp sealed a miniature loudspeaker and a microphone into a volunteer's ear canal, played a click, and recorded what came back. First the click itself, ringing for a millisecond or two. Then, five to fifteen milliseconds later, a faint answer. It comes far a delayed cochlear response: sound crosses the whole ear in a tenth of a millisecond. Such emissions are often reduced or absent when outer hair cells are damaged. They do not test every cause of hearing loss. The ear was not only receiving sound. It was sending some back.
One man had predicted it thirty years before. In 1948 Thomas Gold, twenty-eight years old and later a famous astrophysicist, argued that the inner ear cannot be a passive instrument. It is full of fluid, and friction in a fluid would smother any resonance in it. The ear, he said, must contain an amplifier that puts energy back in, and an amplifier like that might sometimes whistle by itself. His proposal met with skepticism. Georg von Békésy had spent twenty years watching waves move inside real inner ears, and what he saw was broad, sluggish and passive. In 1961 it won him the Nobel Prize. But the ears on Békésy's bench came from cadavers. Kemp's microphone settled it. A dead ear is passive. A living ear is not.
So far this series has built a string, the air that carries its sound, and the spectrum that takes the sound apart. Part 3 ended with a puzzle: a tone with no energy at its fundamental that keeps its pitch anyway. A spectrum cannot explain that, because a spectrum describes the air. This part opens the instrument that does the listening. How sound gets from air into the fluid of the inner ear. How a wave in that fluid sorts frequencies by place, and how finely. Why loudness is not pressure, and what a loud sound hides. The two ways the ear measures pitch: where, and when. Why a note survives the loss of its fundamental, and where pitch stops altogether. And at the frontier, Gold's amplifier. Every model you will see is Monochord's own, a few hundred lines of code, checked against measurements of real ears.
1From air to waterFoundations4 min
How does a wave in air get into a fluid?
Follow a sound in. It enters the ear canal, a tube about two and a half centimetres long, and at the end of it pushes on the eardrum. Behind the eardrum are three bones, the smallest in your body: the hammer, the anvil and the stirrup. And the stirrup pushes on a window into the cochlea: a coiled tube, the size of a pea, filled with fluid. That is where hearing happens, and the fluid is a problem. In Part 2 we found that when a wave meets a medium that pushes back harder, most of it bounces off, and we had a formula for the part that gets through. In this simplified real-load model, the effective cochlear entrance impedance, not the bulk fluid impedance, pushes back about times harder than air does. Put that in the formula, and only percent of the sound's power gets in. Ninety-nine percent would bounce off the side of your head. The air-water mismatch similarly helps explain why poolside voices can be hard to hear from under water.
The three bones are the answer, and here is how they work. Pressure is force divided by area. The eardrum collects the air's push over about fifty-five square millimetres. The bones carry that force to the stirrup's footplate, which is only three point two. The same force on times less area is times the pressure. And the bones are also a lever, which adds a factor of one point three. Altogether the pressure at the window is about times the pressure at the eardrum. Pause, and turn that into decibels.
Twenty times the logarithm of is decibels. The middle ear does for sound what a low gear does on a bicycle: it trades a large, easy motion for a small, forceful one. This trades motion for pressure rather than creating power. In our simplified model, ignoring frequency dependence, the share of the power that reaches the fluid rises from percent to . And it tells you what happens when the middle ear is blocked, by fluid behind the eardrum in a child with a cold, or by bones that have stiffened with age: a loss of twenty or thirty decibels, which is exactly what doctors measure.
One more piece of acoustics before we go inside, and you can do it yourself. The ear canal is a pipe two and a half centimetres long, open at the outside and closed at the far end by the eardrum. Part 2 built exactly this pipe. Pause, and work out its lowest resonance.
A pipe closed at one end holds a quarter of a wave, so its lowest resonance is the speed of sound divided by four times its length: about hertz. Now look at a standard threshold approximation, based on measurements of young listeners. The lower the curve, the better the ear. Its best point is near hertz, where the canal resonates. Your ear is most sensitive where its own front door rings, and that happens to be the region of a baby's cry and of the consonants of speech. We will come back to this curve in chapter four.
2A wave that sortsFoundations6 min
How does a tube of fluid tell one frequency from another?
Unroll the cochlea. It is a tube thirty-five millimetres long, and a membrane runs down the whole length of it, dividing the fluid in two. The membrane is not the same all the way along. At the base, by the window where the stirrup pushes, it is narrow and stiff. Towards the far end, the apex, it grows wider and slacker, hundreds of times slacker. Helmholtz took the obvious meaning from that: a harp. Short stiff strings at one end for the high notes, long slack ones at the other for the low notes, each answering to its own frequency, like the glass globes of Part 3. In 1928 a Hungarian telephone engineer, Georg von Békésy, decided to look. He opened cochleas, scattered fine silver dust on the membrane, and watched it under a flashing light. He did not see a harp. He saw a wave, travelling from the base towards the apex.
Here is that wave in Monochord's own cochlea. The model is simple: two thousand slices of membrane, each one a mass on a spring of its own, stiff at the base and slack at the apex, all coupled by the fluid they sit in. We push on the base a thousand times a second, and slow the film down. The wave enters at the left and runs along the membrane, quickly at first. Then it slows, its ripples crowd together, and it grows, to a peak millimetres from the base. And then, within a couple of millimetres, it is gone. The motion toward the apex becomes negligible. Why does it stop? Each slice has a note of its own, high at the base and low at the apex. Near the base the slices are tuned far above a thousand hertz. They are stiff and quick, they follow the push easily and hand the wave on. Further along, the wave reaches slices whose own note is close to a thousand hertz. There the membrane resonates, the wave slows almost to a halt, and its energy is absorbed. Beyond that place the slices are too slack and slow to follow a thousand hertz at all, so there is nothing to carry the wave further. Helmholtz and Békésy were both right. There is a wave, and it ends at a resonance.
Change the frequency and the peak moves. Listen to seven tones, each an octave above the one before, from a hundred and twenty-five hertz to eight thousand, and watch where each one's wave comes to rest.
High tones stop near the base. Low tones travel farther toward the apex. And notice the spacing. In this model every octave moved the peak by the same distance, millimetres. Equal ratios of frequency are equal distances along the membrane. The cochlea is a keyboard, rolled up, and it measures frequency the way music does: by ratio.
Use that. A thousand hertz peaks eighteen point seven millimetres from the base. Where does three thousand hertz peak? Pause and work it out.
Three thousand is a ratio of three above a thousand, which is octaves. At millimetres an octave that is millimetres closer to the base: millimetres. Here is the whole map of our model, frequency against place: a straight line, because the frequency axis is logarithmic. And here is the map measured in human ears, collected by Donald Greenwood. Over most of the range the two run side by side. At the low end the real ear bends: below about five hundred hertz it packs its octaves closer together. Remember that bend. It is the reason bass notes are harder to tell apart, and it will matter in the next chapter.
One more thing sits on the membrane, and it is the part that hears. Along its whole length runs a single row of inner hair cells, about of them in each ear. When the membrane beneath a hair cell moves, the cell's hairs bend, and it signals the brain. About nerve fibres carry those signals, and each fibre comes from one place, so each fibre has one best frequency. That is the first of the ear's two codes: which fibres are firing says which frequencies are present. Beside them are three more rows, the outer hair cells, about . They outnumber the inner cells three to one, and yet they send almost nothing to the brain. What they are for was a mystery for a century. Hold that thought until the last chapter.
3How fine is the ruler?Foundations7 min
How close can two tones be, and still be heard as two?
The cochlea sorts frequencies by place. But look again at the wave from the last chapter. A single pure tone does not move a point on the membrane. It moves a stretch of it, several millimetres long. Two tones an octave apart move two separate stretches, and different hair cells report each one. But bring the second tone down to within ten percent of the first, and the two stretches lie on top of each other. The same hair cells feel both. So there must be a limit to how finely the ear can separate, and Part 3 told us that it matters: overlapping partials in one auditory filter can make relative phase audible. How wide is it?
The measurement was made in 1940 by Harvey Fletcher, at Bell Laboratories, and it is clever. Hide a pure tone in a narrow band of noise centred on it, and find how strong the tone must be to be heard. Now widen the band, keeping the noise's power in every hertz the same, so that the total noise grows. At first the tone gets harder to hear: more noise, more masking. But past a certain width, adding noise makes no difference at all. The tone is exactly as easy to hear as before. Fletcher's reading: the ear listens for the tone through a filter, and noise that falls outside the filter does not count. He called its width the critical band. This curve is Monochord's ear doing his experiment at a thousand hertz, and the band comes out about hertz wide.
Fifty years of such experiments give a formula for the width at any frequency. At two hundred and fifty hertz the band is hertz wide. At a thousand, . At four thousand, . In hertz they grow steadily. But music does not count in hertz. Take the band at a thousand hertz, from nine hundred and thirty-four to a thousand and sixty-six. Pause, and work out how big that is as a musical interval.
The ratio of the two edges is one point one four, and twelve times its logarithm to base two is semitones: a little more than a whole tone. Do the same for the others. At four thousand hertz, semitones, nearly the same. Through the middle and the top of its range the ear's filter is a fixed musical interval wide: the constant-Q ruler of Part 3 was the right guess. But at two hundred and fifty hertz the band is semitones, more than a minor third, and lower down it is wider still. That is the bend in the map of the last chapter, and it is why two notes close together in the bass sound thick and muddy, while the same two notes sound clean three octaves up. Lay these bands side by side and about of them cover the whole of hearing. Each is a little under a millimetre of membrane, and holds about hair cells. An older count, by Eberhard Zwicker in 1961, used wider bands and found twenty-four; his unit, the Bark, is still the ruler of many audio codecs, as Part 58 will show.
You can hear a critical band for yourself. Three pairs of pure tones follow. In each, the lower tone is a thousand hertz, and the two sound together. The question is simple: in which pairs do you hear two separate tones?
Only in the last. In the first pair the tones are eight hertz apart, and you hear one tone, swelling and fading eight times a second. Those are beats. In the second they are sixty hertz apart. It is still not two tones. It is one tone with a harsh buzz in it, and the name for that is roughness. In the third pair, four hundred hertz apart, the two tones separate and each sounds smooth. Here is why. The first two pairs sit inside a single band of the ear. The same hair cells receive both tones, and what they feel is the sum, rising and falling. The third pair lands in two different places. Keep the second sound in mind. Two partials inside one band, too far apart to beat slowly, too close to separate: that roughness is the physical root of dissonance, and it is the whole subject of Part 5.
Put sixty-four of these filters in a row, spaced as the ear spaces them, and feed them the first phrase of the Tune. This picture is the ear's own version of a spectrogram: time runs across, place along the membrane runs up.
Look at one note. At the bottom its partials stand apart, one line each. The ear has resolved them, as Helmholtz's globes did. Higher up the lines run together into a smear. There the partials are packed several to a band, and the ear cannot pull them apart. Where is the border? The partials of a note are spaced by its fundamental. The band around the n-th partial is about eleven percent of that partial's frequency. So the band becomes wider than the spacing at about the eighth or ninth partial. For the low C of our string, Monochord's count is resolved partials. Remember this number. The first eight partials of a note are heard one by one; the rest are heard as a crowd. That one fact will explain how you hear pitch, in chapter seven.
4How loud is loud?Foundations5 min
Why does the same pressure not always sound equally loud?
Now a different question about the same instrument. Part 2 measured the strength of a sound by its pressure, in decibels. Is that what you hear? Here is a tone that slides from a hundred hertz to ten thousand, with constant digital rms. The pressure at your ear also depends on your playback system. Listen to whether it stays equally loud.
It did not. It began faint, swelled as it rose, was at its strongest between three and four thousand hertz, and then thinned out. Here is the reason, the curve from chapter one, now over the whole range: the quietest sound a young ear can detect. At a thousand hertz it is about decibels. Near three and a half thousand, at the ear canal's resonance, it dips to . But at a hundred hertz it is decibels: a bass tone needs ten times the pressure of a mid-range tone merely to be heard at all. And below twenty hertz, and above fifteen or twenty thousand, sensitivity falls greatly and varies between listeners; those are not absolute frequency cutoffs. Your pressure meter and your ear disagree, by a great deal.
Test it on steady tones. Three tones, a hundred hertz, a thousand, and thirty-five hundred, each with equal digital rms. Playback response also affects the pressure at your ear. Which is the softest, and which the loudest?
The low tone is much the softest, if your loudspeakers reproduce it at all, and the high one the loudest. In 1933 Fletcher and Wilden Munson turned this into a measurement. They had listeners adjust tones of every frequency until each sounded as loud as a reference tone at a thousand hertz. The level of the matching reference is called the tone's loudness level, in phons. Sound level meters carry a simplified version of their curves, called the A weighting. Before adding up the energy, the meter turns a tone at a hundred hertz down by decibels, and leaves one at a thousand alone. Whenever you see a noise level quoted in d B A, this is the correction that has been made.
Phons say when two sounds are equally loud. They do not say how much louder one sound is than another. In 1860 Gustav Fechner had proposed that a sensation grows with the logarithm of what causes it, and the decibel follows his idea. In 1936 Stanley Stevens asked listeners a blunter question: make this sound twice as loud. Try his result. Here is a note, and then the same note with ten times the power, ten decibels more. How much louder is the second?
Most people say: about twice as loud. Not ten times. That is Stevens's law, a power law rather than Fechner's logarithm. For similar spectra at moderate and higher levels, ten times the power is heard as roughly twice the loudness, and his unit, the sone, doubles with every ten phons. Loudness grows as roughly the zero point three power of the sound's power. And it settles something from Part 2. We found there that ten violins playing together are ten decibels stronger than one. Now we can say what that sounds like: twice as loud. To roughly double the loudness in this equal-player, incoherent-power approximation takes about ten players. Real ensembles and rooms vary.
A worked example. A full orchestra seats sixteen first violins. How much louder are sixteen than one? Pause and work it out, in decibels and then in loudness.
Sixteen times the power is decibels, and at a doubling for every ten decibels that is about times as loud. Sixteen players, for a little more than twice the loudness in this approximation. Doubling also changes colour and blend, while a soloist can remain audible through differences in timbre, register and orchestration. Keep the range of this rule in mind. At a thousand hertz, forty phons defines one sone. Eighty phons corresponds to sixteen sones: four doublings. We must not extrapolate that simple rule all the way to the threshold of hearing. The active compression behind this wide operating range is the subject of our last chapter.
5What a loud sound hidesPractice4 min
When does one sound make another inaudible?
Fletcher's filter has a consequence that an entire industry is built on. A tone is heard through the band of the ear centred on it. So anything else that falls in that band competes with it. Start with silence: the grey line is the threshold in quiet. Now add one loud tone, a thousand hertz at seventy decibels. Its wave on the membrane spills into the neighbouring bands, and raises the threshold in every one of them. The red line is Monochord's estimate of the new threshold: the loud tone's power in each band, less a few decibels. So here is a question. A second tone at eleven hundred and fifty hertz, at decibels, which is easy to hear on its own. Is it heard? And what about the same tone moved up to three thousand hertz? Pause, and read the answers off the graph.
At eleven fifty the red line stands at decibels. Our tone is at . It is hidden, with decibels to spare. At three thousand the line has fallen to , and the tone is heard easily. The masker raises detection thresholds near its frequency; this temporary masking is not the same as hearing damage.
Do not take the graph's word for it. You will hear a quiet tone that pulses on and off. First alone. Then again, exactly as strong, with the loud tone sounding beside it. Then moved far above the loud tone. In which of the three can you hear the pulsing?
Alone, it is perfectly clear. Beside the loud tone it vanishes, although in the computed clip it is exactly as strong as before. Far above the loud tone, it is back. One correction to our model, from real ears. Its red curve is nearly the same on both sides. Measured masking is lopsided: a loud tone hides more above itself than below, and more so the louder it gets. The travelling wave says why. On its way to its own place, the wave of a low tone has to pass through every high-frequency place on the membrane, and it shakes them as it goes. A high tone's wave never reaches the low-frequency places at all. So low sounds mask high sounds much more than the other way round.
Masking is why this chapter matters to people who will never study an ear. A music file on your phone is about a tenth the size of the recording it was made from. The encoder works out this masking curve many times a second, and spends no bits at all on anything that falls beneath it. Nine tenths of the data are thrown away, and you do not notice, because you could not have heard them. A mixing engineer fights masking all day: the bass guitar hides the kick drum, so a notch is cut in one to make room for the other. An orchestrator knows that a flute in its low register vanishes beneath the horns, and an octave higher sails over them. And when an ear is damaged, its filters grow wider, so that everything masks everything. That is why the first complaint of hearing loss is not that sounds are too quiet. It is that a voice can no longer be picked out of a noisy room.
6A second clockFoundations4 min
Is place the ear's only way of measuring frequency?
So far the ear is a row of filters, and a frequency is a place. But the nerve carries a second message, and it was found by accident. Here is the membrane at one place, moving up and down two hundred and fifty times a second. A hair cell is not a symmetrical device. Its hairs open their channels when they are bent one way, and close them when bent the other. So the cell passes on only half of each cycle: a pulse for every crest of the wave, and nothing for the troughs. Now the nerve fibres. A single fibre does not usually mark every cycle reliably. It fires on some cycles and skips others. But when it does fire, it fires near the crest. Look down any of these lines. No one fibre marks every cycle, but ten fibres together mark every one of them. The wave's period is written in the timing of the spikes. In 1930 Ernest Wever and Charles Bray put a wire on a cat's auditory nerve and connected it to a loudspeaker in another room. What came out of the loudspeaker was the speech going into the cat's ear. Much of that signal turned out to come from the hair cells themselves, but it started the search, and the nerve's volleys were found soon after.
Does this work at every frequency? Take every spike from many fibres and ask where in the wave's cycle it fell. At two hundred and fifty hertz the spikes pile up in one part of the cycle. At a thousand, the pile is broader. At four thousand it is almost flat: the spikes come at any moment, and their timing says nothing. The reason is electrical. A hair cell cannot change its voltage much faster than about a thousand times a second, so above that, the crests blur into one another. This is Monochord's model. On a scale from nought to one, its timing scores at two hundred and fifty hertz, at a thousand, and at four thousand. Recordings from single fibres in cats and monkeys have the same shape: strong below a thousand hertz, fading, and gone by about five thousand. In humans it has never been measured directly, and the exact limit is still argued over. But the shape is not in doubt. The ear has a clock, and the clock stops.
Why would the ear need a second way to measure frequency? Try this. Two pairs of tones, both near a thousand hertz. In each pair the second tone is slightly different from the first. Does it go up, or down?
In A the second tone went up, by ten hertz. In B it went down, by three. If you caught B, think about what you just did. A practised listener can tell a thousand hertz from a thousand and two: a thirtieth of a semitone. But the filter that those tones pass through is hertz wide. The ear is measuring times more finely than its own ruler. There are two ways it could do that. It could compare how strongly neighbouring places respond: a tiny shift of a broad hump is still a shift. Or it could read the timing of the spikes, where a thousand hertz and a thousand and two differ by two millionths of a second in every cycle. The evidence says it does both, and that timing matters most. For many tasks frequency discrimination worsens in the high-frequency region where temporal fine-structure cues weaken; this does not establish a single exact neural cutoff. And something else goes with it, as you will hear in chapter eight.
7The pitch that is not thereFoundations7 min
What do you hear when a note's fundamental is missing?
Now we can go back to the puzzle that ended Part 3, and listen to it properly. One note, a low C, four ways. First with its first eight partials. Second, with the lowest three removed, so that nothing is left at the note's own frequency. Third, the same again, with a band of low noise added where the missing partials were. Fourth, the lowest partial alone. Listen to the pitch. Do the second and third stay with the first and the fourth, or do they jump up?
They stay. All four have the same pitch, the low C. The second and third sound thinner, more nasal, but not higher. And yet in the second sound the level at the note's own frequency is decibels below its partials. For every practical purpose there is nothing there. You are hearing the pitch of a frequency that is absent.
Helmholtz had an answer, and it is a good one. The ear distorts. When partials four and five arrive together, they beat, and a distorting ear turns that beat into a new tone at the difference of their frequencies, which is exactly the missing fundamental. The tone you heard under the two tones at the start of this part is that very thing. So perhaps the ear simply puts the fundamental back. There is a way to check, and you have just taken part in it. If a real tone were being created at the fundamental, then noise at that frequency would mask it, as in chapter five. Sound three had that noise. The pitch survived. So the low pitch is not a tone at the fundamental, anywhere: not in the air, and not on the membrane. In 1940 the Dutch physicist Jan Schouten gave it a name. The pitch comes from the upper partials themselves, taken together. He called it the residue. Seebeck had been right about his siren a century earlier, and Ohm, and Helmholtz, had been wrong.
What could do that? The second clock. In 1951 Joseph Licklider proposed a machine. Take each band of the ear, and compare the nerve's firing there with a delayed copy of itself. Slide the delay, and look for the delay at which the pattern lines up with itself again. Then add up the answers from all the bands. Monochord has that machine. Give it the lowest partial alone: a pure tone repeats after one period, and the curve peaks at milliseconds. Give it all eight partials. Each band has its own faster rhythm, but they all come back into step at the same delay. Now give it partials four to eight only. The fourth partial repeats four times in that interval, the fifth five times, the sixth six. The first moment at which every one of them is back where it started is still milliseconds. The machine reports , and hertz. The same pitch, three times. It never looked for energy at the fundamental. It looked for the period.
A worked example. A sound has just three partials: six hundred, eight hundred and a thousand hertz. What pitch do you hear? Pause and decide.
Think in time. Six hundred hertz repeats three times in five milliseconds, eight hundred repeats four times, a thousand repeats five times. Five milliseconds is the shortest time in which all three come round together. So the pitch is two hundred hertz: the largest frequency that divides all three. These are the third, fourth and fifth partials of a note whose first and second are not there. The ear does arithmetic, and the operation is the greatest common divisor.
That was easy, because the partials were exact multiples of something. Schouten asked the awkward question: what if they are not? Take five partials, eight hundred to sixteen hundred hertz, two hundred apart. Their pitch is two hundred. Now slide all five up by thirty hertz. They are still two hundred hertz apart, and the wave still swells and fades two hundred times a second. But they are no longer multiples of two hundred, or of any frequency near it. Does the pitch change?
It does. It goes up, by a little under a quarter of a tone. So the pitch is not the spacing of the partials, and it is not the rate at which the wave beats, because neither of those moved. What the ear seems to do is ask: of what note could these be the fourth, fifth, sixth, seventh and eighth partials? Divide each by its number. The answers do not agree exactly, since no such note exists, but they cluster near two hundred and five. Listeners in Schouten's laboratory matched it at about that. Monochord's model, which was told nothing about this experiment, says hertz. Pitch is not a property of the sound. It is the ear's best guess at the period of whatever made it.
You rely on this every day. A telephone line carries nothing below three hundred hertz. A man's voice has its fundamental near a hundred and ten. You hear the pitch of his voice anyway, from the partials that do get through. The loudspeaker in a phone cannot produce sixty hertz, and you still follow the bass line. Organ builders have used it for three centuries: sound two pipes a fifth apart, the second and third partials of a note an octave below, and the listener hears the deep note of a pipe too long to fit in the building. And a chord is a set of partials too. The low note that the ear supplies beneath a chord is what musicians call its root. That idea will organise the whole of harmony, and it starts in the next part.
8Where pitch stopsFoundations2 min
Is there a highest note?
If pitch depends on the timing of the nerve, and the timing fails above a few thousand hertz, then something should happen to music up there. Here is the opening of the Tune in pure tones, starting an octave above middle C. Then the same phrase again, more than three octaves higher, where every note is above five thousand hertz. Is the second one still a tune?
For most people it is not. You can tell that the high tones move, and roughly whether they go up or down. But musical interval judgments often become much less reliable, with substantial listener and task differences. Some listeners hear squeaks rather than a clear melody. In 1971 Fred Attneave and Richard Olson measured this. They asked listeners to transpose a jingle they knew well. Up to about five thousand hertz, people did it easily. Above that, their answers scattered. The sense of musical pitch, the thing that makes an octave an octave, has an upper edge.
Monochord's timing model agrees. Give it pure tones and ask how strongly it hears a pitch. At two hundred and fifty hertz, . At a thousand, . At four thousand, : almost nothing. Now lay the piano underneath. Its lowest note is twenty-seven and a half hertz. Its highest, the top C, is . Instrument makers had never heard of nerve fibres. The piano illustrates a common melodic register, but its historical range is not proof of a neural cutoff, and instruments can produce higher fundamentals. Hearing continues above that range, where upper partials add brightness, breath and consonants. Place cues still support high-frequency discrimination. The falling curve is this timing model's limitation, not a universal boundary between notes and noise.
9Two kinds of highFoundations3 min
Can a scale rise for ever?
One more experiment on pitch, and it is the strangest. In 1964 Roger Shepard, at Bell Laboratories, built a set of twelve tones on a computer. Played in order they make a rising scale. Listen to twenty-four steps of it, and decide: is the last tone higher than the first?
Many listeners hear a rise at each step: an apparently endless ascent. And yet the last tone is not higher than the first. It is the first: the same waveform, sample for sample. So is the thirteenth. The scale climbed two octaves and arrived exactly where it started, twice.
Here is the trick. Each of Shepard's tones is made of partials exactly an octave apart, right across the range of hearing, and their strengths follow a fixed bell-shaped curve: strong in the middle, fading to nothing at the top and the bottom. To step up, every partial slides to the right together. The ones near the top fade out as they go. New ones fade in at the bottom, too quietly to notice. After twelve steps each partial has moved one octave, and stands exactly where its neighbour stood. The picture is the one we started with.
What Shepard had done was to pull apart two things that normally travel together. One is which note of the twelve a tone is: its position round a circle. Psychologists call it chroma. The other is simply how high the tone is: its height. An ordinary scale changes both at once. It goes round the circle, and it climbs, so that after twelve steps it is back above where it started: a spiral. Shepard's tones contain every octave at once, so they have a chroma but no particular height. They can only go round. And this tells us something about the ear. Two tones an octave apart are judged the same in a way that no other pair is. Why the octave? Because every partial of the upper note is already a partial of the lower one: the upper note adds nothing new. That is the first fact of harmony, and it is where Part 5 begins. Composers, meanwhile, use Shepard's staircase whenever they want tension that climbs and climbs, and never arrives.
10The only pair you getPractice4 min
How much sound is too much?
This chapter has no sound in it, and that is the point. Everything you have heard in this series reached you through about inner hair cells in each ear. A phone camera has millions of sensors. You have a few thousand, and they have to last a lifetime. In birds and in fish, a hair cell that dies is replaced. In mammals it is not. You were born with all the hair cells you will ever have. And noise can injure hair cells and their nerve connections; outer hair cells are particularly vulnerable. A common audiogram pattern is a notch between three and six kilohertz, often deepest near four. Ear-canal resonance and cochlear mechanics contribute, but not every exposed ear has this pattern, and a notch alone is not a diagnosis. Here is a schematic example: thresholds are raised near four kilohertz, with partial recovery at higher frequencies.
How much is too much? NIOSH's 1998 occupational recommendation uses a simple energy-based criterion. It reduces risk; it is not a guarantee against damage or the same as the US legal OSHA limit. Eighty-five decibels, A-weighted, is the criterion for eight hours a day. That is about the level of heavy traffic. For every three decibels above that, the time is halved. Three decibels is twice the power, so the rule says that what matters is the total energy delivered to the ear. Eighty-eight decibels for four hours. Ninety-one for two. Ninety-four for one. Now you do one. A club, or the front of a rock concert, runs at about a hundred decibels. What duration reaches the NIOSH daily criterion?
A hundred is fifteen decibels above eighty-five. Fifteen is five lots of three, so the time is halved five times: eight hours divided by thirty-two. Fifteen minutes. Not a whole evening: fifteen minutes. And it keeps going. At a hundred and six decibels, under four minutes. At a hundred and twelve, less than one. Now run it backwards. A pair of earplugs that takes twenty decibels off turns a hundred into eighty. Every three decibels doubles the time, so twenty decibels multiplies it by about . That calculation assumes the plugs actually provide twenty decibels of attenuation in your ears. Fit and frequency matter; a package rating does not establish a safe duration.
Musicians are not exempt; they are the most exposed. Players in the middle of an orchestra are often above eighty-five decibels for hours, and a violinist's left ear sits a hand's width from the instrument. So, four habits. Distance: for an isolated point source in the open, twice as far is about six decibels less. Rooms and loudspeaker arrays can differ; in that approximation, the equal-dose duration increases fourfold. Plugs: the ones made for musicians lower every frequency by about the same amount, so the music still sounds like music, only quieter. Time: the dose adds up over the whole day, and the headphones on the journey home count too. And one warning sign. If your ears ring after a concert, or the world sounds dull, the dose was too large. The ringing usually fades. In the last chapter you will see why that is not the same as no harm done. The World Health Organization estimates that more than a billion young people are at risk of hearing loss from the way they listen. Everything else in this series depends on your not being one of them.
11Frontier: the ear is aliveResearch7 min
What is the amplifier, and what does it cost?
We left two mysteries open. Twelve thousand outer hair cells that tell the brain almost nothing. And Gold's argument that a passive ear cannot be as sharp as ours. They are the same mystery. Here is our model's wave for a tone of two thousand hertz, with larger damping as a passive surrogate: low and broad. Cut the friction to a quarter, and the same tone gives a peak decibels taller and twice as sharp. This illustrates active-like sharpening; it is not a complete living-ear model. In 1971 William Rhode measured the membrane in living squirrel monkeys and found it sharply tuned, and, strangely, not proportional to the sound: double the pressure, and the motion less than doubled. When the animal died, the response turned into Békésy's. Something alive was cancelling the friction. In 1985 William Brownell found what. An outer hair cell changes its length when its voltage changes. It is a motor, fast enough to push on the membrane in time with the wave. In 2000 the protein that does it was found and named prestin. The outer hair cells do not report the sound. They amplify it.
How much should an amplifier like that amplify? Think of a microphone held near its own loudspeaker. Turn up the gain, and just before the howl begins the system becomes extraordinarily sensitive. An amplifier that exactly cancels friction sits on that edge, and in the year 2000 two groups of physicists pointed out that a resonantly driven supercritical Hopf model with cubic saturation has a characteristic scaling law. At its own frequency, its response grows not in proportion to the force, but as the cube root of it. Here is what that means. A passive membrane turns a hundred decibels of input into a hundred decibels of motion. An oscillator at the edge turns it into . Faint sounds are amplified enormously, loud ones hardly at all. This is the machine we were looking for in chapter four: the one that compresses a large input range mechanically. This is one contribution to the ear's wide operating range; neural processing also shapes perceived loudness.
The amplifier has a price, and you can hear it. An amplifier that responds as a cube root cannot handle two tones at once without mixing them. It is time to keep the promise made at the start. First you will hear a quiet guide tone at eight hundred hertz, so that you know what to listen for. Then the two tones again, a thousand and twelve hundred. Listen underneath them. Then the guide once more.
With the guide, some listeners find it: a faint tone at the guide's pitch, under the two. Twice the lower frequency, minus the upper one, is eight hundred hertz. That tone is decibels down in the computed clip, which is to say it is not there. But give the same two tones to an oscillator poised at the edge, tuned to eight hundred hertz, and it produces that tone only decibels below them. The ear makes it, on the membrane, as a real vibration. The violinist Giuseppe Tartini described it in 1754. He called it the third sound, and taught his pupils to listen for it when tuning two strings together. And because it is a real vibration, it travels back out through the middle ear and can be picked up with a microphone in the ear canal. That is now how the hearing of newborn babies is tested, a day or two after birth: two tones in, and if the third comes back, outer-hair-cell function is supported. Such a screen does not exclude every kind of hearing loss.
Put the list together. An amplifier at the edge of oscillation is extremely sensitive to faint sounds, sharply tuned, and compresses a huge range of levels. Those are its benefits. It adds tones of its own when it is given two. It keeps ringing after a click, which is Kemp's echo. And every so often, a patch of it tips over the edge and sings by itself. Many healthy ears give out a faint steady tone that a microphone in the ear canal can record. Gold predicted it in 1948. He was thirty years early, and he was right about all of it.
And here the textbook ends. Four things that are not known. First. In 2009 Sharon Kujawa and Charles Liberman exposed mice to noise that dulled their hearing for a few days, after which it tested as normal again. But inside the cochlea, up to half of the connections between the hair cells and the nerve had gone, for good. A standard hearing test cannot see that loss. Nobody yet knows how much of it people carry, and it may be why the ringing after a concert is not harmless. Second: the amplifier itself. New optical methods can watch the parts of a living cochlea move, and they move in ways that no current model predicts. Third. More than a million people now hear through cochlear implants, which replace hair cells with about twenty electrodes. Speech comes through remarkably well. Melody mostly does not, for exactly the reasons in this part: twenty places are too few, and the implant's pulses carry almost none of the timing. Giving music back to implant users is an open problem. Fourth: growing hair cells back. Birds do it. We do not. But in 2024 a gene therapy gave hearing to children who were born deaf for lack of a single protein. That is one cause among hundreds, and it is a beginning.
Variation 4, recap and problemsAll tracks4 min
Every part ends by doing something to the Tune with what it has built. This part built a listener, so the Variation is made of things that only a listener can supply. For the first four phrases, every note has its third, fourth, fifth and sixth partials, and nothing else. There is no energy at the note, and none at its octave. The dial shows which note is meant. Then, for the last two phrases, the notes become Shepard's tones: every octave at once, so that the Tune has its notes, but no height at all.
Row four of the ledger. seconds. We gave each of the first four phrases' notes to Monochord's pitch model, and it placed every missing fundamental within a cent of the note that was meant, although the strongest thing at that frequency was decibels down. You heard a tune that, in the usual sense, was not played.
What did we find? The middle ear is a transformer that matches air to fluid. In the cochlea a travelling wave sorts frequency by place, and equal ratios of frequency are equal distances. The ear's filters are a little over a whole tone wide, wider in the bass, and a loud sound hides its neighbours. Loudness is compressed: ten times the power is roughly twice as loud for similar spectra at moderate and higher levels. Pitch uses both place and timing information. A harmonic complex can keep its pitch without the fundamental, while musical interval judgments often weaken at high frequencies. And the living cochlea is an amplifier: sharp, compressive, and noisy enough to make tones of its 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? Critical bands and roughness are the whole foundation of Part 5, on consonance, and of tuning after it. The pitch that the ear supplies becomes the root of a chord. Masking returns when we orchestrate, when we mix, and when we compress audio for the ear. Loudness returns in mastering. And when we build machines that listen, they will find pitch the way this part's model does, and represent notes by their chroma.
And in practice. An audiologist reads the ear's own emissions, and fits hearing aids that compress sound the way the lost amplifier did. A codec engineer lets a model of masking decide where every bit is spent. A mixing engineer knows that a mix balanced at high volume sounds thin when played quietly, because the ear's sensitivity to bass depends on level. And designers of small loudspeakers imply bass notes with partials, and let the listener supply the rest.
The books and papers this part follows. The full list, with notes, is in the README.
One last sound. Two strings sounding together, twice. The first time their lengths are as two to three. The second time, as thirty-two to forty-five.
The first pair is smooth. The second is rough. Pythagoras would say: small numbers, large numbers. But numbers do not make sounds rough. Ears do, and now you know how: partials that fall inside one band of the cochlea. With a string, a spectrum and an ear, we can finally ask the oldest question in music, and compute the answer. Why do some notes belong together? That is Part 5: Consonance.
Where it goes next. Critical bands, beats and roughness are the foundation of consonance (Part 5) and tuning (Part 6). The pitch the ear supplies becomes the root of a chord (Part 13). Masking returns in orchestration (Part 41), mixing (Part 56) and audio coding (Part 58); phons, sones and weighting in mastering (Part 57). The autocorrelation pitch model is the starting point of transcription (Part 61), and chroma the representation of Part 62.
Key results
The part's results in one place, for revision.
Try it
Lab 4 · A listener in numbers: the middle ear, critical bands, the missing fundamental
Compute the middle ear's gain, find which partials of a note the ear resolves, give Monochord's pitch model a note with no fundamental and a note whose partials have been shifted, and work out a safe listening time.
python -m videos.music.labs 4
needs numpy, scipy, matplotlib · download lab04.py ·
source on GitHubmiddle ear: pressure gain 22.3 times = 27.0 dB
power reaching the fluid 1.1% without it, 27% with it
ear canal's resonance 3530 Hz
band of the ear at 300 Hz 57 Hz wide
partials resolved the first 8
partials 900, 1200, 1500 Hz
level at the fundamental -179 dB
the model's pitch 300.0 Hz (salience 0.46)
all partials moved up 50 Hz 313.1 Hz: up by 74 cents
safe time at 103 dBA 7.5 minutes
with 15 dB earplugs 4.0 hours (32 times as long)
ear problem (listen first) the complex; a pure tone at the fundamental; a pure tone an octave above it; the complex; the complex moved
The pitch model finds the fundamental although the sound has no energy there, and when every partial is moved by the same number of hertz it follows the listeners, not the spacing of the partials.
The code (105 lines; it asserts its own result)
"""Lab 4: the ear's transformer, its filters, a pitch that is not in the sound, and a safe dose."""
import math
import numpy as np
from videos.coursekit import labs
from explainer.music.monochord import Clip, concat
from explainer.music.monochord import ear
TITLE = "A listener in numbers: the middle ear, critical bands, the missing fundamental"
GOAL = ("Compute the middle ear's gain, find which partials of a note the ear resolves, give Monochord's pitch model "
"a note with no fundamental and a note whose partials have been shifted, and work out a safe listening time.")
TASKS = [
"Set F0 to 65 Hz, then to 520 Hz. How many partials are resolved? Why do close chords sound muddy in the bass?",
"Set LOWEST to 8, then 12 (only high, unresolved partials). What happens to the model's salience?",
"Set SHIFT to 100 Hz (half the spacing of a 200 Hz note). The model's answer jumps: why are there two candidates?",
]
F0 = 300.0 # the note
LOWEST = 3 # the lowest partial present
COUNT = 3 # how many partials
SHIFT = 50.0 # every partial moved up by this many hertz
LEVEL = 103.0 # a concert, in dBA
PLUG = 15.0 # what the earplugs take off, in dB
SR = 48_000
def complex_tone(freqs, seconds=0.4):
t = np.arange(int(seconds * SR)) / SR
return sum(np.sin(2 * np.pi * f * t) for f in freqs)
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
# 1. the middle ear
m = ear.middle_ear()
lab.row("middle ear: pressure gain", f"{m['pressure_gain']:.1f} times = {m['gain_db']:.1f} dB")
lab.row("power reaching the fluid", f"{100 * m['without']:.1f}% without it, {100 * m['with']:.0f}% with it")
lab.row("ear canal's resonance", f"{ear.canal_resonance():.0f} Hz")
assert abs(m["gain_db"] - 20 * math.log10(m["area_ratio"] * m["lever"])) < 1e-9
# 2. which partials are resolved
k = 1
while float(ear.erb(k * F0)) < F0 and k < 60:
k += 1
lab.row(f"band of the ear at {F0:.0f} Hz", f"{float(ear.erb(F0)):.0f} Hz wide")
lab.row("partials resolved", f"the first {k - 1}")
assert 4 <= k - 1 <= 9
# 3. a pitch that is not there, and one that moves
partials = [F0 * n for n in range(LOWEST, LOWEST + COUNT)]
moved = [f + SHIFT for f in partials]
p_plain, s_plain = ear.pitch(complex_tone(partials), SR, lo=F0 / 2.5, hi=F0 * 2.7)
p_moved, _ = ear.pitch(complex_tone(moved), SR, lo=F0 / 2.5, hi=F0 * 2.7)
spec = np.abs(np.fft.rfft(complex_tone(partials) * np.hanning(int(0.4 * SR))))
fr = np.fft.rfftfreq(int(0.4 * SR), 1 / SR)
at_f0 = 20 * math.log10(max(spec[np.abs(fr - F0) < 10].max(), 1e-12) / spec.max())
lab.row("partials", ", ".join(f"{f:.0f}" for f in partials) + " Hz")
lab.row("level at the fundamental", f"{at_f0:.0f} dB")
lab.row("the model's pitch", f"{p_plain:.1f} Hz (salience {s_plain:.2f})")
lab.row(f"all partials moved up {SHIFT:.0f} Hz", f"{p_moved:.1f} Hz: " + ("up" if p_moved > p_plain else "down")
+ f" by {1200 * math.log2(p_moved / p_plain):.0f} cents")
if LOWEST <= 6 and SHIFT < F0 / 3:
assert abs(1200 * math.log2(p_plain / F0)) < 5, "the missing fundamental is found"
centre = LOWEST + (COUNT - 1) / 2
assert abs(p_moved - (F0 + SHIFT / centre)) < 0.02 * F0, "the shift is the centre partial's share"
# 4. a safe dose
bare, plugged = ear.safe_hours(LEVEL), ear.safe_hours(LEVEL - PLUG)
lab.row(f"safe time at {LEVEL:.0f} dBA", f"{60 * bare:.1f} minutes")
lab.row(f"with {PLUG:.0f} dB earplugs", f"{plugged:.1f} hours ({plugged / bare:.0f} times as long)")
assert abs(plugged / bare - 2 ** (PLUG / 3)) < 1e-9
# the ear problem (Problem 3): the complex, a pure tone at the fundamental, one an octave above, the moved complex
def clip(y):
return Clip(y).fade(0.02, 0.08).at_level(-19.0)
order = rng.permutation(2)
pures = [("a pure tone at the fundamental", [F0]), ("a pure tone an octave above it", [2 * F0])]
seq = [clip(complex_tone(partials, 1.2))] + [clip(complex_tone(pures[j][1], 1.2)) for j in order] + [clip(complex_tone(partials, 1.0)), clip(complex_tone(moved, 1.0))]
lab.audio = concat(seq, gap=0.4)
lab.row("ear problem (listen first)", f"the complex; {pures[order[0]][0]}; {pures[order[1]][0]}; the complex; the complex moved")
fig, (a, b) = labs.figure(2)
f = np.geomspace(100, 12000, 300)
a.semilogx(f, ear.threshold_db(f), color=labs.BLUE, lw=1.6, label="threshold in quiet")
a.semilogx(f, ear.masked_threshold(1000.0, 70.0, f), color=labs.RED, lw=1.6, label="beside a 1 kHz tone at 70 dB")
a.set_title("What a loud tone hides")
a.set_xlabel("frequency (Hz)")
a.set_ylabel("level needed to be heard (dB)")
a.legend()
for freqs, col, name in ((partials, labs.GOLD, "partials as given"), (moved, labs.RED, f"moved up {SHIFT:.0f} Hz")):
lags, s = ear.summary_acf(complex_tone(freqs), SR, max_lag=2.5 / F0)
b.plot(1000 * lags, s, color=col, lw=1.4, label=name)
b.axvline(1000 / F0, color=labs.BLUE, ls="--", lw=1.0, label=f"1/{F0:.0f} s")
b.set_title("The pitch model: where the nerve's pattern repeats")
b.set_xlabel("delay (ms)")
b.set_ylabel("summary autocorrelation")
b.legend()
lab.fig = fig
lab.note = ("The pitch model finds the fundamental although the sound has no energy there, and when every partial "
"is moved by the same number of hertz it follows the listeners, not the spacing of the partials.")
return lab
Now change it
- Set F0 to 65 Hz, then to 520 Hz. How many partials are resolved? Why do close chords sound muddy in the bass?
- Set LOWEST to 8, then 12 (only high, unresolved partials). What happens to the model's salience?
- Set SHIFT to 100 Hz (half the spacing of a 200 Hz note). The model's answer jumps: why are there two candidates?
Problems, with solutions
Try each problem before opening its solution.
-
A concert. A concert measures 103 dBA where you stand. What duration reaches the NIOSH daily exposure criterion? You put in earplugs with actual fitted attenuation of 15 dB: how long now, and by what factor did the time grow?
Solution
103 is 18 dB above 85, which is six steps of 3 dB, so the eight hours are halved six times: 8 h / 64 = 7.5 minutes. With the plugs the level at the ear is 88 dBA, one step above 85: 4 hours. The factor is 2^(15/3) = 32. (The lab computes both.) These are equal-dose calculations under the NIOSH recommendation, not guarantees of safety.
-
The edge. An amplifier's response is proportional to the cube root of the force. Show that 100 dB of input becomes 33 dB of output, and that its gain rises by 20 dB for every 30 dB that the sound falls.
Solution
If x = k F^(1/3) then 20 log x = 20 log k + (1/3) · 20 log F: every decibel of input gives a third of a decibel of output, so 100 dB becomes 33.3 dB. The gain is x/F = k F^(−2/3), or in decibels 20 log k − (2/3) · 20 log F: lower the input by 30 dB and the gain rises by 20 dB. A sound 90 dB weaker than another is amplified 60 dB more, which is the order of the cochlear amplifier's gain for the faintest sounds.
-
Ear. The lab (
python -m videos.music.labs 4) plays a sound with partials at 900, 1200 and 1500 Hz, then pure tones at 300 and at 600 Hz in an order it prints afterwards. Which pure tone has its pitch? Then the three partials are moved up 50 Hz: does the pitch rise or fall?Solution
The partials are the third, fourth and fifth of 300 Hz, the largest frequency that divides all three, and the pure tone at 300 Hz matches. (Some listeners match the octave above, 600 Hz; the pitch of a residue is less definite than that of a full tone, and octave errors are the commonest.) Moved up 50 Hz the partials are 950, 1250 and 1550 Hz: no longer harmonics of anything near 300, but closest to the third, fourth and fifth partials of 1250/4 = 312.5 Hz. The pitch rises, by about 70 cents; Monochord's model says 313.1 Hz.
-
Build. Run
ear.pitchon every note of Variation 4 and plot its errors. Then lower the model's limit on nerve timing (corner) from 1200 Hz to 600 Hz, and to 300 Hz. Which notes does it lose first?Solution
Solution sketch. The notes and their frequencies are in
load("tune")["checks"]; each is partials 3 to 6 of its fundamental, andear.pitch(y, sr, lo=100, hi=700, corner=...)takes the cutoff. With the standard 1200 Hz every note comes out within a fraction of a cent, with a salience between 0.28 and 0.56. At 600 Hz the model still finds the two lowest notes, C and D (partials from 785 Hz), with a salience below 0.2, and loses E, F, G and A, whose partials start above 980 Hz: the summary's peak at the period has sunk beneath a neighbouring ripple and the answer is about 660 cents off. At 300 Hz it loses all six, and no peak stands more than 0.04 above the floor. That is the experiment of chapter 8 run on the model: the higher the partials, the more the pitch depends on the clock, and without the clock there is no pitch to find. -
★ Research. Build a cochlear-implant simulator: a bank of N bands, each replaced by noise with the band's envelope. How many bands does Monochord's pitch model need to follow the Tune? What does that predict for implant users?
Pointers. This is the noise vocoder of Shannon et al. (1995), who showed that speech survives with four bands. Pitch does not: with the fine timing replaced by noise, the autocorrelation model has only the envelope's periodicity, which is weak above about 300 Hz, and place cues as coarse as the bands. Compare your curve with melody recognition in implant users (McDermott, 2004; Limb and Roy, 2014). Open questions: whether coding the timing of low partials on a few electrodes (fine-structure strategies), or current steering between electrodes, restores a usable pitch, and how to measure it without relying on rhythm.
Notes and sources
Sources
Books: B. C. J. Moore, An Introduction to the Psychology of Hearing (6th ed., 2012); C. J. Plack, The Sense of Hearing (3rd ed., 2018); J. O. Pickles, An Introduction to the Physiology of Hearing (4th ed., 2012), for the anatomy (eardrum about 55 mm² effective, stapes footplate 3.2 mm², lever 1.3; about 3,500 inner and 12,000 outer hair cells; about 30,000 nerve fibres); W. M. Hartmann, Signals, Sound, and Sensation (1997); G. von Békésy, Experiments in Hearing (1960).
Papers: H. von Helmholtz, On the Sensations of Tone (1863); G. Tartini, Trattato di musica (1754), for the third sound; A. Seebeck, Annalen der Physik 53 (1841); E. G. Wever and C. W. Bray, "Action currents in the auditory nerve in response to acoustical stimulation", PNAS 16 (1930); H. Fletcher and W. A. Munson, "Loudness, its definition, measurement and calculation", JASA 5 (1933); S. S. Stevens, "A scale for the measurement of a psychological magnitude: loudness", Psychological Review 43 (1936); H. Fletcher, "Auditory patterns", Reviews of Modern Physics 12 (1940); J. F. Schouten, "The residue, a new component in subjective sound analysis", Proc. KNAW 43 (1940); T. Gold, "Hearing. II. The physical basis of the action of the cochlea", Proc. R. Soc. B 135 (1948); J. C. R. Licklider, "A duplex theory of pitch perception", Experientia 7 (1951), and "'Periodicity' pitch and 'place' pitch", JASA 26 (1954); R. N. Shepard, "Circularity in judgments of relative pitch", JASA 36 (1964); J. E. Rose et al., "Phase-locked response to low-frequency tones in single auditory nerve fibers of the squirrel monkey", J. Neurophysiol. 30 (1967); F. Attneave and R. K. Olson, "Pitch as a medium", American Journal of Psychology 84 (1971); W. S. Rhode, "Observations of the vibration of the basilar membrane in squirrel monkeys using the Mössbauer technique", JASA 49 (1971); D. T. Kemp, "Stimulated acoustic emissions from within the human auditory system", JASA 64 (1978); D. H. Johnson, "The relationship between spike rate and synchrony in responses of auditory-nerve fibers to single tones", JASA 68 (1980); W. E. Brownell et al., "Evoked mechanical responses of isolated cochlear outer hair cells", Science 227 (1985); D. D. Greenwood, "A cochlear frequency-position function for several species: 29 years later", JASA 87 (1990); B. R. Glasberg and B. C. J. Moore, "Derivation of auditory filter shapes from notched-noise data", Hearing Research 47 (1990); E. Terhardt, "Calculating virtual pitch", Hearing Research 1 (1979), for the threshold formula; J. Zheng et al., "Prestin is the motor protein of cochlear outer hair cells", Nature 405 (2000); S. Camalet, T. Duke, F. Jülicher and J. Prost, "Auditory sensitivity provided by self-tuned critical oscillations of hair cells", PNAS 97 (2000); V. M. Eguíluz et al., "Essential nonlinearities in hearing", PRL 84 (2000); S. G. Kujawa and M. C. Liberman, "Adding insult to injury: cochlear nerve degeneration after 'temporary' noise-induced hearing loss", J. Neurosci. 29 (2009); F.-G. Zeng, "Celebrating the one millionth cochlear implant", JASA Express Letters 2 (2022); J. Lv et al., "AAV1-hOTOF gene therapy for autosomal recessive deafness 9", The Lancet 403 (2024).
Standards and reports: NIOSH, Criteria for a Recommended Standard: Occupational Noise Exposure (1998); ISO 226 (equal-loudness contours); IEC 61672 (the A weighting); World Health Organization, World Report on Hearing (2021) and its "Make Listening Safe" initiative, for the estimate of over a billion young people at risk.
- E. Zwicker and H. Fastl, Psychoacoustics: Facts and Models (3rd ed., 2007): the critical bands as the Bark scale (Zwicker, "Subdivision of the audible frequency range into critical bands", JASA 33, 1961), and loudness in sones; G. T. Fechner, Elemente der Psychophysik (1860), the logarithmic law that Stevens's power law replaced.
About this partfrom its README
Part 4 of a sixty-eight-part course in music (see the series plan and
the syllabus). Parts 1 to 3 built a string, the air that carries its sound and the spectrum that
takes the sound apart, and ended with a tone that keeps its pitch although it has no energy at its fundamental. A
spectrum describes the air; this part opens the instrument that listens to it. Every model in it is Monochord's own
(explainer/music/monochord/ear.py: about four hundred lines), checked against published measurements of real
ears; every sound is computed in compute.py. Dates and attributions are the published ones, listed under Sources.
- The ear that sings. Two pure tones, 1000 and 1200 Hz, and the third tone at 800 Hz that many listeners hear beneath them, which is absent from the synthesized clip (playback equipment can also distort) (183 dB down); Kemp's microphone in an ear canal (1978); Gold's amplifier (1948) against Békésy's passive wave (Nobel Prize, 1961; his cochleas came from cadavers); the plan.
- 1. From air to water. The path of a sound; the mismatch between air and the cochlea's fluid (1.1% of the power would get in); a worked example, the middle ear as a transformer (area ratio 17, lever 1.3: pressure × 22, 27 dB; 1% → 27% in the simplified resistive-load model); the ear canal as Part 2's stopped pipe (2.5 cm: about 3,500 Hz), and the threshold approximation, lowest near the canal resonance.
- 2. A wave that sorts. The cochlea unrolled; Helmholtz's harp and what Békésy saw (from 1928); the travelling wave in Monochord's cochlea, and why it stops; seven tones an octave apart, each peak 4.6 mm from the last; a worked example (where does 3000 Hz peak?); the model's map against Greenwood's; inner and outer hair cells.
- 3. How fine is the ruler? Two tones on one stretch of membrane; Fletcher's band-widening experiment (1940) run on the model (a band of 133 Hz at 1 kHz); the ERB formula; a worked example (133 Hz at 1 kHz is 2.3 semitones; 3.6 at 250 Hz); an ear question (beats, roughness, two tones); the Tune's opening as a cochleagram; resolved and unresolved partials (the first eight).
- 4. How loud is loud? A tone sliding from 100 Hz to 10 kHz at constant digital rms (playback pressure is not calibrated); the threshold of hearing; an ear question (three tones of one pressure); phons (Fletcher and Munson, 1933) and the A weighting; sones (Stevens, 1936): for similar spectra at moderate and higher levels, ten times the power is roughly twice as loud, so ten violins are twice as loud as one; a worked example (sixteen first violins: 12 dB, 2.3 times as loud); the 40-to-80-phon range as four modeled doublings (1 to 16 sones), without extrapolating to threshold.
- 5. What a loud sound hides. The power-spectrum model of masking; what a 1 kHz tone at 70 dB hides (a worked example, read off the graph); an ear question (a pulsing tone alone, beside the loud tone, far above it); why masking spreads upwards; codecs, mixing, orchestration, hearing loss.
- 6. A second clock. Hair cells pass on half of each cycle; ten fibres mark every crest between them (the volley idea; Wever and Bray, 1930); where in the cycle the spikes fall at 250, 1000 and 4000 Hz; the animal-inspired model's timing fidelity falls with frequency; the human upper limit remains debated; an ear question (up or down: 17 cents, then 5); the ear resolves 2 Hz through a filter 133 Hz wide.
- 7. The pitch that is not there. An ear question: one note with all its partials, without the lowest three, the same over low noise, and its fundamental alone; Helmholtz's distortion explanation and Licklider's masking test of it; Schouten's residue (1940); Licklider's autocorrelation model (1951) on the three sounds (130.9, 130.8, 130.8 Hz); a worked example (600, 800, 1000 Hz: 200 Hz); Schouten's shifted partials (the spacing stays 200 Hz, the pitch rises to 205); telephones, small loudspeakers, organ pipes, roots of chords.
- 8. Where pitch stops. The Tune's opening in pure tones, then above 5 kHz; Attneave and Olson (1971); the model's pitch strength against frequency, and the piano's range laid beneath it.
- 9. Two kinds of high. Shepard's tones (1964): twenty-four steps up that end where they began (the waveforms are identical); how they are made; chroma and height; why the octave.
- 10. The only pair you get. No sound. Hair cells do not grow back; the notch at 4 kHz; the NIOSH rule (85 dBA for 8 hours, halved for every 3 dB); a worked example (100 dBA: 15 minutes; 20 dB of actual fitted attenuation: about a hundredfold equal-dose factor; not a guaranteed safe duration); four habits.
- 11. Frontier: the ear is alive. Friction cut to a quarter makes the model's peak 13 dB taller and twice as sharp; Rhode (1971), Brownell (1985), prestin (2000); an oscillator at the edge of oscillation responds as the cube root of the force (100 dB in, 33 dB out); the third tone again, with a guide (2f₁ − f₂; Tartini, 1754; the newborn hearing test); emissions; what is not known: hidden hearing loss, the amplifier in vivo, music through cochlear implants, regeneration. ★ research problem.
- Variation 4, recap and problems. The Tune with partials 3 to 6 only, then as Shepard tones; the ledger; what we found; five problems; where it comes back; in practice; references; two pairs of strings, and Part 5.
What is computed and built
python -m videos.music.music4.compute (about ten seconds) fills .cache/music4/.
| Item | What it computes | Checked against |
|---|---|---|
two |
two pure tones; the spectrum of an oscillator at a Hopf bifurcation driven by them | a line at 2f₁ − f₂, 18 dB below the tones; none in the clip |
outer |
the canal's quarter-wave resonance; the middle ear's gain and power transmission | area ratio and lever from the anatomy (Pickles); 27 dB |
wave |
the long-wave cochlea at seven frequencies; a film at 1 kHz; the place map; damping at a quarter | the peak just basal of the local resonance; Greenwood (1990) |
bands |
gammatone filters and their widths; Fletcher's experiment; resolved partials; a 64-band cochleagram | the ERB formula of Glasberg and Moore (1990), to 1% |
loud |
the threshold in quiet (Terhardt's formula), the A weighting, sones | ISO 226 and IEC 61672 values at 100 Hz, 1 kHz, 3.5 kHz |
mask |
the masked threshold beside a 1 kHz tone at 70 dB | the probe at 1150 Hz hidden by 11 dB, at 3000 Hz clear by 37 dB |
locking |
a hair cell and nerve model: synchrony and pitch strength from 250 Hz to 8 kHz; spike rasters | the shape of Johnson's (1980) cat data: strong below 1 kHz, gone by 5 kHz |
pitch |
the summary autocorrelation of a pure tone, a full tone and one without partials 1 to 3; Schouten's shift | the same pitch within a cent; 205.3 Hz for the shifted complex (first pitch shift: 205) |
limit |
the Tune's opening in pure tones near 500 Hz and above 5 kHz | (heard) |
shepard |
twenty-five Shepard tones | step 12 equals step 0 exactly |
dose |
daily criterion durations against level | NIOSH (1998): 85 dBA, 8 h, 3 dB exchange |
active |
the response of a Hopf oscillator against force | slope 1/3 on a log-log plot |
tune |
Variation 4; the pitch model on each of its notes | every missing fundamental within 0.2 cents |
nextpart |
two strings at 2:3 and at 32:45 | (heard) |
Monochord's ear is held against its references in tests/music/test_ear.py; this part's claims and clips in
tests/music/test_music4.py.
Sounds. Sixteen clips, labelled on screen. synthesized: pure tones and sums of them (the two tones, the seven
octaves, the three pairs, the sweep, the equal-pressure tones, the masking test, the pitch pairs, the note with and
without its bottom, the shifted partials, the Tune in pure tones, Shepard's scale, the Variation). physical model: Part 1's plucked string (the Tune's opening for the cochleagram, the note 10 dB apart, the two pairs of
strings at the end). There are no recordings. Three clips say that they need bass (they begin at 100 or 125 Hz).
What the models are, and are not. The cochlea is a one-dimensional long-wave model with a logarithmic map; its place map is a straight line where Greenwood's bends below about 500 Hz, and the film shows both. The masking pattern is the power-spectrum model with symmetric gammatone filters; measured masking spreads further upwards, and the film says so. The "nerve" is a half-wave rectifier and a low-pass filter, which gives the right shape for the loss of phase locking but is not a model of any particular species; the film says that the limit in humans has not been measured directly. The Hopf oscillator is the normal form, not a cochlea. Whether a given viewer hears the third tone depends on the playback level and on their loudspeakers, which also distort; the film gives a guide tone and does not claim that everyone will.
The ear thread. Six pause-and-listen questions (chapters 3, 4, 5, 6, 7 and 9) and four demonstrations with something to listen for (chapters 4, 7, 8 and 11): in this part the listener is the apparatus.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: two pure tones and the third that the ear adds; Kemp, Gold and Békésy; the plan.
- From air to water: the impedance mismatch; the middle ear as a transformer (a worked example); the ear canal as a stopped pipe.
- A wave that sorts: the cochlea unrolled; the travelling wave in a model and why it stops; seven octaves, equal distances (a worked example); Greenwood's map; hair cells.
- How fine is the ruler: Fletcher's experiment; the ERB formula (a worked example); beats, roughness, two tones (an ear question); a cochleagram; resolved and unresolved partials.
- How loud is loud: a sweep at constant pressure; the threshold; phons and the A weighting (an ear question); sones; a worked example (sixteen violins).
- What a loud sound hides: the masked threshold (a worked example and an ear question); upward spread; uses.
- A second clock: phase locking and volleys; where the clock stops; the smallest audible step (an ear question).
- The pitch that is not there: a note without its fundamental (an ear question); distortion ruled out; the autocorrelation model; a worked example; Schouten's shift; uses.
- Where pitch stops: the Tune above 5 kHz; the model's pitch strength and the piano's range.
- Two kinds of high: Shepard's scale (an ear question); chroma and height.
- The only pair you get: hair cells, the noise notch, a safe dose (a worked example); no sound.
- Frontier: outer hair cells as the amplifier; the cube-root law; the third tone with a guide; emissions; what is not known.
- Variation 4: the Tune without fundamentals, then without octaves. Outro: problems, payoffs, two pairs of strings.
Covers: the middle ear as an impedance match; the cochlea's place map; hair cells and the active process;
critical bands (ERB); loudness, phons, sones and the A weighting; masking; just-noticeable differences; place and
timing theories of pitch, phase locking and why the piano stops near 4 kHz; the missing fundamental and the shifted
residue; Shepard tones; noise-induced hearing loss and how to avoid it.
Built and computed: Monochord's ear (monochord/ear.py): a middle-ear transformer, a long-wave cochlea, a
gammatone bank and cochleagram, a threshold and masking model, an autocorrelation pitch model that predicts the
missing fundamental and Schouten's shift, a Hopf oscillator; masking patterns reused in Part 58.
Variation 4: the Tune with its fundamentals removed, still heard at pitch; then as Shepard tones.
Frontier: the cochlear amplifier; hidden hearing loss; music through cochlear implants; regeneration.
Reading: Moore, An Introduction to the Psychology of Hearing; Plack; Pickles.
Build the film
python -m videos.music.music4.compute # the part's numbers, into .cache/music4
python tools/build.py music4 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music4 Hook # one chapter, silent, with a contact sheet
Scenes: videos/music/music4. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.music.music4.compute # numbers and sounds (about ten seconds)
EXPLAINER_TTS=silent python tools/build.py music4 -q l --fps 15 # a silent-narration preview, with the sounds
python tools/qa_sound.py music4 --sync # the sound gates
python tools/dead_air.py renders/music4_480p.mp4 --sound music4 # no empty screen; no sound over a still one
python tools/lecture_length.py music4 # 30 to 60 minutes, listening included
python tools/build.py music4 # 1080p30, narrated
python -m pytest -q tests/music # Monochord against its references; this part's claims and clips
python -m videos.music.labs 4 # the lab (writes a figure and a short WAV)