♪Music, Built

Act X · The Studio and the Stage

Part 55 of 68

Rooms and Space

Foundationsstarts at this level56 min of film13 chaptersprerequisites: Part 2, Part 4, Part 49, Part 54

Why does one room make music sound glorious and another make speech a blur, and how can space be built back for two ears?

In 1895 Harvard opened a lecture room nobody could understand; Wallace Sabine timed an organ pipe's decay by night, carried in Sanders Theatre's cushions, found the law, and designed Boston's Symphony Hall (1900). An ear question hears the room as built (5.6 s) and cured (1.1 s); Philharmonic Hall (1962) shows one number is not enough. Sabine's law derived from a diffuse field (T60 = 0.161 V/A), 300 and 1,500 cushions heard, Eyring's correction, absorption by band, targets by use. A living room's 18 modes below 120 Hz against Weyl's 20.2, the Schroeder frequency (305 Hz in the room, 20 in a hall), a bass line in a corner and in the middle (heard), and what can be done. Porous, panel and Helmholtz absorbers; a flutter echo (35 ms) scattered (heard); Schroeder's quadratic-residue diffuser (n^2 mod 7), Gauss's sum and computed scattering (diffusion 0.39 against a flat panel's 0.07 at 1 kHz). Early reflections, the precedence effect and clarity; the lateral fraction (Barron and Marshall) falling from 0.20 to 0.11 as a hall widens; an ear question on two halls; shoebox, fan, vineyard and surround halls. Simulation: image sources (833 to the eighth order), checked against Sabine and Eyring (a smooth box rings 14 per cent long: it is not diffuse) and against the exact modes (within 0.4 Hz); rays, waves and auralization. Hearing direction: the duplex theory, Woodworth's ITD (656 microseconds), Brown and Duda's head shadow, the cues heard apart and together, and the cone of confusion (an ear question with no answer: front and back identical round a sphere). Stereo from Ader and Blumlein, the tangent law (13.4 degrees for a half pan), linear and constant-power laws heard, the sweet spot, microphone pairs. Ambisonics: B-format, a ring decoder, Gerzon's rV and rE (2/3 basic, 0.707 max-rE), higher orders; wave-field synthesis. Binaural rendering: HRTFs, a block renderer, a shaker circling the head (heard), externalization, head tracking, crosstalk cancellation. Object audio and VBAP; personal HRTFs and real-time waves. The Tune in four spaces, then circling the listener.

What you need. Part 2 for standing waves and the finite-difference simulator; Part 4 for the ear; Part 49 for convolution, image sources and reverberators; Part 54 for patterns and arrays. Exponential decay, Fourier series, a little number theory, two-by-two matrices.

Ideas, mathematics and history
Sabine and Symphony Hall, modes, absorption and diffusion, concert-hall design, localization, stereo, Ambisonics, binaural audio
What we build, compute and hear
an image-source room; the Tune walked through four halls and around your head

What you will be able to do

Foundations

  • Hear a lecture room before and after its cure, a bass line in a corner and in the middle, and a flutter echo diffused.
  • Hear two halls that differ only in width, and noise placed by time differences, level differences and both.
  • Hear a voice at 30 degrees and at 150 degrees round a sphere, two pan laws, and a shaker circling the head.

Full course

  • Derive Sabine's law from a diffuse field, add Eyring's correction, and check an image-source room against both.
  • Count a room's modes against Weyl's formula, find the Schroeder frequency, and prove a residue diffuser's Gauss sum.
  • Compute interaural cues, the tangent law, Ambisonic decoders with Gerzon's vectors, and a binaural renderer.

Research

  • Find the least a renderer must know about a listener's ears to render space as well as their own HRTF.

Practice

  • Choose reverberation for a use, treat modes and reflections, and pan, decode and render space for any playback.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Foundations 34 min · Full course 52 min · Research 56 min · Practice 52 min.

  1. 0A room nobody could understandFoundations3 min
  2. 1Sabine's lawFoundations5 min
  3. 2ModesFoundations5 min
  4. 3Absorption and diffusionPractice6 min
  5. 4Early reflections and hall shapesFoundations5 min
  6. 5Simulating a roomPractice5 min
  7. 6How we hear directionFoundations5 min
  8. 7Stereo and panningFoundations4 min
  9. 8Ambisonics and wave-field synthesisPractice4 min
  10. 9Binaural renderingFoundations5 min
  11. 10Object audioPractice3 min
  12. 11Frontier: personal ears and real-time wavesResearch3 min
  13. Variation 55, recap and problemsAll tracks2 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

A room nobody could understandFoundations3 min

This part begins at Harvard, in 1895. Your ears go first. A voice in a lecture room, twice. Once in a simulated untreated room; once after absorption was increased in the model so that people could understand what was said in it. Which was the room as it was built?

The first. Clap your hands in a room and the sound does not stop; it dies away, losing a fixed number of decibels every second. In the room as built, a sound took seconds to die by sixty decibels, about a millionth of its energy. Each word was still sounding when the next five arrived. After the change, it took seconds, and the words came apart.

The room was real. In 1895 Harvard opened the lecture room of its new Fogg Art Museum, with severe reverberation that impaired speech intelligibility. The university's president asked a twenty-seven-year-old assistant professor of physics, Wallace Sabine, to fix it. For three years, at night when the city was quiet, Sabine timed how long an organ pipe's note went on sounding after it stopped, by ear and with a stopwatch. He borrowed the seat cushions of Sanders Theatre across the yard, and carried them in a few at a time. The times fell into a law: the room's volume over its absorption. In 1900 Boston's Symphony Hall opened, an early influential hall designed with quantitative acoustic advice, and it is still among the best in the world.

Sixty years later, the science failed in public. In 1962 Philharmonic Hall opened at New York's Lincoln Center, designed with every tool acoustics then had. Its reverberation time was close to the target, and yet the sound was thin, the bass weak, and the players could not hear each other. There were years of adjustments; in 1976 the inside was torn out and rebuilt, and it has been rebuilt again since, most recently reopening in 2022. One number was not enough: when reflections arrive, and from which direction, matters as much as how long they last. And then space itself became something we build: stereo, surround, sound for headphones.

Here is the plan. Sabine's law, derived. A room's modes, counted, and the frequency above which they stop mattering. Absorption and diffusion, and the number theory hidden in a diffuser. Early reflections, and the shape of a hall. How two ears hear direction. And the ways we build space: stereo, Ambisonics, binaural rendering and object audio. Several of this part's sounds are rendered for headphones; put them on.

1Sabine's lawFoundations5 min

How long does a room go on sounding, and why?

What did Sabine measure? A sound in a room reaches you directly, then by one wall, by two, by three, by ever more paths and ever fainter. In the diffuse-field idealization, energy is approximately uniform and moves in every direction at once: a diffuse field. Each bounce loses a fraction of the energy, so the level falls by a fixed number of decibels every second. The reverberation time, T sixty, is how long the level takes to fall by sixty decibels, to a millionth of its energy. Sabine's stopwatch measured the time until the organ pipe became inaudible, a threshold-dependent decay time that is not automatically a calibrated sixty-decibel interval.

The law follows from the diffuse field in four lines. If the room holds energy E in volume V, spread evenly and moving every way, then each square metre of wall is struck by c over four times E over V every second; the quarter comes from averaging over the angles of arrival. A surface of area S with absorption coefficient alpha takes alpha S of that. Add them up into A, the room's absorption, measured in square metres of open window, which absorbs everything. The energy falls at a rate proportional to itself, so it decays exponentially. Set the decay to sixty decibels and solve: T sixty is nought point one six one times the volume over the absorption. Big rooms ring longer; soft rooms ring less. Sabine found the constant by experiment, before anyone had derived it.

Here is Sabine's experiment, simulated. A room of the Fogg's size, two thousand eight hundred cubic metres, with about eighty square metres of absorption in its bare plaster, glass and wooden seats. Each cushion adds about a fifth of a square metre. The reverberation time falls as one over the absorption, steeply at first, then more and more slowly: every cushion helps less than the last. Hear the room with none, with three hundred and with fifteen hundred.

