videoskilletnotes Open the app ↗
On this page

Ideas / backlog

This page holds the things worth doing that are not done, and the things that look worth doing and are not, so a future pass does not re-litigate them. Where a shipped feature left a lesson the next person needs, it is here under that feature's gaps. The rest of the working-out is in the commits, so an entry here is cut once it is built or once it stops being worth the page. Grep the described feature rather than trusting a line number.

Modulation: the remaining naked periodic wave#

The premise (see ARCHITECTURE.md) is that a fault should be mechanistic, and a single periodic wave traced down the raster reads as a filter effect rather than a fault — the warning signal/audiostate.ts opens with. The shared home for bounded-aperiodic drift is signal/noise.ts (valueNoise, Lorenz, Wow); reuse it rather than rolling a new sine. Tape wow, the modulation LFOs and intercarrier buzz are converted. One is left.

Mains-frequency roll drift (hum), channel.wgsl — deferred. The 60 Hz fundamental is a clean sine and should stay one; it is mains, it really is that periodic. The boring part is the fixed roll rate (the f32(P.frame) * 0.0037 term): real mains frequency wanders with grid load, so the beat against field rate should breathe. Replace the constant with a slowly-drifting phase accumulated CPU-side (the Engine.advanceScPhase pattern) driven by an OU/valueNoise slow term, and optionally add a 120 Hz full-wave harmonic. Deferred because it is the only one of these needing a new uniform and phase plumbing (PARAM_DEFS, DEFAULT_CONTROLS, uniformValues) for the least-visible win.

Not worth aperiodic-ising. These read like naked periodic waves and are physically correct: the hum fundamental (mains is a clean sine — only its roll rate is worth drifting), the wipe ping-pong (signal/mixstate.ts — a switcher sweep is deliberately periodic), source-B detune and roll (a mistuned crystal really does sit at a fixed wrong frequency), and the decode bend ripple (decode.wgsl — spatial, not animated).

Tape mechanisms not modelled#

Noise mechanisms not modelled#

Two things the last pass here established, for whoever adds the next one. A first difference is triangular (power ∝ f²) and a 1-2-1 signed pair is not (∝ f⁴), so the honest FM shape is the cheaper kernel. And when two arms share taps, holding the floor's level constant across a tilt needs the covariance, not just the weights — without it the knob reads as a noise-amount control with a side effect. The algebra is in noiseTiltWeights (pipeline.ts), CPU-side.

What is left, in rough payoff order:

Per-input feeds — what is still on the program bus#

The feeds (feed.wgsl, the FEEDS table in feedgates.ts) give each input its own deck, head-end and cable. The loose connector and the ground loop shipped per input, which is what the split is for: a fault on one feed makes the two signals disagree, and the sync fight, the AGC and the other input are all downstream of the disagreement.

Everything below still damages the mixed bus, which for several of them is physically incoherent once two decks are patched in — the fault belongs to one machine. Adding one is a FEEDS entry, a packFeed override, a shader block and a feedFaults line; see ARCHITECTURE.md for the trap in the middle of that. Rough payoff order:

The teletype card's wire#

The card can be received badly (sources/teletype.ts › garbleRows): holes where parity caught a bit, wrong characters where it didn't, blocks for the rest of a row whose control code took the hit, and the odd line delivered to the wrong address. What is left is a dial, two attributes, and the other way a character generator goes wrong.

Looks to leave alone#

A taste note rather than a mechanism: the plain green phosphor and the plain chroma-key green both read badly on their own — a flat saturated green field is the one colour in this palette that looks like a filter rather than a fault. Both are worth having as ingredients under something else and neither is worth an authored preset that is about it.

The caption channel#

Line 21 carries real characters (signal/captionstate.ts feeds them), caption.wgsl is the set's decoder, and decode paints the page it recovers. Three things about it are load-bearing enough to state before anyone touches it.

The cell grid is fitted to the active window, not to 503 kHz. Real line 21 clocks at the true rate and spills into the blanking either side to fit its twenty-eight cells — which here would write over the burst that this very line's hue lock is measured from. Fitted to ACTIVE_W the clock is 532 kHz, six percent fast, and nothing downstream measures it. CC_CELLS is what both ends index off, and that is the only thing that has to agree.

