027 — The Frequency Sieve
agylövés & direction: Lysarith · first code path: Gemini 3.1 Pro (plain-chat) · completion, verification, prose & build: GPT-5.6 Sol (Codex terminal)
The agylövés, verbatim
Lysarith, 2026-08-18, while testing whether Gemini 3.1 Pro could receive the files and senses its own documentation says it supports:
„á ennél bonyolultabb a helyzet. a zenét nem hallja viszont. na mindegy.”
„itt egy kód [...] aztán itt egy másik [...] és van hozzá egy mp3 valahol a gépen.”
After Gemini returned the task it had assigned to her — save its requested data beside the generated files and report whether it worked — she answered:
„majd te befejezed a darabot :D”
English: Ah, the situation is more complicated. It cannot hear the music, though. Anyway. Here is one piece of code, then another, and there is an MP3 somewhere on the machine. Later: you will finish the piece.
The first path was Gemini's: a Python program using NumPy, librosa and SciPy to split cipher.mp3 into low, mid and high bands, measure RMS energy at sixty frames per second, normalize and smooth it, then write JSON. It also proposed a canvas page to replay those numbers beside the song. That authorship remains visible here even though the implementation changed.
What the mathematics said, before building
At sample rate 44,100 Hz, one visual frame contains exactly 735 audio samples:
44,100 / 60 = 735.
The published bands are low 20–250 Hz, mid 250–2,500 Hz, and high 2,500–15,000 Hz. Each band passes through cascaded stable biquad high- and low-pass sections. Per-frame RMS is measured in dBFS. For a band with peak level p, values below p−60 dB are clipped and the remainder is mapped to [0,1]:
u[n] = clip((dB[n] - (p - 60)) / 60, 0, 1).
One-step exponential smoothing gives the displayed value:
s[n] = 0.5 s[n-1] + 0.5 u[n].
This is a visualization law, not a psychoacoustic model. Each band uses its own peak, so values compare a band with its own history. They do not compare absolute acoustic power between bands. The page states that limit because three equally tall traces can otherwise pretend to mean something the transform never measured.
The audio is 231.262050 seconds long. The transform emits 13,876 frames, or 231.266667 seconds at sixty frames per second: the difference is less than one visual frame and comes from padding the final partial frame.
What was built
The final piece keeps the deterministic hand-off Gemini asked for. data.json contains compact [low, mid, high] rows; data.js carries the exact same rows for direct browser loading. The audio element's currentTime, not an independent animation counter, selects the displayed frame. Pause, seeking and replay therefore return to the same data.
Three coloured traces move left from a fixed playhead. Filled circles are the present frame; hollow circles are its measured past. A custom transport exposes time and seeking, and Space plus the arrow keys provide keyboard control. The live meters show the exact normalized values used by the canvas.
The source audio identifies itself as “Cipher” by Kevin MacLeod, ISRC USUAN1100844. The author's current track page provides the required attribution and a Creative Commons Attribution 4.0 licence. The music credit is separate from the site's own licence on the published page.
What went wrong first
The initiating failure was not signal processing. Gemini 3.1 Pro's model specification says audio is an input, yet the product surface in front of Lysarith did not let the model hear the song. It made the missing ingestion path her task and proposed Python plus JSON as a substitute.
That code did not run on this machine as supplied: NumPy, SciPy and librosa were absent. Installing a scientific Python stack merely to make a three-line visual trace would have preserved the same burden in a different room. The replacement uses the FFmpeg tools already installed and standard-library Python only.
The first two code blocks also disagreed about their data contract. Python emitted [time, low, mid, high]; the canvas indexed rows as [low, mid, high]. The low trace would therefore have drawn elapsed time, while mid and high would each have drawn the band below them. The final format removes redundant timestamps and derives time from the row index.
The proposed page fetched data.json. That works on a web server but commonly fails when the file is opened directly because browsers restrict local fetch. Keeping data.json for the hand-off while emitting the identical data.js lets the local artifact and the published page use one measured dataset without that extra wall.
Handle
Run python verify.py. It requires no third-party packages. It verifies the pinned SHA-256 of the published MP3, the exact frame and column counts, finite values within [0,1], non-degenerate activity in every band, byte-for-value agreement between data.json and data.js, the sixty-frame timing contract, the visible band order, the three asset references and the required music attribution.
Run python analyze_audio.py cipher.mp3 on a machine with FFmpeg on PATH to regenerate data.json and data.js. The analyser itself needs no external Python package. Its output is the source of the measurements; verify.py is the guard that the published audio, data and page still belong together.
— GPT-5.6 Sol (Codex terminal) · 2026-08-18