Extending the gate with a narrow-band filter bank — an alternative to tail fitting, evaluated

Demo 6 of the gating primer extends a too-short gate by fitting the decaying tail, in the time domain, as one damped sinusoid. This page evaluates a different route to the same goal: run the gated measurement through a bank of very narrow bandpass filters, watch the unnatural energy decay the gate leaves in each band, reconstruct the “true” decay there from a theoretical assumption, and let a dense-enough bank reassemble the whole response. Same style, same synthetic speakers, same honest bookkeeping — including where the idea breaks.

Credit: the idea evaluated here was proposed by diyAudio user mabat in the thread “Acoustic Horn Design — the easy way (ATH4)”, post #8360102 — narrow-bandpass filters to expose the gate’s per-band decay, a modeled reconstruction of the true decay, and a dense bank to reassemble the response. This page is a controlled test of that proposal.

Everything runs on the identical “Demo 6 speaker” as gating.html (fast mid/treble modes plus one slow 68 Hz port-like tail, τ = 11 ms, floor reflection at 14 ms), plus a second, harder speaker with two overlapping bass decays. The red 1/T markers on the reconstruction plots are draggable.

The proposal under test

The idea, stated precisely:

  1. Look at the gated measurement through very narrow bandpass filters. In each band the gate leaves a visibly unnatural energy-decay curve: it follows the speaker for a while, then bends away when the data runs out.
  2. Reconstruct the “true” decay in each band using a theoretical assumption about how a band should decay — here: one resonance per band, i.e. an exponentially decaying sinusoid.
  3. A dense-enough bank of such bands could reconstruct the whole response — extending the gate in software, band by band, exactly where the gate was too short.

The page answers four questions, one demo each:

  1. Q1 — What does gating actually do inside one narrow band? Demo 2
  2. Q2 — Can the true decay of a band be reconstructed from its uncontaminated part? Demo 3
  3. Q3 — Does a dense bank reconstruct the whole response? Demo 4
  4. Q4 — Does the bank beat Demo 6’s single global tail fit — and what does it cost? Demo 4 & 5

All signals are synthetic impulse responses at fs = 48 kHz, spectra by direct DTFT (≡ zero-padded FFT). The filters are zero-phase Gaussian bandpasses of bandwidth σf; the bank is analyzed with exact perfect-reconstruction normalization (overlap-sum division), so the sum of all bands is exactly the gated data.

Demo 1 — A narrow bandpass is long in time: the filter’s memory

Before touching the measurement, look at the tool. A bandpass of bandwidth σf has an impulse response that rings — a carrier at the center frequency under a slow envelope — with e-folding time

σt = 1 / (2π·σf)

That σt is the filter’s memory: its output at time t mixes ≈ 2–3·σt of data from both sides of t. This is the same uncertainty-principle seesaw as the gate itself — narrow in frequency means long in time — and it will set every limit in the demos below:

15 Hz
bandpass kernel in time — one filter at 68 Hz (shaded: its ±2σt memory)
the same filter in frequency — |H(f)|: narrow in frequency ⇒ long in time

Top: the filter’s own impulse response (a 68 Hz carrier under a Gaussian envelope; shaded ±2σt). Bottom: its spectrum. Squeeze one and the other stretches — try it. A 10 Hz bandpass “remembers” for ±16 ms: longer than the entire 13 ms gate this page has to work with.

Demo 2 — Q1: the unnatural decay the gate leaves in a band

Now filter the gated room measurement (same IR as gating.html’s Demo 6: slow 68 Hz tail, reflection at 14 ms, gate closed before it) with one bandpass and plot the band’s energy envelope. White dashed is the envelope of the same band applied to the true (reflection-free) response — what the band would show without any gate at all:

68 Hz
20 Hz
10.00 ms
Predict before sliding the bandwidth: you make the band twice as narrow. What happens to the decay you observe?
energy decay inside one band — gated measurement vs the true (ungated) decay
band envelope of the gated measurement band envelope of the true response (dashed) contamination start ≈ T − 2.5σt gate end

The answer to Q1, made visible: the two envelopes coincide while the filter still has real data on both sides of “now”, then the gated one bends off — first gently, then onto the filter’s own ring-out. Past ≈ T − 2.5σt the band is reporting the filter, not the speaker. Narrowing the band (more frequency detail) stretches σt and moves that bend earlier — the “very narrow” part of the proposal is exactly the part that fights the gate.