From seconds, to , to : a muddle, then a church, then a lecture room. Sabine's own cure for the Fogg was felt on the walls; it helped, though the room was never good, and the original building was later demolished.

Sabine's law has a flaw that shows in dead rooms. It assumes the absorption nibbles at a sound continuously. In fact a sound is absorbed in jumps, one wall at a time, about c S over four V times a second. Carl Eyring, at Bell Labs in 1930, counted the jumps: T sixty is nought point one six one V over minus S times the log of one minus the average absorption. For a live room the two agree. For a dead one Sabine overestimates: make every surface an open window, alpha one, and Sabine's law still gives a decay, while Eyring tends to zero reverberation time; a fully open room no longer supports the assumed diffuse reverberant field. And the air absorbs too, in the treble: add four m V to the absorption, which matters in big halls above two kilohertz.

Absorption depends on frequency, so a room has a reverberation time for every band. Hard plaster absorbs almost nothing anywhere. A wooden panel on a frame absorbs the bass, because it moves. Carpet and curtains absorb the treble, because the air must squeeze through their fibres, and viscous and thermal losses depend on thickness, flow resistivity, wavelength and placement. The best absorber in a concert hall is the audience, which is why halls are tuned with seats that absorb as much as a person does, so that a rehearsal sounds like a concert.

How long should a room ring? For speech, short: a control room, a third of a second; a lecture room, under a second, so that each syllable is gone before the next. For music, longer: opera and chamber music about a second and a half, a symphony hall about two seconds, enough to join the notes of a phrase and to make an orchestra sound bigger than it is. Organ music was written for churches of three or four seconds and more, and plainchant can be heard in cathedrals with much longer decays; practice and buildings vary. Music and rooms grew up together.

2ModesFoundations5 min

Why does the bass boom in one corner and vanish in the middle?

Below a few hundred hertz, a room is not a diffuse field at all. A pipe closed at both ends rings at c over twice its length and the multiples, as in Part 2; a rectangular room is such a pipe in three directions at once, and its resonances are given by this formula, one for every triple of whole numbers. Axial modes bounce between one pair of walls; tangential modes go round four walls; oblique modes round all six. Each mode has loud places, the antinodes, and silent planes, the nodes, and every mode is loud in every corner. A living room five metres by four by two point seven has its first mode along its length, at three hundred and forty-three over ten: thirty-four point three hertz.

Here are the room's modes up to a hundred and twenty hertz, with the axial ones tallest, as a visual convention; actual strengths depend on damping and source and receiver positions. The first few stand alone: one, nought, nought along the length at thirty-four hertz, nought, one, nought across the width at forty-three, the first tangential mode at fifty-five, the height at sixty-four. There are below a hundred and twenty hertz, crowding together as the frequency rises, but at the bottom there are gaps of ten hertz and more. Modes can create peaks and dips, depending on source and receiver positions and damping.

How fast do they crowd? Count the modes below each frequency, and you get this staircase. Hermann Weyl showed in 1911 that, for any shape, the count grows like the volume times the frequency cubed, with corrections for the surface and the edges; for a box the formula is this. At a hundred and twenty hertz the room has modes, and Weyl estimates . The cube wins: double the frequency and there are eight times as many.

Where do modes stop mattering? Each mode is a resonance with a bandwidth set by the room's damping, about two point two over the reverberation time. Manfred Schroeder worked out in 1954 that once about three modes overlap within each bandwidth, the response is a random jumble of peaks and dips, the same everywhere on average, making statistical descriptions more useful, provided their other assumptions are adequate. That happens above two thousand times the square root of T over V. For the living room, hertz: its whole bass is a few separate resonances. For a concert hall, hertz: statistical almost everywhere. Small rooms generally have separated modes over more of the bass range; halls can still have low-frequency problems.

The room's response from a bass speaker in one corner, heard in the opposite corner, where every mode is at an antinode: tall peaks, twenty decibels and more above the dips. And heard in the middle of the room, which sits on a node of every mode with an odd number along any wall: the first modes are simply missing. Hear a plucked bass line from Part 38, in the corner, then in the middle.

In the corner some notes boom and hang on; in the middle the line is thin, and its lowest notes are nearly gone. Same room, same bass, a few metres apart.

What can be done? Move the listener and the loudspeaker, away from the planes halfway and a third of the way across the room, and out of the corners. Put bass traps, thick absorbers or tuned panels, in the corners, where ideal rigid-box pressure modes have antinodes; porous and pressure absorbers exploit different parts of the field. Use several subwoofers, placed so that they drive the modes against each other, as Todd Welti showed in 2002. Equalization can cut a peak, but it cannot fill a node: no amount of power reaches a place where a mode is silent. And small rooms remain modal: the bass of a living room is never a hall's.

3Absorption and diffusionPractice6 min

How do you treat a room without deadening it?

First, absorbers, of three kinds. Porous absorbers, foam, mineral wool, curtains, work by air rubbing through fibres, so they work where the air moves fastest. Next to a wall the air cannot move at all, so a quarter-wavelength spacing can place it near a velocity maximum in a simple normal-incidence standing wave; useful absorption does not require exactly that spacing: eighty-six centimetres for a hundred hertz. That is why thin foam only removes the treble. Panel absorbers are a sheet over an air gap, a mass on a spring, absorbing near their resonance, in the bass. Helmholtz resonators are a bottle's resonance, or slots in a board over a cavity. But too much absorption makes a room dead: quiet, dry, and tiring to play in. Musicians need the room to answer.

Absorption is not the only cure, and sometimes it is the wrong one. Clap between two parallel hard walls six metres apart, and the sound comes back every milliseconds, each time a little fainter: a train of echoes times a second, which the ear hears as a metallic buzz, a flutter echo. Hear two claps between bare walls, and then between walls that scatter each reflection instead of mirroring it.

The same energy, the same decay; but scattered, the reflections arrive spread out in time and direction, and the buzz turns into a smooth tail. That is diffusion.

What does a diffuser do? A flat wall is a mirror: an ideal large flat wall reflects specularly. A diffuser redistributes reflected energy over directions within a useful band; real devices also absorb some. The trick is a surface of wells of different depths, each delaying its part of the reflection by a different amount, so that the reflected wavefront comes back wrinkled. Manfred Schroeder, from 1975, found how to choose the depths: by a sequence from number theory, which spreads the energy evenly into every direction the wells allow. His best-known design, of 1979, is the quadratic-residue diffuser: the depth of well n is proportional to n squared, modulo a prime N.

Take N equals . Square nought to six and keep the remainders after dividing by seven: nought, one, four, two, two, four, one. The sequence is symmetrical and repeats every seven. Make each well that many sevenths of half a wavelength deep at the design frequency, here five hundred hertz, and you have a quadratic-residue diffuser: a row of slots of depths nought, five, twenty, ten, ten, twenty and five centimetres, repeated along the wall.

Why does it work? Well n sends the wave back after a round trip of twice its depth, a phase of two pi times n squared over N at the design frequency. A periodic surface reflects only into a few diffraction directions, one for each whole number k, and the strength of lobe k is this sum of N phases. For this ideal discrete phase sequence at the design frequency and odd prime N, the normalized Gauss sum has magnitude one over root N for every discrete diffraction order: not one lobe large and the others small, but all the same. This equal coefficient result does not by itself guarantee equal radiated power: well directivity, incidence, finite size and propagating angles also matter. Propagating orders satisfy sine theta equals k lambda over the period. A two-hundred-year-old theorem about remainders hangs on the walls of recording studios.

Here is what Monochord computes for sound arriving head on: the level reflected in each direction, from minus ninety to ninety degrees, for a flat panel in grey and for four periods of the diffuser in colour. At a thousand and two thousand hertz the flat panel throws one sharp beam straight back; the diffuser spreads the energy across the whole half-circle, and the diffusion coefficient rises from to . But at five hundred hertz, its design frequency, the diffuser hardly helps: the period, forty-two centimetres, is shorter than the wavelength, so the only lobe that can exist is the mirror one. The design frequency sets the depths; the period sets where diffusion begins.