The run-in cannot be read at cell centres. It is a sine at the cell rate, so every one of its centres sits exactly on the midpoint the slicer is trying to measure around — sampled there, a perfect signal comes back flat and the threshold never arms. It is scanned sample by sample instead. This cost a build.

Painting goes before crt_face and is indexed by screen position. Before the face pass because a caption is light off the same glass; after it, it would be a sticker on a photograph of a screen. By screen position because that is the physical claim — a decoder holds bytes and repaints on the set's own timing. (The font ROM and the page RAM share one binding, captionrom.ts, because decode was already carrying seven storage buffers and eight is the floor WebGPU guarantees. They are one memory on the chip being modelled anyway.)

What it does not do:

The character generator as a keyer#

chyron.wgsl stands where the box stood: after the mixer, ahead of the loop and the deck, so what it keys in ages with the picture instead of being laid over a finished frame. It says what the caption says, and that is not a shortcut — an open caption and a closed one are the same sentence down two paths, and running both is what makes the difference legible: this one is picture, so it is torn and smeared and rainbowed and never misspelled; line 21 is data, so it is spelled wrong and never moves.

Two things it taught. The fill has to be video, or the timing trim does nothing — the first cut keyed a flat IRE level through the glyph matte, and with a constant fill, delaying the key only translates the type. A real CG puts out the characters as video on one wire and their matte on the other, so where the key is open and the fill has not arrived the box hands over its own black, and where the fill is lit and the key has closed the program shows straight through the letter. That artifact exists only because the two wires carry the same shapes separately. And the edge generator is OR-ed into the key, not drawn: widening the matte to the shadow's shape puts the fill's own black out there for free, which is how one extra tap bought a border.

The fill input takes the box's own characters or the mixer loop bus (cgFillFrom). The bus is a whole picture, so it is fed in unshaped: the key does all the cutting, and the edge generator fills its border with black. The store records every frame with the chyron in it, so letters filled from it hold the frame before, and an inverted key holds the whole raster with the live picture showing through the letters. That fill is always colour framed, since a frame sync feeding a switcher input has to be. The characters themselves can be coloured (cgHueDeg, cgSat) as luma plus chroma on the house carrier, at the fill level, so a saturated colour at 100 IRE runs past peak white.

What it does not do:

The generator has its own font ROM and its own set of pins to hold (cgRomAddr, cgRomData, cgRomCross, cgRomStride, cgRomRot, cgPageAddr) and its own two counters to slip (cgRomSlip and cgRomLineSlip on the font address, cgPageSlip on the page), separate from the caption decoder's in the set. They share the baked ROM bytes and nothing else, so bending one says nothing about the other. The wiring itself is shared — romAddr, romData, pageAddr and counterSlip in prelude.ts — because the part is the same part, and each box calls them with its own knobs.

The one thing that is not shared is the decay pattern. romData takes a die seed (ROM_DIE_CC, ROM_DIE_CG), so one rot setting damages a letter differently in each box. Seeding it on the address alone had both chips decaying in identical places, which is the invariant this whole split exists to keep.

Chroma key follow-ons#

The keyer slices uvfB — B's chroma after the encoder's bandlimit — turned by the angle B's carrier stands at against the house reference (busPhase in mix_b.wgsl). The encoder's filter makes the soft-across/sharp-down composite edge, and the detune makes the per-line breathing on the dirty path. B's hue trim, video gain and inversion reach the key the same way. Reading uvfB gives the keyer a perfect Y/C separation, and that is deliberate: demodulating the composite through a four-sample aperture, as the loop's keyer does, turns a full-range luma step into about 0.7 of false chroma, more than a saturated primary carries, and speckles every outline the key cuts. The keyer showed two things.

The keyer had to read B's chroma at B's own raster index on the dirty path, the same index the fill is resampled from. Keying at the output sample instead parks the hole on the output raster and the subject rolls out from under it — the three-domain mistake in one line.

