Stoatworks Labs

Pattern

A tracker's pattern editor, for Resolume

Betav0.1.1Plugin & ModuleC++ / GLSL
Pattern — A tracker's pattern editor, for Resolume
No screenshot — this one is configuration inside another application.

What it does

An FFGL source plugin for Resolume Arena and Avenue. A tracker plays a pattern of 64 rows, and the rows advance at a rate set by two numbers: Speed, in ticks a row, and BPM, where a tick lasts 2.5 / BPM seconds, so at the default Speed of 6 there are four rows to a beat. Each row holds one note per channel: a note name, a sample number and an effect.

FFGL gives a plugin no audio output, only the spectrum of what is playing, so Pattern runs the tracker backwards. The row cursor runs on the real tracker clock, rate-locked to the host's BPM, and the music writes into the pattern: each channel owns a band of the host's 64-bin spectrum, and an onset in that band writes a note into the channel on the current row. Its pitch is the band's spectral peak through the bin law, its volume a Cxx effect from the onset's strength, its sample number the channel's.

What falls out is what a tracker does. The cursor steps on the beat because it runs on a clock, not an animation. A busy passage fills every row and a sparse one leaves dots, because nothing is written that was not heard. After row 3F the cursor wraps and the next pass overwrites the last, a row cleared as the cursor enters it, so an arrangement change shows as the old notes being replaced: rows above the cursor are this pass, rows below it are the last. VU bars per channel fall one step every 20 ms, the way a vblank-driven meter falls.

The clock is held in double precision and re-anchored on a tempo change, because Resolume's host clock runs to hundreds of millions of milliseconds and a float phase would jump rows. A Detected tempo source finds the track's BPM from the audio when the host's tempo is wrong: since v0.1.1 it reads the beat rather than the half note, within one BPM in four seconds on drum grooves from 80 to 170 BPM. Nobody has measured how Resolume lays out its 64 bins, so the layout and value law are controls, Bin Law and Bin Value, rather than buried guesses. It is not a MOD player; it draws no logos and no tracker's name, and the themes are named by colour.

  • A row cursor on the tracker's own clock: Host, Detected or Manual tempo, Speed 1 to 31 ticks a row, Swing, 64 or 32 rows
  • Four or eight channels, each owning a band of the host's 64-bin spectrum, with the split under your control
  • An onset per band writes a note on the current row: pitch from the peak, volume as a Cxx effect, sample number from the channel
  • The ring: each pass overwrites the last, row by row, or Keep Notes holds them
  • Bin Law (Linear or Log) and Bin Value (Magnitude or Power) for the host's unmeasured spectrum, and Fold Octaves for pitches outside C-1 to B-3
  • Grey, Blue and Green themes, 3 to 33 rows visible, VU bars and effects columns, whole-pixel scaling
  • A detected tempo within one BPM in four seconds, at the beat and not the half note, and a clock that holds its row from a host at 499 million milliseconds
  • Universal macOS bundle and a Windows x64 DLL

Where it stands

v0.1.1, and honestly early. v0.1.1 fixes the Detected tempo source, which in v0.1.0 read half the tempo on programme material (62 for a 125 BPM groove). The tracker is measured, not asserted, by an offline harness that drives the real plugin class, nine of its ten check groups with no GL context at all: the row cursor sits on floor(t / T) mod 64 on every frame of six ten-minute runs at 60, 50 and 30 fps from a host clock at 499,000,000 ms, with swing and across a tempo change, where a float phase fails on 2,400 of 36,000 frames; a burst in band k writes exactly one note, in channel k, on the row current at that frame, at four and eight channels under both bin laws; loud audio already playing when the clip starts writes no false note in its first second; all 64 bins give the predicted note or --- under Linear and Log, folded and unfolded; the next pass clears, keeps or overwrites rows exactly; a metronome, and 45 drum grooves rendered as audio from 80 to 170 BPM, are detected within 1 BPM by 4.00 s at the right metrical level, where v0.1.0's detector fails 15 of them; and at 640x360 and 320x180, at Scale 1 to 4 and Auto, every scaled block is one colour and every probed glyph matches the font table bit for bit. Eight negative controls and a one-character mutation of the shipped shader are caught. All 17 controls change the picture at both rasters. Render cost on macOS is 0.041 ms/frame at 720p, 0.054 at 1080p and 0.128 at 4K. It has not yet been loaded into Resolume on macOS, and no real audio has reached it in a host: the layout, value law and sample rate of Resolume's 64 bins are assumed, which is what Bin Law, Bin Value and Sensitivity are for, and the onset thresholds and the tempo detector's level ratio were set on synthetic spectra and synthesised tracks; a breakbeat, and an off-beat bass at 80 to 90 BPM, still read at the wrong level. There is a user guide and a browser demo, which is a port rather than the plugin; no presets and no OpenFX port. The macOS builds are signed and notarised. Check it in your own rig before trusting it in a show.

Watch it running

Pattern video thumbnail

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