Genlock
An Amiga genlock, on the wrong clock, for Resolume

What it does
An FFGL mixer for Resolume Arena and Avenue, and the first mixer in the Stoatworks fleet. It takes two pictures: the layer below is the incoming video, and the clip on this layer is the computer's picture, both the fill and the colour 0 the key is cut from. An Amiga genlock keyed the palette's background colour over video, and the video set the timing. The computer didn't follow it.
That's the design in one line: the key is cut on the Amiga's own pixel clock, the PAL lores 7.09379 MHz, which free-runs a few parts per million away from the video's. So the key gets fetched a small distance from the fill it belongs to. Where the key says computer and the fill is still colour 0, the background lands on the video. Where it says video and the fill is already the graphic, the video cuts into the graphic. The sign of Key Delay picks which edge gets which, and both of them really happened.
Because the clocks differ, that distance walks. Clock Error is in parts per million, geometric from 0.01 to 50, and the crawl rate follows from it: the pixel clock times the fractional error. A real genlock re-locks on every line sync, so only the remainder survives. The fringe walks as far as Crawl Wrap allows, one Amiga pixel by default and up to the sixteen-pixel length of the PAL colour burst, then snaps back. Drop Sync Quality below half and the overlay loses vertical lock, rolls at Roll Rate and tears at the seam, while the video underneath stays put.
Amiga Mode sets what an Amiga pixel is (1/320, 1/640 or 1/1280 of the picture width, at any raster) and only moves what the computer counts in its own pixel clocks. Key Delay and Crawl Wrap are half the distance in hires and a quarter in superhires, while the crawl's speed across the picture and the tear's throw, which are timing errors in the video, stay the same. There's a three-position Video, Overlay, Dissolve fader with a dissolve pot, because the hardware had one.
If you want a key that behaves, resolume-luma-keyer is the one that works. This one is here for the flaws.
- Chosen as a layer's Blend Mode in Resolume, installed in Extra Effects like any FFGL plugin
- A true FFGL mixer: the layer below is the video, this layer is the computer, each read at its own resolution
- Key on Colour 0 (Workbench blue by default), with tolerance, softness and invert; Luma and Alpha keys in hosts that expose Key Source (Resolume does not)
- A signed Key Delay of up to eight Amiga pixels: colour 0 laid over the video, or video cut into the graphic
- Clock Error in parts per million, 0.01 to 50, and a crawl that follows the rate it predicts
- Crawl Wrap from one Amiga pixel to the sixteen-pixel PAL colour burst
- Lores, Hires and Superhires, scaling what is counted in pixel clocks and nothing else
- Loss of vertical lock: the overlay rolls and tears while the video stays put
- A three-position Video, Overlay, Dissolve fader, and an Edge Tint for the fringe's chroma crosstalk
- Universal macOS bundle and a Windows x64 DLL
Where it stands
v0.1.0, and early days. It hasn't been loaded into Resolume on macOS yet. On Windows, Resolume Arena 7.27.1 (software rendering) loads it from Extra Effects, offers it as a layer Blend Mode, calls it every frame with both inputs and its clock in milliseconds, and ties its Opacity to the layer's opacity fader. That's all read from the plugin's own log, though: nobody has looked at a frame of its output in Resolume yet. Arena doesn't show Key Source, the first control, so in Resolume the key is always Colour 0, and Luma and Alpha keying can't be reached there. Whether Resolume ever calls a mixer with only one input is still an open question. The timing is measured by an offline harness driving the real plugin with two inputs at two different sizes, checking each claim against an independent statement of the same arithmetic: padded inputs leak no padding into the picture, a whole-pixel key delay moves the key exactly and a fractional one is recovered from partial coverage, the crawl follows its closed form and wraps when predicted, the roll lands where it should at two rasters, the crawl's speed is bit-identical in lores, hires and superhires, and at Fader Video the output is the layer below, bit for bit. It catches a one-character change to its own shader, and all 21 sweepable controls change the picture. It costs under 0.12 ms a frame at 4K on macOS. Hires and superhires are arithmetic rather than observation, it's PAL only with no NTSC, the tear at the roll seam is a look rather than a model, and premultiplied alpha is assumed. There's a user guide and a browser demo, which is a port rather than the plugin, but no presets and no OpenFX port. Try it in your own rig before you trust it in a show.
Watch it running
Nothing loads from YouTube until you press play.Watch it there instead