Diffusers at work. In recording studios, they go on the back wall, while absorbers catch the first reflections from the side walls. Old halls diffuse by accident, with statues, coffered ceilings, boxes and balconies. Modern ones do it by design, with shaped panels and two-dimensional residue and primitive-root diffusers. Each works over a band: from where its period exceeds a wavelength, up to where the width of a single well does. And every surface in a room is a choice between three things: reflect, absorb, or scatter.

4Early reflections and hall shapesFoundations5 min

Two halls ring for the same time. Why does one sound better?

Two halls can ring for exactly the same time and sound nothing alike. The difference is in the first eighty milliseconds. Reflections that arrive within thirty milliseconds or so of the direct sound fuse with it: we hear one sound, from the source, which is the precedence effect of Wallach and of Haas. They make the sound louder and nearer; Leo Beranek, surveying the world's halls, prized a short gap before the first of them, about twenty milliseconds, and called it intimacy. Clarity, C eighty, is the energy in the first eighty milliseconds against everything after, in decibels. Reverberation joins the notes; the early reflections decide how clear, how loud, how near and how wide they are. Philharmonic Hall's trouble lay exactly here: its overhead panels reflected the treble but not the bass, and lateral reflections were inadequate at many seats.

Here is what reaches one seat in a shoebox hall eighteen metres wide, twenty metres from the stage, in the first hundred milliseconds. The direct sound, and half a millisecond later its reflection from the floor. Then a gap of eighteen milliseconds, and the first reflections from the two side walls, from forty degrees left and right. Then the ceiling, more side walls, and after eighty milliseconds the back wall. Every one of these is computed by the image method we will meet in Chapter 5.

The reflections from the sides are special. Harold Marshall in 1967, and Michael Barron in experiments from 1971, found that they make the sound wide and enveloping, a quality they called spatial impression. A reflection from the side reaches the two ears differently, so the ears hear different sounds, and the brain hears the source broaden and the hall surround it. The measure is the lateral fraction: the early energy arriving from the sides, weighted by the cosine squared of the angle from the line through the ears, over all the early energy. Values around nought point one five to nought point three five are often discussed, but no single range guarantees hall quality.

So the width of a hall matters. Here is the lateral fraction at one seat as the hall is widened from fourteen metres to forty, all else equal: from down to . As the side walls move away, their reflections arrive later and fainter, and more of the early energy comes from the ceiling, overhead, which the two ears hear alike. The best old halls are narrow shoeboxes, and their builders did not know why.

Your turn, with headphones. A voice from the stage of two shoebox halls that ring for the same time, one point nine seconds. One is eighteen metres wide, the other forty. Which was the narrow hall?

The first. Its early reflections come from the sides, strongly and soon, so the voice sounds broader and the hall wraps round you; the lateral fraction is against . In the wide hall the same reverberation sounds further off, as if heard through a door.

Hall shapes follow from all this. The shoebox: Vienna's Musikverein of 1870, Amsterdam's Concertgebouw of 1888, Boston's Symphony Hall: narrow, tall and ornamented, full of side reflections and scattering. The fan: wide at the back for more seats and better sight lines, with few side reflections, and often disappointing. The vineyard: Berlin's Philharmonie, by Hans Scharoun with the acoustician Lothar Cremer, 1963, with the audience on terraces whose low walls reflect sound sideways. The surround: Hamburg's Elbphilharmonie of 2017, lined with ten thousand different gypsum panels, each cell shaped to scatter. Computer modelling has become standard in major hall design, and often as a model at a tenth of the size as well. How do you simulate a hall?

5Simulating a roomPractice5 min

How can you hear a hall before it is built?

Part 49 met the image method; here it is in full. A reflection off a flat wall looks as if it came from a mirror image of the source behind the wall. So instead of bouncing a ray, draw a straight line from the image to the listener: where it crosses the wall is the point of reflection, and its length gives the delay. Mirror the mirrored rooms again and you get the second-order images, the sounds that hit two walls, and so on for ever, a lattice of rooms. Jont Allen and David Berkley wrote it down for a box at Bell Labs in 1979: each image contributes a click after r over c, weakened by one over r and by the wall's reflection factor beta once per bounce.

How many images are there? In a box, seven up to the first order, the source and its six mirrors; twenty-five up to the second; eight hundred and thirty-three up to the eighth. The count grows as the cube of the order, the same cube as Weyl's modes. In time, the reflections arrive at a rate that grows as t squared: in a hall of three thousand cubic metres, a second after the sound, about reflections a second. Practical hybrid models often stop explicit image enumeration: the image method handles the early, sparse part, and statistics the dense tail.

Monochord's image-source room, checked two ways. Its reverberation time, measured from its own response for four wall absorptions, against Sabine and Eyring. For a live room it rings longer than either: at alpha nought point nought eight, seconds against Sabine's . This mismatch is consistent with a non-diffuse field, though finite-order truncation, response length and fitting procedure must also be checked. Both formulas assume a diffuse field, and a box with smooth walls is not one: the paths that graze along the long walls bounce least, and they keep the tail alive. Scattering can make diffuse-field formulas more applicable; real-room agreement is not guaranteed. And the peaks of its response, in the bass, sit on the exact modes, the worst hertz away: the image method and the mode sum are two descriptions of the same field.

Real halls are not boxes. In a complicated shape the images multiply, and most of them are invisible, hidden behind other walls, so each must be checked. Ray tracing, introduced by Krokstad, Strøm and Sørsdal in 1968, turns the problem round: fire thousands of rays from the source, each carrying a share of the energy, and count those that pass through the listener. Rays can scatter at every bounce, by each surface's scattering coefficient: diffusion, simulated. Commercial programs are hybrids: images for the first reflections, rays for the rest, a statistical tail at the end. What geometry cannot do is the wave part: diffraction round edges, and the modes below the Schroeder frequency.

The alternative is to solve the wave equation itself. On a grid, by the finite-difference method of Part 2's simulator, in three dimensions. The grid must be finer than the wavelength, about ten points to a wavelength. For a twenty-thousand cubic metre hall up to one kilohertz that is a grid of three point four centimetres, half a billion points, each updated seventeen thousand times for every second of sound. The cost grows as the fourth power of the top frequency, three dimensions of space and one of time; so in practice it is waves for the bass and rays for the treble. Graphics processors have made full-band wave simulation of small rooms possible, and of halls, nearly.

And then the simulation can be heard. Auralization: the simulated impulse response, convolved with a dry recording, as in Part 49. And because we know the direction each reflection comes from, it can be rendered for two ears, or for a ring of loudspeakers. Mendel Kleiner, Bengt-Inge Dalenbäck and Peter Svensson named it in 1993, and halls are now heard by their architects and players years before they open. To render direction, though, we have to know how direction is heard.

6How we hear directionFoundations5 min

With two ears and no eyes, how do you know where a sound is?

How do two ears find a direction? Lord Rayleigh asked, in experiments from 1876 to 1907, with tuning forks on a lawn and a blindfolded listener turning towards them. A sound to one side reaches the near ear first: an interaural time difference. And it is louder there, because the head casts an acoustic shadow on the far ear: an interaural level difference. Rayleigh's duplex theory: time differences locate low frequencies and level differences high ones, handing over near one and a half kilohertz. And the brain's coincidence detectors, in the brainstem, resolve time differences of about ten microseconds, a hundredth of the time a neuron takes to fire.

The time difference first. Treat the head as a sphere eight point seven five centimetres in radius. Sound from an angle theta reaches the far ear by a longer path, partly round the sphere, and Robert Woodworth's formula of 1938 gives the extra time: a over c times theta plus sine theta. It rises from nothing straight ahead to microseconds straight to one side, two thirds of a millisecond. Steepest in front, where we locate best: one degree is about nine microseconds.

