Skip to content

Releases: stoatworks-labs/atrac

Release list

Atrac v0.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 15:46

A perceptual coder modelled on MiniDisc's ATRAC, run on the picture, as an FFGL effect for Resolume Arena and Avenue, shown as SW Atrac. Detail is thrown away by bits, not by resolution: the picture is cut into overlapping blocks, each goes through the lapped transform (the MDCT), the coefficients are grouped into block floating units with a scale factor and a word length each, and a fixed budget of bits per cell is shared out by a masking model.

Nothing is drawn on purpose: fine texture goes first because it is at the bottom of the queue; a hard edge rings one block either side (pre-echo) because quantisation noise is a sum of basis functions over the whole window, and short blocks confine it; the allocation is recomputed every frame, so texture shimmers at low rates; a cell that runs out of bits falls to grey, because luma is coded centred on zero and a lapped transform has no compact DC. On top sits the disc: a shock-proof buffer that a knock — an audio onset, or the Knock button — drains, and when it empties the picture holds until it has refilled.

What is verified

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

  • At unlimited bits the transform returns the input within a rounding bound derived from the arithmetic, through long, short and mixed blocks, at 0.3% of the bound (l2 error 3.4e-5 to 4.2e-5 against 4.7e-3 to 1.5e-2; worst pixel 6.6e-7).
  • 3,660 cell-channels over three block sizes and three rates: none over budget, none with a whole increment left, no band below the floor coded, every scale factor as stated, every cell identical to the stated greedy.
  • A step's noise reaches exactly N pixels before the edge in Long, and 0 / 2 / 12 against bounds of 3 / 6 / 12 in Short and Adaptive.
  • SNR strictly rising with Bit Rate over five doublings (19.4 → 35.6 dB at 320×180; 20.1 → 37.9 at 1280×720).
  • A planted weak band beside a strong one gets 0 bits with Masking on and 2 with it off, on the budget the statement predicts.
  • A knock breaks playback iff it outlasts the buffer, on the closed form to within one frame; a resize mid-hold keeps the held picture.
  • Twelve perturbed models each fail their check; one character changed in the shipped GLSL is caught by two of them.
  • All 13 controls change the picture; every shader compiles through glslc; --pipe returns whole frames and exits 1 on a failed render or a closed stdout; oxbow loads it as SW Atrac / AC01 / effect and renders 120 frames.
  • Render cost at the defaults: 3.2 ms a frame at 720p, 4.9 at 1080p and 16.1 ms at 4K — a whole 60 fps frame there, with about 660 MB of float buffers — and 1.4 / 3.0 / 10.0 ms on 8-pixel blocks. Nothing has been optimised. 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 Atrac / AC01 / effect, all 20 host controls match the declaration, 9 controls move the picture, it renders and Arena's log stays clean: all 9 of the fleet gate's checks. Buffer, Read Speed and Knock Length act only during a knock, which the gate cannot press; the two audio controls were skipped for want of a sound device. The first candidate failed this gate -- packed is a reserved word in GLSL 4.10 and Mesa refused the alloc shader -- and was fixed before the tag. Software rendering says nothing about a GPU or about speed.

What is not

  • Never loaded into Resolume on macOS.
  • The masking model's slopes and offset are stated, not tuned against anything.
  • A flat field ripples faintly until the rate is high: a lapped transform has no compact DC. That is the transform, not a bug, and it is why a starved cell is grey.
  • Side information (word lengths, scale factors) is not in the budget, as it was on MiniDisc.
  • Nobody has measured what Resolume's 64 FFT bins carry; the detector sums over every bin so their layout does not matter, and the square root of each is the fleet's assumption.
  • Show Bits is a dim blue at the default rate, where almost every band is at 2 bits; raise Bit Rate to watch it fill.
  • Costly at 4K (see above). No presets and no OpenFX port. There is a user guide at https://stoatworks-labs.com/software/atrac/guide/ and a browser demo at https://atrac-demo.stoatworks-labs.com.

ATRAC and MiniDisc are trademarks of Sony Group Corporation. This project is modelled on the published description of the format and is not affiliated with or endorsed by Sony.

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.