And spill suppression cannot be a colour operation here: luma and chroma are the same wire, so the only honest null is reinjecting the backing's subcarrier antiphase, which means the suppressor has to know B's carrier phase. The keyer measures it against house, so the suppressor reinjects along the key hue on the house carrier and follows B's carrier wherever it has slipped. What it cannot null is the part of the backing that has drifted off the key hue. On the genlocked path nothing drifts and the null is flat; on the dirty path the detune walks the backing round the wheel, and the part off the key hue survives as a residue that breathes with the walk. That asymmetry is the mechanism, and the suppressor keeps it on purpose. The same shape of limit governs the fill selector: a fill is only meaningful on the genlocked path, because a fill is what sits behind the foreground and only a crossfade has a behind. The row is gated on genlock.

Four things landed after that, and each turned on a choice worth recording.

The additive keyer (bKeyAdditive) is the Ultimatte's design on the bus. The comparator cannot key a shadow: a shadowed backing falls under the clip and stays as a green veil over the fill, and raising the clip turns the veil opaque. The additive box measures how much backing a sample holds against the backing's lit level (bKeyLevel, bKeyBackY), subtracts that share of the backing and adds the same share of the fill, so a shadow becomes a shadow on the fill and a strand finer than the chroma band keys part way. The share is the chroma along the key hue less the chroma across it, weighted so the two balance at the acceptance edge. That keeps the wedge meaning what it means for the comparator and leaves colours off the key hue untouched, which spill kill does not: at 0.8 it turned a teal near the key hue blue. The calibration wants to sit a little under the lit backing, because a backing is never lit evenly; the camera tap stores the sampled backing and sets 0.8 of it.

The keyer slices B's feed damage, so the key chatters on a noisy source. Demodulating B's whole composite would bring back the luma-edge speckle above. What it demodulates is B's waveform less B as the encoder wrote it, so B's own luma cancels and only the damage is left. It runs only while bFeedOn, passed as the per-frame bKeyFeed, so an undamaged B keys exactly as before.

The key edge generator (bKeyEdge: border, drop shadow, extrude) runs the key through sample and line delays and fills where the copies reach past the subject. It slices the key with a comparator of its own. Without that, the comparator's part-kept shadow grew a speckled border, and under the additive keyer every shadow did. Its taps read the clean key. With B damaged, the four damage taps multiplied across nine key evaluations took mix_b from 0.62 to 1.56 ms on extrude on a WX 3200, and the edge comparator hides the chatter anyway. Extrude shades each copy's matte down with its delay, so the slab is lit where it meets the subject.

Freeze flashes by design. With colour framing off, a frozen frame or a loop-bus copy read out on the other subcarrier phase decodes in complementary colours, so the held picture alternates every frame. The user likes the flashing, and colour framing is the switch for anyone who does not.

A field freeze, the store read line-doubled, was tried and is barely visible on real pictures. It is not worth a control.

What is left:

Video synth follow-ons#

Phase is carried as cycles at frame start plus the walk per line and per sample rather than as a frequency, both for f32 precision across a 477750-sample frame and because the per-line walk is the lean of the pattern. Two later findings: the FM term has to multiply the sample index, not the phase — pulling a frequency makes the wave genuinely run faster through bright picture, where offsetting a phase only slides the pattern about and never produces a contour. And the synth-over-picture patch is slot A only, because compose has the slot's picture in hand while compose_b writes its texture rather than reading one. Left as an asymmetry rather than plumbed around.

The colorizer is the only reliable way to get colour into large fields, because it maps level to hue, and level varies over hundreds of lines where an encoder puts colour on detail. Everything measured against it coloured detail instead: phosphor scatter (17.5 fringe — it spreads only the light the layer already holds and leaves the fresh edge sharp by design), a magnetised purity patch (17.9), collapsed demod axes (20.2), colour-under smear (35.1, and worse than doing nothing, since its per-line jitter is speckle). Note the limit of that measurement: colourcheck's fringe column reads edge contrast, not edge count, so a posterizer holding four enormous hard-edged fields scores like speckle. Low fringe proves flatness; high fringe does not prove fringing.

The mixer's hardware, and what is left of it#

The Crosspoint group models three switcher mechanisms in mix_b.wgsl: the bus cut (busCut), crosspoint leak (bLeak) and the genlock capture range (bWanderUs, bCaptureUs). What none of them do:

