Stoatworks Labs

Fax

A Group 3 fax over a noisy line, for Resolume

Betav0.1.0Plugin & ModuleC++ / GLSL
Fax — A Group 3 fax over a noisy line, for Resolume
No screenshot — this one is configuration inside another application.

What it does

An FFGL effect for Resolume Arena and Avenue. A Group 3 fax does not send pixels. It thresholds each scan line to black and white, 1728 pels across 215 mm, and sends run lengths as variable-length codes, one line at a time, each ended by an EOL. In MR most lines are sent as the differences from the line above, with a plain one-dimensional line every K so that an error cannot run for ever.

Fax sends the clip through a real T.4 coder, a real noisy line and a real decoder, and the look of a fax falls out of the code rather than being drawn. A bit error makes the decoder read the wrong code lengths, so it streaks from the error to the right edge of its line and stops at the next EOL. In MR the damage runs down, because each following line is decoded against a spoilt reference, until the next one-dimensional line: a wedge at most 2, 4 or 8 lines tall. A receiver that can tell a line is bad repeats the line above, the familiar vertical stretch.

Standard resolution is 3.85 lines per millimetre against 8 pels, so a standard fax is squashed and doubled vertically. In Page mode the page arrives line by line at the line rate, fast over blank paper and slow over detail, never faster than the 10 ms minimum a scan line may take; in Live mode every frame is a whole new page. The sending machine prints a header line into the top of the page before coding it, so it breaks on the line like everything else.

The code tables were typed from the Recommendation by hand and are checked against two independent transcriptions (Go's x/image/ccitt and pdfminer.six), and the plugin's own streams are decoded back to its page by Go's CCITT decoder, which shares no code with it. The print draws the received page by the exact area black pels cover, on warm-grey thermal paper or plain paper.

  • A real T.4 coder and decoder: Modified Huffman and Modified READ, EOLs, fill, RTC
  • Code tables checked bit for bit against two independent transcriptions, and streams read back by Go's CCITT decoder
  • A noisy line: bit errors from 1e-6 to 1e-2, and bursts of up to 64 bits
  • Streaks, wedges down to the next one-dimensional line, and Repeat Line concealment
  • Standard, fine and superfine resolution; Frame, A4 Crop and A4 Letterbox
  • Page mode at 2400 to 14400 bit/s, or Live, a new page every frame; an 8 x 8 halftone
  • Universal macOS bundle and a Windows x64 DLL

Where it stands

v0.1.0, and honestly early. The fax is measured, not asserted, by an offline harness that drives the real plugin class headlessly at two rasters and on Apple's software renderer: all 204 code-table entries agree bit for bit with two independent transcriptions of T.4, and every run length round-trips at exactly the standard's bits; Go's CCITT decoder, which shares no code with the plugin, reads its MH and T.6 streams back to the page with 0 of 100,656 bytes different; with a clean line the received page is the sent page bit for bit in MH and MR; each of 47 single bit errors stays in its own line with nothing damaged before it; an MR error never runs past the next one-dimensional line (at most K = 2, 4 or 8); every Repeat Line concealment is the line above; and in Page mode all 466 lines arrive within 2 ms of their bit count over the baud. Nine negative controls and a one-character mutation of the shipped shader are caught. All 13 swept controls change the picture. The CPU half costs: at the defaults (Live, Halftone) the coder, the line and the decoder take about 9 ms a frame at 1080p on an M4 Max, and superfine halftone in Live mode is not real-time (about 31 fps); Halftone off costs under 1 ms. It has not yet been loaded into Resolume on macOS. On Windows it has: a build of this source loads, registers and renders in Resolume Arena 7.27.1 on software rendering (win-lab, no GPU), with every parameter as declared; six controls (Resolution, Coding, Bursts, Baud, Concealment, Header) could not be measured there, because in Live mode every frame is a new page with new bit errors and the picture never stands still. The macOS build is Developer ID-signed and notarised. There is a user guide and a browser demo; no presets and no OpenFX port. Check it in your own rig before trusting it in a show.

Watch it running

Fax video thumbnail

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