Now the level difference, all the way round, from behind on the left through the front to behind on the right. A head is small next to the wavelength of a low note, which bends round it: at five hundred hertz the far ear is at most decibels quieter. Above about hertz, the frequency whose wavelength is the head's circumference, the shadow deepens: decibels at fifteen hundred hertz, at four thousand. This is Brown and Duda's spherical-head filter of 1998, Monochord's model of a head.

Hear them separately, with headphones. Bursts of noise sixty degrees to the right: first with only the time difference, then with only the level difference, then with both.

Each cue alone moves the sound to the right, but not always to the same place, and often inside the head. Together they agree, and the sound sits more firmly out to the right. Natural scenes can have reflections and mixtures that make cue combination ambiguous, so the brain combines them.

But the two cues have a blind spot. Take a sound thirty degrees to the right in front, and one a hundred and fifty degrees to the right, behind: the mirror image across the line through the ears. Both reach the right ear microseconds early. And for a sphere, both are shadowed identically. In fact every point on a cone around the ears' axis gives the same time and level differences: the cone of confusion. Front cannot be told from back, nor up from down, by these cues alone.

Your turn, with headphones. A voice rendered round Monochord's spherical head, twice: once thirty degrees to the right in front, once a hundred and fifty degrees to the right, behind. Which was in front?

The first was in front, but you could not have known: the two renderings are identical, sample for sample. With a spherical head, front and back give exactly the same signals. Any perceived difference cannot reveal front versus back from these identical model signals. The honest answer was neither.

Real listeners break the cone in two ways. The outer ear, the pinna, is not a sphere: its folds reflect sound into notches in the spectrum that move with direction, above about five kilohertz. Wayne Batteau in 1967, and Edgar Shaw's measurements, showed that those spectral cues tell front from back and up from down. And we turn our heads: a sound in front moves one way and a sound behind the other, as Hans Wallach showed in 1940. Distance has cues of its own: level, the loss of treble, and above all the ratio of direct sound to reverberation. All of this, for one listener, is a pair of filters for every direction, one for each ear: the head-related transfer function, which we will use in Chapter 9.

7Stereo and panningFoundations4 min

How can two loudspeakers put a voice between them?

Stereo is older than it seems. In 1881 Clément Ader laid pairs of telephone transmitters along the stage of the Paris Opéra, and listeners across the city held one receiver to each ear. In 1931 Alan Blumlein, an engineer at EMI, annoyed that a voice at the cinema came from the wrong side of the screen, patented nearly all of stereo: crossed microphones, a two-channel groove, and a circuit to make loudspeakers sound right. In 1933 Bell Labs relayed the Philadelphia Orchestra to an audience in Washington over three channels, which they called auditory perspective. And in 1958 came the stereo LP, cut with Blumlein's forty-five degree groove, and two loudspeakers became the standard.

The standard is a triangle: two loudspeakers thirty degrees either side of the listener. Send a voice to both equally and you hear it in the middle, where there is no loudspeaker: a phantom image. Make one louder and the image moves towards it. Where to? At low frequencies the two loudspeakers' sounds add at each ear into a time difference, and the image follows the tangent law: the tangent of its angle, over the tangent of thirty degrees, is the difference of the gains over their sum. Pan halfway with the usual law and the voice sits at degrees, not fifteen: images crowd towards the middle.

How should the gains change as a pan knob turns? The obvious way is linear: one gain falls as the other rises, always adding to one. But under a decorrelated or spatially averaged power model, we add squared gains; coherent loudspeaker signals also interfere, and in the middle the linear law's power is half: decibels down, a hole in the middle. The constant-power law moves along a quarter circle instead, cosine and sine, so the sum of squared gains stays fixed. Mixing desks offer both, and compromises between them.

Hear the difference, with headphones: a voice panned slowly from the left loudspeaker to the right, by the linear law and then by constant power, the two loudspeakers rendered round a spherical head. Listen to the middle.

With the linear law the voice sinks as it crosses the middle, then comes back; constant-power gains preserve the squared-gain sum; perceived level can still vary with correlation, acoustics and listener position. Both cross the stage at the same pace, crowding a little towards the centre, as the tangent law predicts.

There is a catch. The phantom image needs the two loudspeakers' sounds to arrive together, so the listener must sit on the centre line. Move sixty centimetres to the left, and the left loudspeaker's sound arrives about one point seven milliseconds sooner. By the precedence effect the first arrival wins, and the voice jumps into the left loudspeaker. Amplitude panning has a sweet spot; everyone else in the room hears a different mix. And stereo on headphones is another thing again: each ear hears only one channel, with no crosstalk and no head in between, and the image sits on a line inside the head.

Stereo also has to be recorded. Coincident pairs, two cardioids crossed in XY, or Blumlein's crossed figure-8s, put both capsules at one point in space, so they make level differences only. Spaced pairs, AB, are omnis a metre or more apart, making time differences, with a wide and vaguer image. Near-coincident pairs, like French radio's ORTF, two cardioids seventeen centimetres apart at a hundred and ten degrees, make a little of each. And mid-side, also Blumlein's, puts a forward cardioid M with a sideways figure-8 S: left is M plus S, right is M minus S, and the width of the image becomes a knob. Part 56 computes how each pair maps a stage onto the stereo triangle.

8Ambisonics and wave-field synthesisPractice4 min

Can we record the sound at a point, and rebuild it in a room?

In the 1970s the record industry tried four loudspeakers. Quadraphonic records came in three incompatible formats, and failed. Michael Gerzon and Peter Fellgett, at Oxford, proposed something better: forget the loudspeakers, and record the sound field at a point. To first order, the field at a point is four numbers: its pressure, W, and its gradient in three directions, X, Y and Z, which are an omni and three figure-8 microphones. Gerzon and Peter Craven's Soundfield microphone of 1975 has four capsules on a tetrahedron, whose outputs sum into W, X, Y and Z. That is Ambisonics: the recording knows nothing about the loudspeakers, and a decoder is designed for whatever layout there is.

Encoding is three lines, if we keep to the horizontal. A sound s arriving from angle theta puts s in W, the omni. It puts s cosine theta into X, a figure-8 facing the front, and s sine theta into Y, a figure-8 facing the left. These three channels are B-format. A microphone makes them from a real field; a mixer makes them by formula, to place a sound anywhere.

Decoding asks: what should each loudspeaker play, so that the field at the centre has the right W, X and Y? For a ring of N, the answer is this: each loudspeaker plays W plus twice the gradient pointing its way, over N. For a source at twenty degrees, the nearest loudspeakers play loudest, the side ones less, and the far side plays a little, inverted, shown in blue: its job is to cancel the near side's sound where it should not be. Within the stated first-order, horizontal, plane-wave model, the decoder matches the retained pressure and velocity components at the centre.

How good is the illusion? Gerzon gave two measures. The velocity vector, the gains times the loudspeakers' directions, over the gains: it predicts the direction heard at low frequencies, where the ears read time. The energy vector does the same with squared gains, for high frequencies, where they read level. A single real source has both of length one. The basic decoder gets the velocity vector perfect, length one in every direction, but its energy vector is only long: the treble sounds blurred, spread over the ring. A max-r E decoder trades one for the other, raising the energy vector to . Better decoders use one design for the bass and another for the treble.

First order is blurry because four channels can only hold a blurry picture. Higher-order Ambisonics adds more terms of the field's expansion in circular or spherical harmonics: two N plus one channels for a ring, N plus one squared for a sphere. With the max-r E decoder the energy vector grows as cosine of pi over two N plus two, and the image's spread, its arc cosine, shrinks: forty-five degrees at first order, twenty-two and a half at third, eleven at seventh. The sweet spot widens too. Third order uses sixteen full-sphere channels and is one common choice for virtual reality.