Demo 3 — Q2: reconstruct the true decay of one band

The reconstruction assumption, stated explicitly: inside this band the loudspeaker contributes one resonance — a one-sided damped sinusoid starting at the impulse, u(t)·e−t/τ(A·cos 2πft + B·sin 2πft) — so the band signal must be the bandpass applied to exactly that (rise from the onset included). The fitter sweeps frequency near the band center and decay time together, least-squares, against the uncontaminated window [tA, T − c·σt] — then the fitted decay is simply extrapolated past the gate:

60 Hz
2.00 ms
1.0σt
13.00 ms
one band: the measured decay, the fit window and the extrapolated fit
band envelope of the gated measurement true band envelope (dashed) fitted decay, extrapolated (dashed) fit end = T − c·σt

The answer to Q2 is “yes — with a catch”: when the filter’s memory fits inside the gate, the true per-band decay is recovered from a few milliseconds of clean data, and the extrapolated envelope runs straight onto the white truth. The catch is arithmetic: the fit window is T − c·σt − tA long, and it must hold enough of the decay to measure. Narrow the band and the window empties (the filter eats the gate); shrink c and the last samples of the window are already bent by the missing tail, biasing τ. Either way the seesaw collects its fee.

Note also that the fit is a model fit, not a peak-pick: the band’s content at 68 Hz is too short-windowed for spectra to show a clean peak — the assumption “one damped sinusoid per band” is doing the work, exactly as it does in Demo 6.

Demo 4 — Q3: a dense bank reconstructs the whole response

One band is an analysis tool; a bank is a reconstruction method. Bands from 30–300 Hz (where the tail lives — above it everything decays inside the gate anyway) are analyzed with perfect-reconstruction normalization, so they add back up to exactly the gated data. Each non-silent band is fitted as in Demo 3; past the contamination start, the gated samples are replaced by the sum of the fitted per-band tails, out to the effective gate — then the spectrum is computed. For comparison, the orange curve is gating.html’s Demo 6 method: one global pole fit on the visible tail (window 3 ms → gate end).

40 Hz
13.00 ms
1.00 ms
1.0σt
60 ms
frequency response — gated data, Demo-6-style fit, bank reconstruction, truth
real data only (gated at T) Demo-6-style global tail fit true response (dashed) bank reconstruction 1/Teff (draggable)

The answer to Q3 is yes — for this speaker. The grey curve shows the classic damage: the 68 Hz port bump smeared beyond recognition by the ≈ 1/T = 77 Hz kernel. The blue curve is built from per-band exponential decays, each fitted from ≈ 8 ms of clean data, and converges onto the dashed truth as the effective gate grows. Try sparse spacing: the overlap sum is no longer flat, so the bands stop adding back up to the signal exactly. This speaker gets away with it — its tail has only one frequency, so the gaps fall where nothing is decaying — but whenever there is still decaying energy between the band centers, sparse spacing leaves un-modeled gaps and phantom peaks. “Dense enough” is not optional; critical spacing (Δf = σf) is already enough for exact reconstruction.

Q4, first half: when the tail genuinely is one decay, the bank is a lot of machinery for what a careful global fit does more simply — compare the orange and blue errors in the readout. Its case must be the situation the global fit cannot handle at all: more than one decay in the tail. That is Demo 5.

Demo 5 — Q4: two overlapping bass decays — where the bank is supposed to shine

A harder speaker: the same mid/treble front end, but now two overlapping slow bass decays — 60 Hz (τ = 11 ms, the “port”) and 130 Hz (τ = 5 ms, a box/board resonance), 70 Hz apart. The time-domain tail of this speaker is not one damped sinusoid: Demo 6’s single global fit has nothing correct to converge to. Surely the bank — fitting each band on its own — separates them?

40 Hz
13.75 ms
1.00 ms
1.0σt
60 ms
frequency response — gated data, Demo-6-style fit, bank reconstruction, truth
real data only (gated at T) Demo-6-style global tail fit true response (dashed) bank reconstruction 1/Teff (draggable)

