Portfolio / Computational Design

Room Modes

A room is a resonator. Below a few hundred hertz the air in it rings in standing waves, its modes, and they decide where the bass booms and where it disappears. Room Modes is the sibling of Cymatics: the same idea, a vibrating body with nodal lines, but the body is the air in a box and the nodal lines are surfaces in three dimensions.

Enter a room's width, length and height, or pick a preset, and set its reverberation time. Choose a speaker layout (Mono, Stereo, Quad, 5.1, 7.1 or 7.1.4), placed around the listening position at the standard angles. In the plan, drag the ear or any speaker, and click a speaker to mute it; Sub only mutes everything but the LFE, which is what bass management does below the crossover. Drag the frequency, or click the response along the bottom to tune. One mode sets the speakers aside and shows each standing wave on its own.

The room is filled with sand, as in Cymatics. Grains are thrown about wherever the air moves and come to rest where it is still, so in 3D they draw the null surfaces, and in the plan the null lines at ear height. Peaks inverts the rule and gathers the sand where the bass builds up. Grains still in flight are drawn faint. The plan can also show the Level as ink, animate the pressure as a Wave, or map the Seats. Scatter throws the sand back into the air. Tone plays the frequency on show: through real speakers, it excites the room you are sitting in, and walking about is the quickest way to find its nulls.

Modes

With rigid walls the wave equation separates in all three directions, so a rectangular room has an exact solution. Every mode is a product of three cosines, one per axis, and its frequency follows from the three indices:

ψ(x, y, z) = cos(nπx/Lx) · cos(mπy/Ly) · cos(lπz/Lz)
f = (c/2) · √((n/Lx)² + (m/Ly)² + (l/Lz)²)          c = 343 m/s

A mode with one non-zero index is axial: it bounces between one pair of walls. Two make it tangential, three oblique. In the response they are the long, medium and short ticks. Axial modes are the strongest and the easiest to hear. A pure mode's nulls are flat planes, so its 3D picture is a lattice; the curved, interlocking null surfaces in the Nulls view come from many modes ringing at once.

The driven room

A speaker excites every mode at once, in proportion to how much that mode moves the air where the speaker stands. The pressure everywhere is the room's Green's function, a damped sum over the modes. Several speakers playing the same bass in phase simply add their excitations:

p(r) = Σ_k ψ_k(r) · Σ_s ψ_k(s) / (Λ_k (f_k² − f² + i f B))         B = 2.2 / T60

Λ_k normalises each mode and B is the half-power bandwidth that the reverberation time implies. A speaker in a corner drives every mode; one on a null of a mode cannot drive it at all, and an ear on that null cannot hear it. A symmetric pair, like the stereo L and R, drives the modes that are even across the room twice over and cancels the odd ones, which is one reason multiple subwoofers are placed symmetrically: they smooth the response at the seats by leaving whole families of modes undriven.

The layouts follow ITU-R BS.775 for 5.1 (front pair at ±30°, surrounds at ±110°) and Dolby's guidance for 7.1 (sides at ±100°, rears at ±142°) and 7.1.4 (four top speakers 45° up). Each sits on a circle around the ear, pulled in from the walls where the room is too small, with the LFE on the front wall. All of them play the same signal in phase, which is the honest case for bass. Real systems delay and filter each channel.

The uniform 0 0 0 term, the pressure rise of a perfectly sealed box, is left out because real rooms leak. Only modes up to about one and a half times the frequency are summed, which is plenty for the picture.

Where it stops

The Schroeder frequency, 2000 √(T60 / V), marks where the modes begin to overlap by more than their bandwidth. Below it the room is a handful of separate resonances, and their positions matter. Above it the modes blur together into a statistical reverberant field, and ray tracing and reverberation time describe the room better than any single mode. The response greys the ticks beyond it, and the mode list stops there.

The model is a rigid, empty box. Real rooms have soft walls, doors, windows and furniture, which damp the modes and shift them, and real walls are rarely perfectly parallel. Non-parallel walls break up the degenerate pairs and triples of modes the same way a stadium-shaped plate does, which is why studios avoid square rooms: compare the Cube preset with the Studio one. For an irregular room, a finite-difference or finite-element solver, or a measurement microphone, takes over.

Seats

Seats asks a practical question: where is the bass most even? For each point of the floor at ear height it computes the response from 20 Hz to the Schroeder frequency and takes the standard deviation of the level, in dB. Ink is uneven, blank is smooth, and + marks the smoothest spot that is a sensible place to sit, away from the walls and the speaker.

Plain HTML5 canvas and vanilla JavaScript, built as a handful of web components (<room-view>, <room-response>, <mode-list>, <text-switch>, <theme-switch>), with no libraries; the 3D view is a hand-rolled orthographic projection, and the sand is the Cymatics grain model carried into three dimensions. It follows the site's light and dark themes, or the system setting.

References

  • Morse, P. M., & Ingard, K. U. (1968). Theoretical Acoustics. McGraw-Hill. Chapter 9.
  • Kuttruff, H. (2016). Room Acoustics, 6th ed. CRC Press. Chapter 3.
  • Schroeder, M. R. (1962). Frequency-correlation functions of frequency responses in rooms. J. Acoust. Soc. Am. 34, 1819–1823.
  • Bolt, R. H. (1946). Note on normal frequency statistics for rectangular rooms. J. Acoust. Soc. Am. 18, 130–133.
  • ITU-R BS.775-3 (2012). Multichannel stereophonic sound system with and without accompanying picture.
  • Welti, T., & Devantier, A. (2006). Low-frequency optimization using multiple subwoofers. J. Audio Eng. Soc. 54, 347–364.
  • Louden, M. M. (1971). Dimension-ratios of rectangular rooms with good distribution of eigentones. Acustica 24, 101–104.