There is another way to rebuild a field, over an extended listening region, with finite-array and frequency limits. Christiaan Huygens said that every point on a wavefront acts as a new source of wavelets. Guus Berkhout, at Delft in 1988, turned it round: put a line of loudspeakers where the wave would pass, and have each play the wave as it would arrive there, delayed and weighted. Their wavelets add up to the wavefront of a virtual source behind the line, and listeners within the usable region can hear a more stable virtual source. The price is loudspeakers: above c over twice their spacing the wavefront breaks up, so seventeen-centimetre spacing works up to one kilohertz, and an installation needs hundreds.

9Binaural renderingFoundations5 min

Can two headphone channels put a sound anywhere round you?

Stereo pans between loudspeakers. Headphones allow something else. We hear space with two signals, one at each eardrum; reproducing those signals can reproduce many spatial cues, with head movement, headphone transfer and visual context also relevant. Binaural recording puts microphones in the ears of a dummy head, like Neumann's KU 80 of 1973. Played on headphones, the room, the directions and the distances come back, often startlingly. But only for a head like the dummy's, and only while you keep still. Binaural rendering does the same by computation: any sound, from any direction, through a model of the ears.

The tool is the head-related transfer function. For every direction, it is the filter from a distant source to each eardrum. It is measured with tiny microphones in the ear canals and a loudspeaker moved round a sphere, in an anechoic room, hundreds of directions for each person. The classic sets are KEMAR, MIT's mannequin, measured by Bill Gardner and Keith Martin in 1994, and the CIPIC database of forty-five people, from 2001. It holds every cue of Chapter 6: the time and level differences, and the pinna's notches. Monochord's ears are simpler: a sphere, with Woodworth's delay and Brown and Duda's shadow, and no pinnae, which is why its front and back sound alike.

A renderer is then simple to describe. Take a dry sound, and the direction it should come from. Filter it twice, by the head-related filters for that direction, one for each ear, and send the results to the two sides of the headphones. If the source moves, the filters must change as it goes: Monochord's renderer picks a new pair for every block of a thousand and twenty-four samples, and overlaps and adds the blocks so that no join clicks.

Hear it, with headphones: a shaker circling Monochord's head times in seconds, starting in front and moving to the right.

The sound swings convincingly from side to side, passing through the right ear and the left. But many listeners hear the front and back halves of the circle alike, or hear the whole circle inside the head, close behind the eyes: a sphere has no pinnae, and the renderer does not know which way you are facing.

Binaural rendering's two failures are well known. With someone else's ears, sounds in front often jump behind, and many sit inside the head instead of out in the world. Externalization comes back with a room: reflections arriving from their own directions, as in the halls of Chapter 4. Durand Begault's experiments at NASA, published in 2001, found that even a little simulated reverberation moves sounds out of the head. Personal HRTFs help too: Elizabeth Wenzel and her colleagues found in 1993 that strangers' ears cause many more front-back reversals than one's own. And so does the oldest cue of all, movement.

Head tracking supplies the movement. A gyroscope in the headphones reports how far the head has turned, and the renderer subtracts it from the source's direction, so the source stays fixed in the room while the head moves. Turn towards a sound and it moves as a real one would: front-back ambiguity can be reduced, as Wallach found in 1940. The whole loop, sensor, radio and filters, should have low latency; tolerable delay depends on motion and task, with fifty milliseconds an illustrative target, or the world seems to swim. Some compatible phones and headsets have offered head-tracked spatial audio since around 2020.

Can binaural sound be played on loudspeakers? Not directly: each ear hears both loudspeakers. Benjamin Bauer in 1961, and Bishnu Atal and Manfred Schroeder in 1962, inverted the problem: the ear signals are a two-by-two matrix of paths times the loudspeaker signals, so play the matrix's inverse times the binaural signals, and each loudspeaker's sound cancels at the far ear. The sweet spot shrinks to a few centimetres, and the inverse needs a great deal of bass. Soundbars and laptops do it today, with a camera watching the listener, or a fixed seat.

10Object audioPractice3 min

What if a mix did not know how many loudspeakers it would meet?

There are three ways to store space. Channel-based: a signal for each loudspeaker, like stereo, or the five point one of cinemas since the 1990s, right only for that layout. Scene-based: the field itself, as in Ambisonics, decoded for whatever layout there is. Object-based: every sound kept separate, with metadata saying where it is, how big, and how it moves. Then a renderer, at playback, which knows the loudspeakers, or the headphones, places each object. Formats can combine these approaches; a channel bed with objects is common in object-audio productions: a bed of channels, perhaps an ambisonic scene, and objects.

Objects reached the public through the cinema. Dolby Atmos opened in 2012 with Pixar's Brave: up to a hundred and twenty-eight tracks, with objects rendered to as many as sixty-four loudspeakers, some of them overhead. At home one illustrative layout is seven point one point four: seven loudspeakers round the listener, one subwoofer, four in the ceiling. Broadcasting has standards of its own, MPEG-H 3D Audio and AC-4. And from 2019, and widely from 2021, streaming services began to offer music mixed in Atmos, heard mostly on headphones, and so rendered binaurally.

How does a renderer place an object between loudspeakers? The simplest answer is Ville Pulkki's of 1997, vector-base amplitude panning: write the object's direction as a combination of the two loudspeakers either side of it, and normalize the gains to constant power. In three dimensions, the three loudspeakers round it. Watch an object travel once round a seven-loudspeaker ring: at each moment only the pair that brackets it plays, and the energy hands from pair to pair. Stereo's pan law, wrapped round the listener.

The same objects can be rendered anywhere. On headphones, the renderer is the one of Chapter 9: each object passes through the head-related filters for its direction. On a soundbar, by crosstalk cancellation and by beams bounced off the walls and ceiling. One mix serves every playback, so the renderer's quality is now part of what the music sounds like. And the listener's own room is still added on top, unless they are wearing headphones.

For music the questions are new. Film sound has a screen to anchor it; music has none, and listeners face the front from habit. Some mixes put the listener inside the band; others keep a stage in front and use the space above and behind for the room. The binaural rendering of a mix differs from one service and one earbud to another, so a mixer cannot hear every version their listeners will. And every spatial mix still needs a stereo version: the fold-down is part of the art.

11Frontier: personal ears and real-time wavesResearch3 min

Can a phone know your ears, and a game simulate a cathedral?

The first frontier is the listener's own ears. Everyone's HRTF is different, and measuring one takes an anechoic room and an hour of keeping still. So compute it instead: scan the head and ears into a mesh, and solve the wave equation round it, by the boundary-element method, frequency by frequency. Or predict it, from photographs of the ear or a phone's depth camera, with models trained on measured databases. Or choose it: play a few test sounds, and let the listener pick the set that sounds most real. Since 2022 phones have offered personalized spatial audio from an ear scan. How well any of these works, compared with one's own measured ears, is an open question.

The second frontier is simulation fast enough to hear while you move. A wave simulation's cost is the number of grid points, the volume over the wavelength cubed, times the number of time steps, the duration over the step: the volume times the duration times the frequency to the fourth. Each octave higher costs sixteen times as much: from two hundred and fifty hertz to sixteen kilohertz, seventeen million times. That is why the treble is left to rays.

How is it done in real time? By precomputing: simulate the waves offline from many points in a game's world, and store a few numbers for each pair of points. Nikunj Raghuvanshi and John Snyder's method of 2014 stores loudness, reverberation and the direction a sound seems to come from, so sound bends round corners and through doors as it should. By graphics processors, which now simulate a room's waves at interactive rates, for the bass and middle. And by learned models, networks trained on simulations to predict a room's response from its shape, or from a photograph of it. The goal: a hall, a cathedral, a forest, simulated as you walk through it.

And the room itself is becoming something to program. Room correction measures the room at the seats and corrects the loudspeakers where a correction is possible, cutting peaks, leaving nodes alone. Sound zones use arrays to play loudly in one seat of a car and quietly in the next. Active acoustics put microphones and loudspeakers in the walls of a hall, and change its reverberation at the turn of a knob, from a lecture room to a cathedral. Sabine's cushions, now in software.

