f_crossover
Splits an image by spatial frequency, the way an audio crossover splits a signal: a high band (fine detail), a mid band and a low band (broad shapes). In Split mode the processed outlet is their sum, which equals the input, and the Low, Mid and High dials are gains on the three band outlets; in EQ mode the dials are gains on the bands inside the processed outlet (clamped to 0 to 1) and the band outlets stay raw. It is a forward chain with no frame delay.
Written 2026-11-25 (Claude, offline) from src/f_crossover/{definition.py,stages.py,codebox_blur.gen,codebox_split.gen}, .specify/stable/f_crossover/ and the bench logs under "Status". Not looked at in Max yet.
Inputs and outputs
| Port | Type | What it is |
|---|---|---|
| Inlet 1 | texture + control | the source. With nothing connected the module sees black |
| Outlet 1 | texture, float32 | processed. Split: high + mid + low (= the input). EQ: gain_high*high + gain_mid*mid + gain_low*low, clamped 0 to 1. Bypass: the source |
| Outlet 2 | texture, float32 | low: the second (coarsest) blur itself, times gain_low. Bypass: the source |
| Outlet 3 | texture, float32 | mid: first blur minus second blur, times gain_mid. Signed, unclamped. Bypass: the source |
| Outlet 4 | texture, float32 | high: source minus the first blur, times gain_high. Signed, unclamped. Bypass: the source |
Output is the render size. R, G and B are filtered separately; alpha is 1 on every outlet (the source's alpha in bypass). Outlets 3 and 4 (mid, high) hold negative values unless Norm is on: downstream @type char modules (vs_vca, vs_mixer_3, vs_3bandsplit) clip them, so use outlet 1 to rejoin the rest of Vsynth and the band outlets for float32 (f_) chains.
Parameters
| Control | Range | Meaning |
|---|---|---|
| Mode | Split, EQ | what outlet 1 carries |
| Low X | 5 to 128, default 8 | crossover between low and mid, cycles per frame width (a pattern with this many stripes across the frame splits half and half). Same value, same look at any render size and aspect |
| High X | 5 to 128, default 32 | crossover between mid and high, same units. If the two cross they are ordered; equal values leave the mid band empty |
| Low, Mid, High | 0 to 4, default 1 | gains, linear (1 unchanged, 0 removed, 4 four times; range was 0 to 2 until 2026-11-26). Scale the band outlets in both modes; in EQ they also weight the bands in outlet 1 (Split's outlet 1 stays the input). Changed 2026-11-26 (Claude, offline, at Matt's request): before, Split ignored them |
| Norm | Off, On | On adds 0.5 to the mid and high outlets (0.5 = no detail) so their negative half survives char modules; low is left alone. Bands no longer sum to the input while it is on. Added 2026-11-26 |
| Bypass | source on every outlet; the blur stages skip their work |
How it works
A blur ladder, then differences: level 1 = blur(source, s_hm), level 2 = blur(level 1, extra) so the total is s_ml; high = source - level 1, mid = level 1 - level 2, low = level 2. The sum telescopes to the source whatever the blur (outlet 1 in Split is the source to about 6e-8, bench). The crossover maps to a Gaussian sigma in pixels, s = sqrt(ln 2 / 2) / (pi f) with f = cycles / width_px (about 0.187 / f): the half-amplitude (-6 dB) point, where the low-pass and its complement are equal. Sigma is clamped to at least 1 px and is the same in x and y, so the blur is round at any aspect.
Each level is a doubling Gaussian cascade (spike scheme A2): passes of sigma 2, 4, 8, ... and one pass for the remainder, 15 taps per wide pass. The patcher has 12 blur pix (2 levels x 3 horizontal then 3 vertical; each pix does two cascade passes as one sampled Gaussian on the first pass's tap lattice) and one split pix (13 in all, restructured 2026-11-25 from 29, then 17, because the cost is per pix); each blur pix computes its pass variances in closed form from the dials and the render width, so a stage with nothing left to do copies its input. Capacity: sigma up to about 74 px per level, so the crossover dials start at 5 cycles per frame width (5 cycles is sigma 72 px at 1920 wide; on a wider render the lowest crossover is effectively raised, inferred). The edge is mirrored by hand reflection read with boundmode="clamp" (native mirror wraps on y, bench 2026-11-25).
Status
Mirror:
tests/modules/crossover/(21 exact-Gaussian tests plus the A2 mirror incrossover_mirror.py).Bench (live, Claude, 2026-11-25):
bench_crossover.py11/11 including 1920x1080 (tests/logs/20261125-192121-bench.log). GPU chain against the A2 mirror 2.9e-6, one stage 1.3e-4, low band against the exact Gaussian 9.5e-5; high + mid + low = the input to 6e-8; impulse spread equals sigma_ml within 0.11% and is round at 640x360 and 1920x1080; a cosine at the low crossover is split 0.4996 / 0.5004 at the two sizes (expected 0.5). Contract bench for f_crossover 2/2 (tests/logs/20261125-193018-bench.log).Cost (module bench, Claude, live, 2026-11-25,
bench_crossover_module_cost.py): 29 pix 30 to 65 ms; 17 pix 16.8 ms at defaults; 13 pix (now) at 1080p Split 8/32 16.5 ms, EQ 17.2 ms, largest radius 17.2 ms: at the bench's 16.7 ms cap, so within the frame budget but not resolved below it. Unexplained noise: 1080p bypass 60 ms, 4K Split / EQ 56 ms (4K largest radius and bypass 16.4 to 16.9 ms). Target 16 ms at 1080p (Matt): ACCEPTED AT THE CAP by Matt, 2026-11-25 (gate G-crossover-cost closed; the bench cannot resolve below 16.7 ms).Not done: T060's bench half. The helpfile and Matt's live look are done (look passed 2026-11-25, no details; the look predates the 17-pix restructure).
Changed 2026-11-26 (Claude, offline): Split-mode gains on the band outlets (
codebox_split.gen, mirrorsplit_stage, bench case intest_split_modes). Not run, not looked at in Max. Also 2026-11-26 (Matt's go): outlets reordered to processed, low, mid, high (dial order; were processed, high, mid, low), gain max 4, manual Norm menu (+0.5 on mid and high). An automatic peak normalizer was not built. Nothing run, not looked at in Max; the helpfile text was updated offline.Revised 2026-11-26 (Matt): gains scale the band outlets in both modes; Mode only picks the composite (Split plain sum, EQ scaled sum clamped). Replaces the Split-only rule above. Nothing run.