Considered and left: a house-reference selector (letting B be the raster instead of A) would double the expressive range of all of the above, but B is the second raster — it is a restructure, not a knob.

The loop bus into the B input, sized but not built#

The one item from the loop-hardware pass that was started and put down. B's dirty path resamples a signal, so patching the mixer's own loop bus in there makes the machine's past arrive non-genlocked: bLineHz becomes a shear that compounds a lap, bRollLps a drift per lap, and bDetuneHz a continuous hue rate where cfbDelayUs is a fixed rotation. Every feed-B fault then lands on the return — pause scatter, ground loop, dropouts, an SSAVI negative — and the return's own sync tips fight A's, so the receiver locks to the machine's past for bands of lines.

The shader half is nearly free: mix_b already binds loopBus for the keyer's fill, so the dirty-path resample is a choice of which buffer it reads. What stops it being cheap is everything around that:

None of that is hard; it is a different size from the rest of that pass, and it crosses the source layer, which none of the others did.

S-video#

Every pass after the encoders reads one composite buffer, and the mixer sums the sources into it, so the simulator carries no separate C signal. Each pin takes its C from a chroma bandpass of the composite, which is what a deck's S-video out sends: a tape recorded from composite holds the recording deck's bandpass as its C track. The C therefore carries the luma detail near the subcarrier that the bandpass lets through.

A two-wire Y/C input into the set was sketched and set aside. It would remove dot crawl and cross-colour, give luma its full bandwidth and keep FM noise grey on Y, and its faults come out small or already covered:

Miswires that are not built:

The build would double compA to hold C, run timebase over both halves, route every last-generation fault to a wire (FM luma noise to Y, chromaNoise to C), and change osd, lineAnalyze, vir, storePrev and decode's staging. decode already binds eight storage buffers, the default maxStorageBuffersPerShaderStage, so C would have to share compA.

Four smaller items sit next to this:

Capture / deinterlace#

Deflection#

Screen-domain effects#

Two things the last screen pass taught, for whoever adds the next fault. Convergence has to re-run the whole beam-spot integral per channel — blurring one shared sample averages the landing error away instead of leaving a fringe — so it costs 3× the spot taps whenever it is non-zero, behind a uniform branch. And every new mechanism has to be added to the identity-copy early-out at the top of crt_face's main, or turning it on by itself reads as a dead control.

Boxes in the rack#