A research problem to end on. Take measured HRTFs for many people, with scans of their heads and ears. Predict each person's from less: a photograph, a depth scan, a few chosen test sounds. Test the prediction by listening: front-back reversals, elevation and externalization, against the person's own. The question: what is the least you need to know about a listener's ears to render space for them as well as their own HRTF would? An answer would decide how everyone hears spatial audio.

Variation 55, recap and problemsAll tracks2 min

Every part ends by doing something to the Tune with what it built. Here, with headphones, it is sung with no room at all, then in a small room, a shoebox hall and a cathedral, all simulated; and then its first two phrases circle round you.

Row fifty-five of the ledger. Reverberation times of nought, , and seconds; and one circle of the head in seconds.

What did we find? In a diffuse field, reverberation time is nought point one six one times the volume over the absorption, with Eyring's correction for dead rooms. Below the Schroeder frequency a room is a set of modes, crowding as the cube of the frequency. Absorbers take energy away; diffusers, by a Gauss sum, spread it. Early reflections from the sides make a hall wide, and narrow halls have more of them. Two ears hear time and level differences, which are blind on a cone, and the pinnae and movement break the cone. And panning, Ambisonics, wave fields and binaural filters build space back.

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 recording and mixing, with stereo pairs, panning, depth and width. In mastering, which must survive every listener's room and headphones. In live sound, with halls, feedback, arrays and delays. In source separation, where spatial cues pull sources apart. And in generative audio, where rooms are learned from data.

And in practice. Room builders choose the reverberation time for the use, and diffuse rather than deaden. Home listeners move the seat and the subwoofer before buying an equalizer. Mixers use constant-power pans, and check the mix off the centre line and in mono. And spatial audio adds a room and tracks the head, or sounds stay inside it.

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

Where it goes next. Stereo pairs, panning, depth and width in Part 56; the listener's room in Part 57; halls, feedback and arrays in Part 59; spatial cues in source separation in Part 64; learned rooms in Part 66.

Key results

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

Sabine and Eyring\(\displaystyle T_{60} = 0.161\,\frac{V}{A}, \quad\allowbreak T_{60} = \frac{0.161\,V}{-S\ln(1 - \bar\alpha)}\)
Modes\(\displaystyle f = \frac{c}{2}\sqrt{(n_x/L_x)^2 + (n_y/L_y)^2 + (n_z/L_z)^2}, \quad\allowbreak N(f) \approx \frac{4\pi V f^3}{3c^3}\)
Schroeder frequency\(\displaystyle f_S = 2000\sqrt{T_{60}/V}\)
Gauss's sum\(\displaystyle \Bigl|\sum_{n=0}^{N-1} e^{2\pi i (n^2 + kn)/N}\Bigr| = \sqrt{N}\)
Woodworth\(\displaystyle \Delta t = \frac{a}{c}(\theta + \sin\theta)\)
Tangent law\(\displaystyle \frac{\tan\varphi}{\tan\varphi_0} = \frac{g_R - g_L}{g_R + g_L}\)

Try it

Lab 55 · Rooms and space, computed

Compute a room's reverberation by Sabine and Eyring and its modes against Weyl's count, check a quadratic-residue diffuser's Gauss sum and its scattering, and place a sound round a spherical head by its time and level differences.

Figure produced by Lab 55: Rooms and space, computed
Produced by the lab below, seed 0, in 0.1 s.
python -m videos.music.labs 55 needs numpy, scipy, matplotlib · download lab55.py · source on GitHub
room 6 x 4.5 x 3 m, alpha 0.15: T60 by Sabine / Eyring          0.743 / 0.686 s
Schroeder frequency                                             184 Hz
modes below 200 Hz: counted / Weyl                              104 / 102.4
the first five modes (Hz)                                       28.6 (1, 0, 0), 38.1 (0, 1, 0), 47.6 (1, 1, 0), 57.2 (0, 0, 1), 57.2 (2, 0, 0)
QRD, N = 7, f0 = 500 Hz: well depths (cm)                       0.0, 4.9, 19.6, 9.8, 9.8, 19.6, 4.9
|Gauss sum| for every lobe k (sqrt N = 2.646)                   2.646, 2.646, 2.646, 2.646, 2.646, 2.646, 2.646
diffusion coefficient at 1000 Hz: diffuser / flat               0.39 / 0.07
ear problem (headphones): where was each burst? (listen first)  -30 deg, +0 deg, -30 deg, -30 deg

A room's reverberation is its volume over its absorption; below the Schroeder frequency it is a handful of modes, whose count grows as the cube of the frequency. A residue diffuser sends equal energy into every lobe because Gauss's sum has the same size for every k. Two ears read time and level, and a sphere cannot tell front from back.
The code (83 lines; it asserts its own result)
"""Lab 55: rooms and space, computed: Sabine and Eyring, a room's modes against Weyl, a diffuser's Gauss sum, and a
sound placed round a spherical head."""

import math

import numpy as np

from videos.coursekit import labs
from explainer.music.monochord import SR, Clip, concat
from explainer.music.monochord import space as SP

TITLE = "Rooms and space, computed"
GOAL = ("Compute a room's reverberation by Sabine and Eyring and its modes against Weyl's count, check a quadratic-"
        "residue diffuser's Gauss sum and its scattering, and place a sound round a spherical head by its time and level "
        "differences.")
TASKS = [
    "Change DIMS and ALPHA. How do Sabine's and Eyring's times part as the room gets deader, and where is the Schroeder frequency?",
    "Change N (a prime) and F0. Do all the diffraction lobes still carry the same energy? What happens if N is not prime?",
    "Change the azimuths in the ear problem. Which pairs of directions can a spherical head never tell apart?",
]
DIMS = (6.0, 4.5, 3.0)
ALPHA = 0.15
N, F0 = 7, 500.0


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()
    Lx, Ly, Lz = DIMS
    V = Lx * Ly * Lz
    S = 2 * (Lx * Ly + Ly * Lz + Lx * Lz)
    sab = 0.161 * V / (ALPHA * S)
    eyr = 0.161 * V / (-S * math.log(1 - ALPHA))
    lab.row(f"room {Lx:g} x {Ly:g} x {Lz:g} m, alpha {ALPHA:g}: T60 by Sabine / Eyring", f"{sab:.3f} / {eyr:.3f} s")
    lab.row("Schroeder frequency", f"{SP.schroeder_frequency(eyr, V):.0f} Hz")
    modes = SP.room_modes(DIMS, 200.0)
    lab.row("modes below 200 Hz: counted / Weyl", f"{len(modes)} / {float(SP.weyl_count(DIMS, 200.0)):.1f}")
    lab.row("the first five modes (Hz)", ", ".join(f"{m[0]:.1f} {m[1]}" for m in modes[:5]))
    d = SP.qrd_depths(N, F0)
    lab.row(f"QRD, N = {N}, f0 = {F0:g} Hz: well depths (cm)", ", ".join(f"{100 * x:.1f}" for x in d))
    sums = [abs(sum(np.exp(2j * np.pi * (n * n + k * n) / N) for n in range(N))) for k in range(N)]
    lab.row("|Gauss sum| for every lobe k (sqrt N = %.3f)" % math.sqrt(N), ", ".join(f"{s_:.3f}" for s_ in sums))
    ang = np.linspace(-90, 90, 181)
    q = 20 * np.log10(SP.scattering(d, 0.06, 2 * F0, ang) + 1e-9)
    fl = 20 * np.log10(SP.scattering(np.zeros(N), 0.06, 2 * F0, ang) + 1e-9)
    lab.row(f"diffusion coefficient at {2 * F0:g} Hz: diffuser / flat", f"{SP.diffusion_coefficient(q[::5]):.2f} / {SP.diffusion_coefficient(fl[::5]):.2f}")
    if all(N % p for p in range(2, int(math.isqrt(N)) + 1)) and N > 2:
        assert max(abs(s_ - math.sqrt(N)) for s_ in sums) < 1e-9
    assert eyr < sab

    # sound: noise bursts round the head; ear problem: name each direction
    t = np.arange(int(0.6 * SR)) / SR
    burst = rng.standard_normal(len(t)) * np.hanning(len(t))
    choices = [-90, -30, 0, 30, 90]
    clips, answers = [], []
    for i in range(4):
        az = choices[int(rng.integers(0, len(choices)))]
        hl, hr = SP.ear_filters(math.radians(az))
        y = np.stack([np.convolve(burst, hl), np.convolve(burst, hr)], axis=1)
        clips.append(Clip(0.2 * y / np.max(np.abs(y)), SR))
        answers.append(f"{az:+d} deg")
    lab.audio = concat(clips, gap=0.6)
    lab.row("ear problem (headphones): where was each burst? (listen first)", ", ".join(answers))

    fig, (ax1, ax2) = labs.figure(2)
    f = np.linspace(20, 200, 400)
    ax1.step(f, [sum(1 for m in modes if m[0] <= x) for x in f], color=labs.GOLD, where="post", label="counted")
    ax1.plot(f, SP.weyl_count(DIMS, f), color="C3", label="Weyl")
    ax1.set_xlabel("Hz")
    ax1.set_ylabel("modes below f")
    ax1.legend(fontsize=7)
    ax2.plot(ang, fl, color="0.6", label="flat")
    ax2.plot(ang, q, color=labs.GOLD, label="QRD")
    ax2.set_ylim(-40, 2)
    ax2.set_xlabel("degrees")
    ax2.set_ylabel(f"dB at {2 * F0:g} Hz")
    ax2.legend(fontsize=7)
    lab.fig = fig
    lab.note = ("A room's reverberation is its volume over its absorption; below the Schroeder frequency it is a handful "
                "of modes, whose count grows as the cube of the frequency. A residue diffuser sends equal energy into every "
                "lobe because Gauss's sum has the same size for every k. Two ears read time and level, and a sphere cannot "
                "tell front from back.")
    return lab

