Skip to content

Releases: stoatworks-labs/clamp

Release list

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 00:02

A video amplifier whose DC restoration has failed, as an FFGL effect for Resolume Arena and Avenue, shown as SW Clamp. Video amplifiers were joined by capacitors, and a capacitor does not pass DC. The picture's black level is DC, put back every line by a clamp, a switch that pulled the signal to a reference in the back porch. When the clamp is weak or dead, the coupling capacitor is a high-pass filter on the whole raster. Clamp places the host's frame as the active area of a real 625/50 or 525/59.94 field, with sync, porches, the blank lines and the half line in real time, and runs that one RC through all of it.

Nothing is drawn: black wanders with picture content, a bright moment darkens the next one, lines tilt when the time constant is near a line and fields tilt when it is near a field, and a healthy clamp takes it all out but for the residual its own switch leaves. On top, the supply sags with average picture level and recovers on its own time constants, and an optional triode stage clips hard at cutoff and softly where grid current loads the source. Show Blanking draws the whole field as a raster.

What is verified

By tools/verify.sh on an M4 Max, macOS 26.4.1, on 2026-09-23, at two rasters (320×180 and 1280×720), both standards throughout:

  • After a burst of white, black falls back on exp(−t/τ) with every blanking interval counted: fitted τ 63.998 µs, 20.000 ms and 0.99999 s against 64 µs, 20 ms and 1 s.
  • A flat field tilts 0.555906 across a line at τ of a line, as stated; black moves 0.7481 per unit of APL at τ = 1 s against the steady state in closed form.
  • The clamp leaves e^−n of the error behind each porch, to six places, at 0.02, 0.2 and 2 time constants a porch.
  • Every pixel of ten frames at four settings matches a serial double-precision run of the same timeline to within 2.3 float ULPs, against a derived bound of 57–83; six host rates, from 23.976 to 144 fps, lie on one continuous trajectory.
  • The supply's gain follows an APL step with fitted attack 0.040 s and recovery 0.200 s, as stated.
  • Sixteen perturbed models each fail their check, and one character changed in the shipped GLSL is caught.
  • All 13 sweepable controls change the picture; oxbow loads it as SW Clamp / CL01 / effect and renders 120 frames.
  • Render cost at the defaults: 0.36 ms/frame at 720p, 0.41 at 1080p and 0.82 at 4K; every frame reads a small block of sums back to the CPU by design. macOS figures only.
  • Windows, in Resolume Arena 7.27.1 (win-lab, Mesa llvmpipe, no GPU, 2026-09-24): a CI build of this source loads from Extra Effects, registers as SW Clamp / CL01 / effect, all 19 host controls match the declaration, it renders and Arena's log stays clean: 8 of the fleet gate's 9 checks, in two runs. The ninth, controls, read Sag Attack and Sag Recovery dead both times, because the gate holds a still picture whose level never changes, so the supply sits settled and its time constants have nothing to act on; --sag measures both. Software rendering says nothing about a GPU or about speed.

What is not

  • Never loaded into Resolume on macOS.
  • The triode stage and Show Blanking are looks, checked only for being alive. Show Blanking is monochrome unless Per Channel is on, and lifted to a quarter grey so blanking can be seen.
  • Interlace is not modelled.
  • No OpenFX port and no presets. There is a user guide at https://stoatworks-labs.com/software/clamp/guide/.

The macOS build is Developer ID-signed and notarised by the release pipeline after publication; if macOS refuses a download, it predates the signing, so download it again. The Windows build is unsigned, so SmartScreen warns once.