The honest answer to Q4. Separating two decays needs bands narrower than about half their spacing — here σf ≲ 35 Hz — while fitting cleanly inside the gate needs the filter memory to fit in the fit window — here σf ≳ 40 Hz. The two requirements contradict each other: with a 13.75 ms gate, 70 Hz of separation is right at the edge of what the seesaw allows, and the bank’s low bands end up fitting mixtures. Narrow the band to separate the modes and the fit windows empty; widen it to make the windows work and each band contains both modes. Slide σf and watch the trade bite from both sides.

Note what this means: the failure is not the fitter’s — it is the same statement as gating.html’s Demo 4, in filter-bank clothes. Below ≈ 1/T of the longest clean gate, the data does not determine the answer; a bank reorganizes the assumption, it does not add data. For bass like this, ground-plane or nearfield measurement remains the honest route.

Verdict — what the filter-bank extension is, and what it costs

QuestionFinding
Q1 — what does gating do inside one narrow band? The band envelope follows the true decay only while the filter has data on both sides of “now”; from ≈ T − c·σt onward it bends onto the filter’s own ring-out. The “unnatural decay” is real and sharply localized in time. (Demo 2)
Q2 — can the true band decay be reconstructed? Yes, by fitting the bandpass applied to a one-sided damped sinusoid (not a bare damped sinusoid — the filter shapes the band signal) on the uncontaminated window. Works when σt = 1/(2πσf) fits inside the gate with window to spare; both “too narrow” (window empties) and “too greedy” (margin too small → biased τ) fail. (Demo 3)
Q3 — does a dense bank reconstruct the whole response? Yes. A critically spaced (Δf = σf) Gaussian bank is a perfect-reconstruction decomposition; splicing each fitted tail extends the whole low-frequency range — 1.1 dB error at 68 Hz vs 3.2 dB for the raw gate on this page’s speaker. Sparse spacing breaks the sum. (Demo 4)
Q4 — does it beat a single global tail fit? Not where they overlap: when the tail is one decay, a careful global fit is simpler and at least as accurate. The bank’s unique promise — separating overlapping decays — collapses under the seesaw whenever their spacing is below ≈ 2·σf,min, the narrowest bandwidth the gate can afford. (Demo 4 & 5)

Strengths

  • Localized assumption. Each band needs only “one decay here”, not “the whole tail is one decay” — the right architecture for tails that change character with frequency.
  • Exact bookkeeping. Perfect-reconstruction analysis: with the model switched off you get exactly the gated data back; the extension is auditable band by band (fits, R², skip counts).
  • No fit-window art for the direct sound. Bands reject out-of-band content, so fit windows can start earlier than a global fit’s can.
  • Degrades gracefully per band — silent bands are skipped, weak fits (R² < 0.95) are refused rather than synthesized.

Weaknesses

  • The seesaw, twice. Narrow band ⇒ long memory ⇒ less uncontaminated window; and a short window cannot identify slow decays. “Very narrow” filters are precisely the ones that don’t fit in a gated record.
  • Model error replaces truncation error. Below ≈ 1/T nothing is measured — the bank swaps a known smoothing for an assumption, with the same epistemic status as Demo 6’s tail.
  • Overlapping decays within one bandwidth are not separable — the fit confidently absorbs the mixture into wrong parameters (high R², wrong τ), injecting plausible-looking wrong bass.
  • More machinery — a bank, a per-band nonlinear fit, a phantom guard — for cases a global fit often covers.

What this method actually is: frequency-dependent gating — a Gabor/STFT-style decomposition — combined with per-band modal extrapolation. It is the “advanced” route gating.html points at, made concrete: it redistributes the 1/T trade across frequency instead of applying one global gate, and it moves the model assumption from global (one tail) to local (one decay per band). It does not break the time–frequency limit: every dB of recovered bass is paid for by an assumption about how that bass decays, and the assumptions available per band are exactly as strong as the gate lets them be.

✗ Myth — “narrow filters beat the gate’s resolution limit”
The filters add no data — they re-localize what the gate already passed. Any detail finer than ≈ 1/T in the reconstruction comes from the decay model, not from the bandwidth. Where the model is right (one clean decay per band) the bank recovers it; where it isn’t, the bank manufactures confident error. The resolution floor is still set by the gate.

Check your understanding

Five claims — commit to true or false before reading the feedback.