Now change it

  1. Change DIMS and ALPHA. How do Sabine's and Eyring's times part as the room gets deader, and where is the Schroeder frequency?
  2. Change N (a prime) and F0. Do all the diffraction lobes still carry the same energy? What happens if N is not prime?
  3. Change the azimuths in the ear problem. Which pairs of directions can a spherical head never tell apart?

Problems, with solutions

Try each problem before opening its solution.

  1. Compute. A room 10 by 8 by 4 m has an average absorption coefficient of 0.2 on every surface. Find T60 by Sabine and by Eyring.

    Solution

    V = 320 m³ and S = 2(80 + 32 + 40) = 304 m². Sabine: A = 0.2 × 304 = 60.8 m², T = 0.161 × 320 / 60.8 = 0.85 s. Eyring: −S ln(0.8) = 67.8 m², T = 0.161 × 320 / 67.8 = 0.76 s.

  2. Prove. Prove that |Σ_{n=0}^{N−1} e^{2πi(n² + kn)/N}| = √N for an odd prime N and every k.

    Solution

    Call the sum G. Then |G|² = Σ_{m,n} e^{2πi(m² − n² + k(m − n))/N}. Put m = n + h: m² − n² + k(m − n) = h(2n + h + k), so |G|² = Σ_h e^{2πi h(h + k)/N} Σ_n e^{2πi·2hn/N}. Since N is odd and prime, 2h is a unit mod N for h ≠ 0, so the inner sum over n vanishes unless h = 0, where it is N. Hence |G|² = N.

  3. Ear. The lab plays noise bursts from random directions round a spherical head; name each angle.

    Solution

    The lab prints them. Left and right are easy and the angle to the side is close; a burst straight ahead and one straight behind would be identical, which is why the lab never plays one from behind.

  4. Build. Add scattering to the image-source room and see its T60 approach Eyring's.

    Where to look. Keep the image method for the first two orders, then let each later reflection lose a fraction s of its energy into a diffuse tail (a noise tail decaying at the rate set by the average absorption), or randomize the image positions by a few centimetres per bounce. As s grows, the long-lived grazing paths lose their advantage and the decay moves from the specular box's (longer than Sabine's) towards Eyring's.

  5. ★ What is the least you need to know about a listener's ears to render space for them as well as their own HRTF would?

    Where the frontier is. Take databases of measured HRTFs with head and ear scans; predict each listener's set from a photograph, a depth scan or a few chosen test sounds; and test by listening, counting front-back reversals, elevation errors and externalization against the listener's own measured set.

Notes and sources

Sources

  • H. Kuttruff, Room Acoustics (6th ed., 2016); L. Beranek, Concert Halls and Opera Houses (2nd ed., 2004); J. Blauert, Spatial Hearing (rev. ed., 1997); F. Zotter and M. Frank, Ambisonics (2019).
  • W. C. Sabine, "Reverberation", The American Architect (1900), in Collected Papers on Acoustics (1922); C. F. Eyring, "Reverberation time in 'dead' rooms", JASA (1930); M. R. Schroeder, "Die statistischen Parameter der Frequenzkurven von grossen Räumen", Acustica (1954).
  • M. R. Schroeder, "Diffuse sound reflection by maximum-length sequences", JASA (1975), and "Binaural dissimilarity and optimum ceilings for concert halls: more lateral sound diffusion", JASA (1979); T. J. Cox and P. D'Antonio, Acoustic Absorbers and Diffusers (3rd ed., 2016).
  • A. H. Marshall, "A note on the importance of room cross-section in concert halls", JSV (1967); M. Barron and A. H. Marshall, "Spatial impression due to early lateral reflections in concert halls", JSV (1981).
  • J. B. Allen and D. A. Berkley, "Image method for efficiently simulating small-room acoustics", JASA (1979); A. Krokstad, S. Strøm and S. Sørsdal, "Calculating the acoustical room response by the use of a ray tracing technique", JSV (1968); M. Kleiner, B.-I. Dalenbäck and P. Svensson, "Auralization: an overview", JAES (1993).
  • Lord Rayleigh, "On our perception of sound direction", Phil. Mag. (1907); R. S. Woodworth, Experimental Psychology (1938); C. P. Brown and R. O. Duda, "A structural model for binaural sound synthesis", IEEE Trans. Speech Audio Proc. (1998); H. Wallach, "The role of head movements and vestibular and visual cues in sound localization", J. Exp. Psych. (1940); E. M. Wenzel et al., "Localization using nonindividualized head-related transfer functions", JASA (1993).
  • A. D. Blumlein, British patent 394,325 (1931); J. C. Bennett, K. Barker and F. O. Edeko, "A new approach to the assessment of stereophonic sound system performance", JAES (1985); M. A. Gerzon, "Periphony: with-height sound reproduction", JAES (1973), and "General metatheory of auditory localisation" (AES, 1992); A. J. Berkhout, "A holographic approach to acoustic control", JAES (1988); V. Pulkki, "Virtual sound source positioning using vector base amplitude panning", JAES (1997).
  • B. S. Atal and M. R. Schroeder, US patent 3,236,949 (1966; filed 1962); W. G. Gardner and K. D. Martin, "HRTF measurements of a KEMAR", JASA (1995); V. R. Algazi et al., "The CIPIC HRTF database" (2001); N. Raghuvanshi and J. Snyder, "Parametric wave field coding for precomputed sound propagation", ACM Trans. Graph. (2014).
  • F. A. Everest and K. C. Pohlmann, Master Handbook of Acoustics (7th ed., 2021); F. Rumsey, Spatial Audio (2001).
About this partfrom its README