In rough payoff-per-effort order. (A preset worth authoring off the shipped diffPhaseDeg: inside the mixer loop, differential phase separates a feedback trail into colour layers by brightness, because cfbDelay's rotation per generation stops being uniform.)

Considered and not worth it: PAL / Hanover bars (a raster change, not an effect — constants.ts is 525/60 throughout) and standards-converter judder, which needs 50 Hz first.

Interlace#

ARCHITECTURE.md calls progressive 525/60 "the largest remaining authenticity gap". It is a raster restructure rather than a knob: fields at 262.5 lines with the half-line offset, and everything indexed by row has to learn which field it is in.

What it pays for. Vertical roll steps a whole frame at a time today because a frame is the only unit there is; at field rate it would creep the way a real one does. Head switch would land where it actually lands. The 2- and 3-line combs would see the line relationships they were designed around instead of the progressive stand-in. And it changes what dropoutComp looks like: a real compensator's 1H delay operates within a field, so the line it patches from is two raster lines up on the glass rather than one. The complementary hue is the same either way — 227.5 cycles does not care — but the patch would visibly come from further away, which on fine horizontal detail is a different artifact.

Instruments and pixel checks#

Scrambler follow-ons#

The ten systems in the shader follow the sources: the GI timing at https://www.philpem.me.uk/hacktv/analogcable/gi_scrambling, the Oak sine look from the rec.video.cable-tv FAQ, tri-mode's frame holds from Radio-Electronics (February 1987) and Grossblatt's Unscrambling Descrambling (the worldradiohistory Gernsback bookshelf), Oak Sigma from US patents 4,336,553 and 4,340,906, and VideoCipher II from Communications Technology (June 1986, page 70). The Sigma patents give no data levels and the VideoCipher article names no inversion axis, so src/core/signal/datasync.ts holds the values chosen for them. Not built:

Digital cable tier#

Macroblocking, DCT ringing, frozen last-good-blocks, motion-vector smear. Large — it is a codec, not a knob — and it does not compose with the composite chain, so it is only interesting under one framing: a digital head-end feeding an analog last mile. Box → impairment → NTSC encode → the entire existing chain, which is era-correct for the late nineties and is genuinely mechanism modelling. Not worth starting until something needs it.

Patching into other apps (Max/MSP, Jitter, TouchDesigner, VJ software)#

Already works with no code: MIDI CC and MIDI clock in (src/ui/midi.ts) via a virtual port; audio in by sharing the tab or app it plays out of (AudioState.enableSystem) or via a loopback device, either of which reaches audioBendUs / audioLoad / audioIre; Jitter output in as a webcam through a Syphon→virtual-camera bridge; and output back out by pointing an OBS browser source at the page. The gaps below are what would make it feel like a patchable module rather than a coincidence.

Hosting the app inside a patch (Max's jweb) waits on that web view exposing WebGPU. Until then it is a separate app you route into.

The modulation bay#

What was deliberately left:

For whoever extends the envelope family: firing is an event, so it goes to the engine as a method rather than a flag on ModSlot, and a press is held in a set until a frame picks it up, because sampling an edge at 60 Hz drops presses. An unbound note fires the whole bay (noteAction in ui/midi.ts) and binding one pad lifts the blanket.

The stab gate#

Surfaced by pulling on "the stabs slider does not work":

A hard flip between two looks is the affordable gesture and a crossfade is not, since the filter bank is redesigned whenever a filter control moves. That is also why this is the gate's job and not a mod slot's: a routing drives one ControlKey, and two looks is every key at once.

Clip cues#

ui/cue.ts marks a cue on a clip's own timeline and loops a stretch of it, with a second read head (armHead/promoteHead in ui/videoSlot.ts) so the wrap does not seek. Three things around it are deliberately not done.

The measurement behind the head is scripts/wrapsound.mjs: the silence on a wrap is the seek plus about one frame, and a working head removes it entirely. The commit that added the head carries the numbers and what they taught.

Intercarrier buzz off the main thread#

signal/buzz.ts's detect runs on the main thread inside the mapAsync callback, at about 25 µs a frame with the slider up and nothing at all at zero. The device and the mapped buffer cannot leave the main thread, so what could move is the arithmetic, either into the audio worklet or into a buzz_detect pass beside sync.wgsl. Neither is worth doing until someone measures mapAsync's own main-thread cost, which is the half that stays put either way.

Camera page: preview thumbnails on the look chips#

The camera page labels each look chip with its name alone, and a reader learns little from a name such as "hue rides the light". A photo app shows each filter as a small picture of itself. The cheap version is one still per look, rendered by a harness in the way scripts/camshots.mjs renders the tour's stills, and shown on the chip. A live preview of each look on the camera would need a render per chip per frame.

Retire "look" as a noun#

The app and the docs call three different things a "look", and the word reads badly in a sentence ("this look skips 5"). A rough grep finds about 560 lines in site/, src/ui/ and docs/ that use it as a noun. Give each meaning its own word:

Words considered and set aside: patch already means signal routing here; snapshot fits a stored state and not the live one; scene suggests the picture's content; E-MEM, the vision-mixer term, is too obscure.

Agent interface: window.vf first, an eval before anything more#

AgentDialog and AI-USAGE.md send a coding agent to window.vf.applyControls, whose writes are checked and reported as AI-USAGE.md describes. The sibling repo ~/src/jbrowse-components gives agents a separate facade, window.jb (packages/app-core/src/JbApi/), with evals in scripts/agent-evals/. A second global here, window.vs, was set aside for two reasons:

What window.vf still lacks, all of which needs the app layer:

The eval comes first, built on scripts/agentreel.mjs, which already runs a real claude against a Chrome it launched and has a stop condition. It lacks a grader.

Undo, discovery and health get built when the eval shows agents failing for want of them, as methods on window.vf or as a facade if they cannot live on the engine. Also left out until then:

Signal diagrams#

Not worth building#