Stoatworks Labs

Slope

Video through a one-bit voice codec, for Resolume

Betav0.1.0Plugin & ModuleC++ / GLSL
Slope — Video through a one-bit voice codec, for Resolume
Slope

What it does

An FFGL effect for Resolume Arena and Avenue. A delta modulator sends one bit per sample, answering one question: is the input above or below my current guess? The decoder only has that same guess, nudged up or down one step per bit. CVSD (continuously variable slope delta) adapts the step: a run of identical bits means the guess is falling behind, so the step grows, and alternating bits mean it's hunting round a flat input, so it shrinks back. Both integrators leak, so a transmission error dies away.

Slope runs that coder along every scan line of the picture, one sample every few pixels, and every artefact comes out of that one rule; none of them is drawn. The guess can only climb one step a sample, so a hard edge arrives as a ramp smeared along the scan, as long as the edge's height divided by the step. On a flat area the bits alternate and the guess hunts one step either side of the level. Adaptation shortens the ramp and lengthens the hunting after it, and no setting gets rid of both.

The channel flips received bits at a rate you set, and a wrong bit moves only the decoder's guess, by two steps, for the rest of the line: streaks that fade off to the right as the integrator leaks. The decoder is the proper one, with its own low-pass reconstruction filter as a control, and Show Bits draws the received bitstream itself.

Luma codes brightness and carries the clip's colour through untouched; RGB runs three coders; Y+C codes the colour difference at half the sample rate, as a real system would. Scan runs along the rows or down the columns.

  • A CVSD coder per scan line: step size, maximum step, adaptation rate, run length and leak
  • Pixels per sample from 1 to 16, horizontal or vertical scan
  • Luma, RGB or Y+C at half chroma rate
  • Bit errors at a set rate, fresh every frame, fading on the leak
  • The decoder's reconstruction filter as a control, and Show Bits
  • Exact on the GPU: chunked in scan order, not a windowed approximation
  • 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 and all 13 valued controls moving the picture. Before the tag, the first render of real footage found a green bar at the left of every line in Y+C, now fixed: the chroma coders start at zero colour difference. Everything else is measured by an offline harness driving the real plugin at two rasters: step edges of 8.5, 13.5 and 27.5 steps climb in 9, 14 and 28 samples from the predicted sample, a flat field idles at period two and one step peak-to-peak with no error, every step of an 11-bit run follows the stated law, a forced bit error fades on time constants measured at 64.02 and 256.0 samples against 64 and 256, every pixel matches a serial double-precision run of the same recurrence, and a vertical scan is the horizontal one transposed, bit for bit. It catches nine wrong models and a one-character sabotage of its own shader, and all 12 swept controls change the picture. On macOS it costs 2.89 ms a frame at 4K at the defaults. The macOS build is signed and notarised. 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

Slope video thumbnail

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