Part 55 of a sixty-eight-part course in music (see the series plan and the syllabus), the second part of Act X, The Studio and the Stage. In 1895 Harvard opened a lecture room with severe speech-intelligibility problems. A young physicist, Wallace Sabine, spent his nights there with a stopwatch, an organ pipe and the seat cushions of a nearby theatre, found the law of reverberation, and used it to design Boston's Symphony Hall. Sixty years later a hall designed with far more science had to be gutted. This part explains both, then turns from the room to the listener: how two ears hear direction, and how stereo, Ambisonics, binaural rendering and object audio build space back. The tools are Monochord's (explainer/music/monochord/space.py); every room, wall and head is simulated. Several sounds are rendered for headphones.

  • A room nobody could understand. An ear question (a voice in a lecture room in untreated and more absorptive model conditions: which was as built? the first, 5.6 s against 1.1 s); Sabine's nights, the cushions and Symphony Hall; Philharmonic Hall (1962); the plan.
  • 1. Sabine's law. A sound that dies away; the law derived from a diffuse field (T60 = 0.161 V/A); Sabine's cushions, simulated and heard (5.6, 3.1 and 1.1 s); Eyring's correction; absorption by frequency; how long a room should ring.
  • 2. Modes. A room is a pipe in three directions; the modes of a 5 by 4 by 2.7 m room (18 below 120 Hz); counting them against Weyl's formula (20.2); the Schroeder frequency (305 Hz in the room, 20 Hz in a hall); a bass line in a corner and in the middle, heard; taming the modes.
  • 3. Absorption and diffusion. Three ways to absorb; a flutter echo (every 35 ms) bare and scattered, heard; scattering without absorbing; a quadratic-residue diffuser (n² mod 7); why it works, by Gauss's sum; scattering computed (diffusion coefficient 0.39 against a flat panel's 0.07 at 1 kHz); diffusers at work.
  • 4. Early reflections and hall shapes. The first 80 milliseconds; what arrives at one seat, and from where; the lateral fraction; narrow halls surround you (0.20 at 14 m wide, 0.11 at 40 m); an ear question (two halls ringing for the same 1.9 s: which was the narrow one? the first); shoebox, fan, vineyard and surround halls.
  • 5. Simulating a room. The image method; how many reflections (833 images to the eighth order; 169,000 a second after one second in a 3,000 m³ hall); the simulator checked (a smooth box rings longer than Sabine and Eyring predict, because it is not diffuse; its bass peaks sit within 0.4 Hz of the exact modes); rays; waves; auralization.
  • 6. How we hear direction. The duplex theory; the time difference (Woodworth: up to 656 µs); the level difference (Brown and Duda: up to 15 dB at 4 kHz); the cues apart and together, heard; the cone of confusion; an ear question (a voice 30° in front and 150° behind a spherical head: which was in front? neither can be told: the renderings are identical); breaking the cone.
  • 7. Stereo and panning. Two channels from Ader to the stereo LP; the stereo triangle and the tangent law (a half pan sits at 13.4°); pan laws (linear: −3.01 dB in the middle); a pan heard both ways; the sweet spot; microphones for stereo.
  • 8. Ambisonics and wave-field synthesis. After quadraphony; encoding a direction (W, X, Y); decoding to a ring of eight; Gerzon's vectors (rE 0.667 basic, 0.707 max-rE); higher orders (spread 45° at first order, 11° at seventh); wave-field synthesis.
  • 9. Binaural rendering. Two signals; the filters of a head; a binaural renderer; round the head twice, heard; inside the head; head tracking; binaural on loudspeakers.
  • 10. Object audio. Channels, scenes and objects; objects in the cinema and at home; placing an object (VBAP); one mix, every playback; space as part of the music.
  • 11. Frontier: personal ears and real-time waves. Personal HRTFs; why waves are expensive (cost as f⁴); real-time waves; rooms you can program; ★ research problem: what is the least a renderer must know about a listener's ears?
  • Variation 55, recap and problems. The Tune with no room, in a small room, a shoebox hall and a cathedral, then circling the listener; the ledger (reverberation 0, 0.45, 1.9 and 5.0 s; one circle of the head in 7.6 s); what we found; five problems; where it comes back; in practice; references; Part 56.
What is computed and built

python -m videos.music.music55.compute (about two minutes; the image-source checks take the longest) fills .cache/music55/.

Item What it computes Checked against
hook, cushions a lecture room of the Fogg's size with and without cushions Sabine's law (tests)
modes, check a room's exact modes; an image-source room's response and decay Weyl's count; Sabine, Eyring and the modes (tests)
flutter, diffuser an echo between parallel walls; a residue diffuser's scattering Gauss's sum; the flat panel (tests)
halls, images early reflections and lateral fractions; image counts the closed-form count (tests)
cues, cone ITD and ILD round a sphere; front against back Woodworth's formula; identical signals (tests)
pan, ambi pan laws and the tangent law; Ambisonic decoders −3.01 dB; Gerzon's 2/3 and cos 45° (tests)
circle a shaker circling a spherical head —
tune55 Variation 55 —

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

Sounds. Part 8's voice, Part 38's plucked bass, claps, noise bursts and a shaker, placed in simulated rooms and rendered round a simulated head.

What the models are, and are not. The rooms are rectangular, with one absorption for every wall and every frequency in the image method, and a statistical tail with darker highs for the halls and the cathedral. The diffuser is computed in the Fraunhofer approximation at normal incidence. The head is a rigid sphere (Woodworth's delay and Brown and Duda's one-pole shadow), with no pinnae and no torso, which is why it cannot tell front from back and why many listeners hear its sounds inside the head. The loudspeakers of the panning demonstration are ideal sources at ±30°.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: an ear question (which was the room as built?); the decay; Sabine's nights and Symphony Hall; Philharmonic Hall; the plan.
  2. Sabine's law: a sound that dies away; the law derived; the cushions, simulated and heard; Eyring; absorption by band; targets.
  3. Modes: a pipe in three directions; a living room's modes; counting them against Weyl; the Schroeder frequency; a corner and the middle, heard; taming them.
  4. Absorption and diffusion: three absorbers; a flutter echo heard; scattering; the residue diffuser; Gauss's sum; scattering computed; at work.
  5. Early reflections and hall shapes: the first 80 ms; one seat's reflections; the lateral fraction; width; an ear question (which hall was narrow?); shapes.
  6. Simulating a room: the image method; how many reflections; the simulator checked; rays; waves; auralization.
  7. How we hear direction: the duplex theory; ITD; ILD; the cues heard; the cone of confusion; an ear question (which was in front?); breaking the cone.
  8. Stereo and panning: two channels; the triangle and the tangent law; pan laws; a pan heard; the sweet spot; microphone pairs.
  9. Ambisonics and wave-field synthesis: after quadraphony; encoding; decoding to a ring; Gerzon's vectors; higher orders; WFS.
  10. Binaural rendering: two signals; HRTFs; a renderer; a shaker circling the head, heard; inside the head; head tracking; crosstalk cancellation.
  11. Object audio: channels, scenes and objects; Atmos; VBAP; one mix, every playback; space as music.
  12. Frontier: personal HRTFs; the cost of waves; real-time waves; programmable rooms; the research problem.
  13. Variation 55: the Tune in four spaces, then circling the listener. Outro: problems, payoffs.

Covers: modes; the diffuse field; Sabine and Eyring; absorption and diffusion (and the number theory in a diffuser); early reflections and spaciousness; hall shapes; simulation by images and rays; localization cues; stereo; panning laws; Ambisonics; wave-field synthesis; binaural rendering; object audio. Built and computed: monochord/space.py: a room's modes against Weyl (18 below 120 Hz against 20.2); Sabine's cushions (5.6 to 1.1 s); an image-source room against Sabine and Eyring (a smooth box rings 14 % long) and the exact modes (within 0.4 Hz); a residue diffuser's scattering (diffusion 0.39 against 0.07 at 1 kHz); lateral fractions by hall width (0.20 to 0.11); Woodworth's ITD and Brown and Duda's head shadow; pan laws and the tangent law; first-order Ambisonic decoders with Gerzon's vectors (2/3 and 0.707); a block binaural renderer. Variation 55: the Tune walked through four spaces, then circling the listener (headphones; 0, 0.45, 1.9 and 5.0 s). Frontier: personalized HRTFs; real-time wave simulation (open: how little must a renderer know about a listener's ears?). Reading: Kuttruff, Room Acoustics; Beranek, Concert Halls and Opera Houses; Blauert, Spatial Hearing; Zotter & Frank.

Build the film

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

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

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