Turning down one bass note on a Mac
4 min read
Most rooms have one bass note they love too much. Sound bounces between parallel walls, and at certain frequencies the reflections pile up on each other. Sit in the wrong spot and a single note, somewhere between 40 and 250 Hz, comes out much louder than everything around it. The comment I left in the filter code says room booms "typically stand 10–15 dB above their surroundings."
The usual fixes don't fit that problem. A bass slider turns down every low note to tame one. A full room-correction suite asks you to understand frequency response graphs and Q values. I wanted the opposite: find that one note, cut only that, and stay out of the way. That became Unboom.
Finding the boom
The scan plays a 14-second logarithmic sweep from 40 to 250 Hz and listens through the Mac's microphone. There's no FFT. At each moment the detector knows exactly which frequency it's playing, so it measures just that frequency with a few narrow probes on either side, and compares it against noise read at unrelated frequencies.
Before that, two checks run. The scan waits for a quiet two seconds in the room. Then a short looping sweep sets the level: the tone has to land between -45 and -10 dB at the mic, twice in a row, within 3 dB of itself. Readings with less than 12 dB of signal over noise get thrown away. If more than 15% are noisy, the scan is rejected instead of guessing.
From the clean curve, the analyser looks for a peak that rises above its neighbours by at least 2.5 dB. How far it rises picks the strength: Gentle (-6 dB), Medium (-9 dB) or Strong (-12 dB). If the room has a second, smaller boom, a second cut can handle it, as long as it's far enough away that the two don't stack into a hole.
When the scan can't hear clearly, there's a manual fallback: the sweep plays and you press "That's the boom" when you hear it. If the mic is on, the press snaps to the nearest real peak. If not, it steps back 0.3 seconds plus the output latency, because that's roughly how late a human presses.
Correcting every app
Fixing audio for every app on a Mac used to mean installing a virtual sound driver. macOS 14.2 added process taps to Core Audio, which made a cleaner route possible:
- a private tap captures the system mix and mutes the original,
- one audio unit reads the tap, another plays to the real speakers,
- a lock-free buffer sits between them,
- a cut-only peaking filter does the actual work.
The tap leaves out apps where a delay would hurt: music production apps, anything recording from an input, VoiceOver. Any tap-based route adds latency. I measured it at about 45 ms, which is fine for music and video and wrong for someone tracking guitar.
The rule: never go silent
An app that sits in the audio path can do something worse than sound bad. It can make the Mac go quiet. So the whole design hangs on one rule: if anything goes wrong, you hear your original audio.
Because the tap mutes the source while it's active, a crash or quit hands audio straight back to macOS. A health monitor checks the route every 0.75 seconds. If capture keeps moving while playback has stopped, or the other way round, for about two seconds, it releases the tap and retries after 2, 5 and 15 seconds. Turning correction off fades the cut out instead of switching it, so there's no click.
Bugs that earned their tests
The worst ones, from the commit log:
- Silence at 44.1 kHz. The tap ran at 48 kHz, the speakers at 44.1, and every render call failed while the tapped apps stayed muted. Now the route matches the output's rate and refuses to start on a mismatch.
- Dropouts every two or three minutes. The two sides of the bridge run on different clocks, so the buffer slowly drifted. The fix was an adaptive buffer that grows after a dropout, shrinks after ten clean minutes, and corrects drift with short, phase-aligned splices.
- Two copies of the app correcting each other. Now only one copy routes audio.
- Sleep, wake and sample-rate changes. These rebuild the route from scratch, and a failed rebuild leaves macOS in charge.
Each of these became a test. There are over a hundred, with names like testPlaybackStallReleasesTheTap and testFailedRebuildLeavesMacOSOutputRestored, running against fake devices that fail on command. The rest is a hardware checklist: kill -9 mid-song, unplug the USB interface, switch to AirPods.
Hiding the numbers
None of this shows up in the interface. It's a menu bar app with one on/off switch, a room scan, and three strengths. Profiles follow the output device, so switching from speakers to headphones does the right thing. The original plan for the app had one idea in bold: extreme simplicity. Everything above is what that costs.
Unboom is on the Mac App Store with a 14-day trial. If you'd like to hear your room's boom first, the Boom Finder runs the same sweep in your browser, no download.