Squashed from work; the fine-grained history is under tag archive/work-2026-08-26: - vjfx: 104 new presets — the transition lane fills out and the screen family goes wide - vjfx: three lanes land — engine hooks + hold stage, the videomesh engine, and the audio picture - vj: the thumbnail pipeline becomes one honest machine, and effects go livecodable - vj: thumbnails become mp4 — hardware-coded sheets at measured-4K cells, and the bake stops racing the GPU - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - vj: the console grows real transports, and the deck stops lying about reverse - vj: reverse earns a memory, and the effects stop aging - fab: a 3D creation shell and the viewer built on it
57 lines
2.2 KiB
Text
57 lines
2.2 KiB
Text
// STROBE — a gated flash bound to the beat clock: some beats fire, some
|
|
// don't (BALANCE picks the odds), the fired ones flash hot right on the
|
|
// beat and decay through it (SMOOTH), tinted between white and a doc
|
|
// colour (COLOUR). Every choice is a hash of floor(beat), never the
|
|
// running clock, so the gate is exactly reproducible beat to beat.
|
|
{
|
|
name: "Strobe"
|
|
engine: "screen"
|
|
seed: 205
|
|
input0: "test"
|
|
|
|
speed: 1.0
|
|
beat_pulse: 0.6
|
|
beat_rate: 1.0
|
|
bar_beats: 4
|
|
glow: 1.0
|
|
// PERFORMANCE DIALS — mid-knob = the stock look, exact.
|
|
p0: 0.5 p1: 0.5 p2: 0.5
|
|
dials: [
|
|
{name: "SMOOTH", bind: "p0", default: 0.5},
|
|
{name: "BALANCE", bind: "p1", default: 0.5},
|
|
{name: "COLOUR", bind: "p2", default: 0.5}
|
|
]
|
|
|
|
color_bg: #x03040a
|
|
color_a: #xffffff
|
|
color_b: #xff3a86
|
|
color_c: #xfff0d0
|
|
|
|
stages: [
|
|
{kind: "bloom", threshold: 0.5, strength: 1.3, levels: 2}
|
|
]
|
|
|
|
// THE LOOK LIVES HERE: the whole frame is this function. The gate is
|
|
// a hash of floor(self.time_beat.y) — a fresh coin flip per beat,
|
|
// never the raw clock — and the flash envelope rides
|
|
// self.time_beat.z, the already-wrapped beat phase.
|
|
// Inputs: uv, content = input0 at uv, cmix = pre-gated content
|
|
// strength. Signals: self.time_beat (time, beat, phase, pulse),
|
|
// self.sig (bar, bpm, energy, dt), self.user (p0..p3),
|
|
// self.col_a/b/c/bg, self.fog (density, glow, content, -).
|
|
shader: draw.DrawVjFxScreen {
|
|
fx_color: fn(uv: vec2, content: vec4, cmix: float) -> vec4 {
|
|
let bar = floor(self.time_beat.y)
|
|
let gatehash = fract(sin(bar * 12.9898 + 4.0) * 43758.5453)
|
|
let balance = 0.15 + 0.7 * clamp(self.user.y, 0.0, 1.0)
|
|
let armed = step(1.0 - balance, gatehash)
|
|
let phase = self.time_beat.z
|
|
let smooth = 0.02 + 0.5 * clamp(self.user.x, 0.0, 1.0)
|
|
let flash = pow(1.0 - clamp(phase / max(smooth, 0.001), 0.0, 1.0), 3.0)
|
|
let hot = clamp(flash * armed, 0.0, 1.0)
|
|
let flashcol = vec3(1.0, 1.0, 1.0).mix(self.col_b.xyz, clamp(self.user.z, 0.0, 1.0))
|
|
let rgb = content.xyz.mix(flashcol, hot)
|
|
return vec4(rgb, 1.0)
|
|
}
|
|
}
|
|
}
|