Audio DSP postmortem

I replaced a broad spectral gap with adaptive 1–3 Hz notches

DNEQ began with a plausible but wrong assumption: that binaural carrier separation required clearing the energy between the two tones. The result protected the numbers and damaged the music.

Web Audio APIstereo DSP48 kHz validation
DNEQ 1.0 and 2.0 comparisonA broad removed region between carriers in version 1 is replaced by two narrow, channel-independent dips in version 2.DNEQ 1.0 — broad subtractionsource character removedDNEQ 2.0 — adaptive, per-channel carvingL carrierR carrier

The first design was too aggressive

DNEQ 1.0 removed a wide area around the carriers, including much of the spectrum between them. I expected that empty region to make the left/right pair easier for the auditory system to resolve. That was the mistake. The carriers need to remain audible and independently delivered; the entire interval between their frequencies does not need to be erased.

The failure was obvious on real material. YouTube audio and local music lost body and spatial coherence. Some tracks took on a hollow, oddly reverberant character—like hearing them in the wrong room. A frequency plot could make the first version look “clean,” while listening revealed that it was not source-faithful.

Version 2 changes the topology, not just the amount

DNEQ 2.0 splits the stereo background into two lanes. The left lane receives one peaking-EQ cut centered on the left carrier; the right lane receives one centered on the right carrier. The generated binaural carriers merge after those filters, so DNEQ never attenuates the signal it is intended to expose.

background → split(L/R)
L → adaptive peak-EQ cut @ fL ┐
R → adaptive peak-EQ cut @ fR ├→ merge background → add carriers → output
generated carriers ───────────┘

Q = carrier_frequency / configured_width
cut = max_cut × clamp((34 dB − measured_SNR) / deficit_span, 0, 1)

If the measured lane S/N ratio is already at or above 34 dB, the cut is 0 dB. As masking pressure rises, the cut moves smoothly toward the selected mode’s ceiling. It is a conditional carve, not a permanently imposed tonal signature.

What the Web Audio implementation actually measured

I validated the production filter topology in Chromium’s Web Audio implementation at 48 kHz using the 263/249 Hz preset. The figures below show the full-cut case; normal operation is often shallower because the gain is S/N-controlled.

ModeWidth / max cutHalf-depth widthCut at +10 HzPink-energy change
Mild1 Hz / −5 dB1.00 Hz−0.014 dB−0.0034 dB
Strong3 Hz / −10 dB3.00 Hz−0.28 dB−0.018 dB
Ultra3 Hz / −15 dB3.00 Hz−0.52 dB−0.026 dB

Pink-energy change is the integrated 20 Hz–20 kHz response of one lane, weighted by 1/f. It describes broadband energy preservation, not perceived audio quality.

In Strong mode, the measured half-depth width was 3.00 Hz. At ±10 Hz from the carrier, attenuation was about 0.26–0.28 dB. Integrated pink-weighted energy changed by roughly 0.018–0.019 dB per lane. That is the measurable difference between removing a region and making a small, local pocket.

The CPU cost is small, but the benchmark has limits

Five Chromium offline renders of 60 seconds of stereo audio took 22.6 ms on average without DNEQ and 85.8 ms with the Strong split/filter/merge graph on the test machine. The delta—about 63 ms for one minute of audio—is roughly 0.1% of the real-time duration. Offline rendering is not a substitute for device-level profiling, but it indicates that two biquads are not the performance bottleneck.

What neuroscience supports—and what it does not

Binaural-beat perception is associated with phase-sensitive binaural processing in brainstem pathways including the superior olivary complex. Auditory-nerve responses to tones in noise also depend on the tone-to-masker relationship, and frequency-adjacent maskers can raise detection thresholds. Those findings support the engineering goal: preserve the carriers and reduce competing background locally.

They do not prove that this particular 1–3 Hz carve strengthens a binaural beat, phase locking, or an auditory steady-state response. Binaural-beat EEG findings are mixed, and ASSR research often uses physically amplitude-modulated stimuli, which should not be treated as interchangeable with binaural stimulation. DNEQ 2.0 has been verified as an audio filter. Its perceptual and electrophysiological consequences remain testable hypotheses.

The next validation

The next useful step is not a stronger claim. It is a controlled listening test: DNEQ off versus 1 Hz and 3 Hz carving, level matched, randomized, and tested across speech, dense music, pink-noise beds, and several carrier pairs. If there is a repeatable improvement in carrier detectability without a preference penalty for the source, then EEG or FFR/ASSR measurement becomes worth considering.

References and reproducibility

Validation environment: Microsoft Edge/Chromium Web Audio, 48 kHz, BiquadFilterNode “peaking” filters, five 60-second offline render runs. This is an engineering note, not a medical or therapeutic claim.

DNEQ 2.0: replacing a broad spectral gap with adaptive narrow notches