THE FOLD / GRIND / THE HOT LOOP / THE GOERTZEL
THE GOERTZEL
one DFT bin from a tiny resonant filter
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Goertzel algorithm computes a single DFT frequency bin without doing the whole transform. It runs a tiny second-order IIR filter — s = x + 2cos(ω)·s₁ − s₂ per sample, with ω = 2πk/N — and reads the bin’s magnitude from the last two states. For one bin it costs O(N), versus O(N log N) to compute all bins with an FFT.
It is how a phone decodes DTMF touch-tones: it only needs to watch a handful of specific frequencies.
LIT verified live: over 200 random signals, Goertzel’s magnitude for every bin equals the direct DFT magnitude to ~10⁻¹³ (window.__goertzel). FIG no framing; exact single-bin transform.
It is how a phone decodes DTMF touch-tones: it only needs to watch a handful of specific frequencies.
LIT verified live: over 200 random signals, Goertzel’s magnitude for every bin equals the direct DFT magnitude to ~10⁻¹³ (window.__goertzel). FIG no framing; exact single-bin transform.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-hot-loop — a tight real-time loop watching for one specific tone, sample by sample, cheaply. Goertzel is that hot loop. AVAN (AI) built the instrument: the second-order recurrence, the magnitude read-out, the direct-DFT cross-check.
Credit as content: Gerald Goertzel (1958). The weave: David names the hot loop; I run the one-bin IIR filter over the samples and confirm its magnitude matches the full DFT’s value for that frequency.
Credit as content: Gerald Goertzel (1958). The weave: David names the hot loop; I run the one-bin IIR filter over the samples and confirm its magnitude matches the full DFT’s value for that frequency.
3 ONE DIMENSION
The samples stream in; the filter’s single state s accumulates, tuned to resonate at frequency k. Two final states give that bin’s magnitude.
4 TWO DIMENSIONS · INTERACTIVE
A signal (sum of a few tones). Pick a bin k; Goertzel returns its magnitude, checked against the full DFT spectrum shown behind it.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: one bin’s magnitude, computed by a tiny resonant filter.
AVAN’s addition (the inverse-companion): if you only want one frequency, you do not need the whole transform. Goertzel is a second-order filter tuned to bin k, costing O(N) for that single bin instead of O(N log N) for all of them. The inverse of ‘transform everything’ is ‘filter for the one tone you care about.’ Magenta is the N−1 bins you never compute; green is the single bin’s magnitude. Targeted, not total — the reason touch-tone decoders run on the humblest hardware.
LIT Genuine Goertzel algorithm (Goertzel 1958). Verified live: the second-order recurrence's single-bin magnitude equals the direct DFT bin magnitude to max error ~1e-13 across 200 random signals and all bins (window.__goertzel.matchesDFT).
FIG No framing: the IIR recurrence, the magnitude read-out, and the direct-DFT cross-check run in-browser and match to floating precision. The AVAN inverse is honest — for one frequency you need not transform everything; a tuned second-order filter gives that bin in O(N); magenta is the N-1 bins never computed, green the single bin. Targeted, not total (DTMF decoding).
FIG No framing: the IIR recurrence, the magnitude read-out, and the direct-DFT cross-check run in-browser and match to floating precision. The AVAN inverse is honest — for one frequency you need not transform everything; a tuned second-order filter gives that bin in O(N); magenta is the N-1 bins never computed, green the single bin. Targeted, not total (DTMF decoding).
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOT LOOP · David Lee Wise (ROOT0), with AVAN