Hydra: live-coding video-synth visuals
Learning objectives
- learner can model Hydra as analog video synthesis and chain its five function types from source to .out()
- learner can build patches with sources, geometry/colour transforms, blends, and modulation warps
- learner can animate any parameter with time and functions, and route across multiple output buffers
Capstone — one whole task that evidences the objectives
Perform-code a live Hydra patch that layers multiple sources across output buffers, applies geometry and colour transforms, modulates one source by another, and animates parameters with time functions — sharing the sketch as a remixable link.
Prerequisite modules
This module builds toward the core skill of the algorave VJ booth: improvising visuals in a browser tab at hydra.ojack.xyz, projected behind a live-coded music set, where every edit is executed in front of an audience with Ctrl+Shift+Enter and there is no undo — only the next re-evaluation. Hydra rewards performers who think in signal flow rather than draw calls, which is why the module opens with the mental model: Hydra as an analog video synthesizer, where each function is a box that generates or transforms a signal, chained left-to-right like patch cables.
The scaffolding arc starts supported: type osc().out() and get scrolling stripes, then follow “Every Hydra patch runs source → geometry/color transforms → .out()” to extend one chain, using the five-function-type taxonomy to predict where any unfamiliar function can legally sit. Next comes two-texture work — blends to composite layers by colour, then the conceptual leap of modulation, where one texture’s channels warp another’s coordinates (“modulation is to geometry what blending is to colour”). Then parameters come alive: “Any Hydra parameter can be a function of time” replaces static knob positions with per-frame expressions. Finally, the four output buffers turn single chains into a performable rig — build on a hidden buffer, cross-mix with src(), switch what is rendered.
The required atoms gate the capstone directly: without the pipeline discipline, the transform vocabulary, modulate, time functions, buffer routing, and the share-link workflow, the performance cannot be executed or published as a remixable sketch. Supporting atoms enrich the picture — restatements of the five-type taxonomy, the modulate-as-warp mechanism, and the parameters-are-functions idea from complementary angles, plus the canvas-versus-signal-flow contrast, per-pixel RGB arithmetic behind blends, abstraction as a principle, and why compiled GPU shaders keep long chains cheap — deepening intuition without being load-bearing for the task.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
modulation-warp
osc(4).modulate(src(o0), 0.6).out(o0)
hydra-0022 · CC0-1.0
s0.initP5(); src(s0).modulate(noize(), 0.3).out()
p5live-0038 · CC0-1.0
feedback-trail
osc(4).modulate(src(o0), 0.6).out(o0)
hydra-0022 · CC0-1.0
function draw(){ fill(0, 20); rect(0, 0, width, height); circle(mouseX, mouseY, 40) }
p5live-0003 · CC0-1.0
radial-symmetry
osc(10).kaleid(5).out()
hydra-0010 · CC0-1.0
// sandbox
osc(10, 0.05, 1.3).kaleid(8).out()
// sandbox
p5live-0037 · CC0-1.0
noise-field
noise(4, 0.1).out()
hydra-0002 · CC0-1.0
float h21(vec2 p){return fract(sin(dot(p,vec2(12.9898,78.233)))*43758.5453);}
glsl-0013 · public-domain
palette-cycle
osc(30, 0.1, 1).colorama(0.1).out()
hydra-0015 · CC0-1.0
hsvrgb [fract (ft/6.28 + 0.1*time), 1, 1] >> rgb
punctual-0024 · CC0-1.0
oscillator-texture
osc(10).out(o1)
hydra-0039 · CC0-1.0
float v = sin((st.x + u_time*0.1) * 40.0) * 0.5 + 0.5;
glsl-0024 · public-domain
hue-shift
osc(30).hue(() => time * 0.1).out()
hydra-0016 · CC0-1.0
hsvrgb [fract (ft/6.28 + 0.1*time), 1, 1] >> rgb
punctual-0024 · CC0-1.0
pixelate
osc(20).pixelate(20, 20).out()
hydra-0014 · CC0-1.0
vec2 q = floor(st * blocks) / blocks;
glsl-0027 · public-domain
polar-warp
float r = length(uv); float a = atan(uv.y, uv.x);
glsl-0008 · public-domain
[rtx [fr, ft + 0.2*time], rty [fr, ft], 0.5] >> rgb
punctual-0032 · CC0-1.0
threshold-mono
(osc (40*fx) > 0.5) >> rgb
punctual-0027 · CC0-1.0
noise(4).luma(0.4, 0.1).out()
hydra-0019 · CC0-1.0
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- Audio-Visual Performer — integrated, synced live AV — Pair sound and image (unsynced, side by side) required
- Live Visualist — zero to performing live-coded & generative visuals — Generative canvas — colour, motion, and Hydra live-coding required
- VJ — visual performance with projection, light & video — Generate & compose: build your own look required
Unlocks — modules that require this one