Stoatworks Labs

Clamp

A video amp whose clamp has given up, for Resolume

Betav0.1.0Plugin & ModuleC++ / GLSL
Clamp — A video amp whose clamp has given up, for Resolume
Clamp

What it does

An FFGL effect for Resolume Arena and Avenue. Video amplifiers were joined together with capacitors, and a capacitor doesn't pass DC. The picture's black level is DC. So a clamp put it back every line, a switch that pulled the signal to a reference in the back porch. When the clamp's weak or dead, the coupling capacitor becomes a high-pass filter on the whole raster.

Clamp puts the host's frame in as the active picture of a real 625/50 or 525/59.94 field, with sync, back porch, picture, front porch, the blank lines and the half line, all in real time, and runs that one RC through the lot in time order.

Everything you'd recognise comes out of that. Black wanders with the picture content, because the average over the time constant gets forced to the reference, so a bright scene pushes black down and a dark one lifts it. A bright moment darkens the next one, which then recovers along the RC's curve. Lines tilt across their width when the time constant is close to a line, and fields tilt top to bottom when it's close to a field. A healthy clamp takes all of that out, apart from the little bit its own switch leaves behind.

Two separate things sit on top of that. The supply sags with the average picture level and recovers on its own time constants, so the gain breathes with the content, and an optional triode stage clips hard at cutoff and softly where grid current loads the source. Show Blanking draws the whole field, porches and all, as a raster.

  • One RC coupling run through every line and blanking interval of a real field
  • 625/50 and 525/59.94 timing, per channel or on luma alone
  • Clamp Health from dead to perfect, and a Clamp Reference
  • Supply sag with its own attack and recovery
  • A triode stage with bias and drive
  • Show Blanking: the whole field, sync to vertical blanking
  • 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 it has: a build loads, registers and renders in Resolume Arena 7.27.1 on software rendering (no GPU), with every parameter as declared. Sag Attack and Sag Recovery couldn't be seen moving there, because the check's picture is a still whose level never changes. The amplifier is checked by an offline harness driving the real plugin: after a burst of white, black falls back on exp(−t/τ) with fitted time constants of 63.998 µs, 20.000 ms and 0.99999 s against 64 µs, 20 ms and 1 s, the tilt across a line and the shift with APL match their closed forms, the clamp leaves e^−n of the error behind each porch to six places, and every pixel matches a serial double-precision run of the same timeline to within 2.3 float ULPs. It catches sixteen models that are wrong on purpose and a one-character sabotage of its own shader, and all 13 swept controls change the picture. It costs 0.82 ms a frame at 4K on macOS at the defaults. The triode stage and Show Blanking are looks, only checked for being alive. There's a user guide and a browser demo, but no presets and no OpenFX port. Try it in your own rig before you trust it in a show.

Watch it running

Clamp video thumbnail

Nothing loads from YouTube until you press play.Watch it there instead