home/ modules/ hydra-live-visual-synthesis

Hydra: live-coding video-synth visuals

  • 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

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.

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

Hydra models analog video synthesis: each function is a box that generates or transforms a signal
Concept L1 Foundations HG
Hydra organises all its operations into five types: source, geometry, color, blend, and modulate
Concept L1 Foundations H
Hydra's method-chaining API composes visual transforms as a pipeline from source to output
Concept L1 Foundations H
A Hydra patch is a left-to-right chain of dot-joined functions, modeled on modular-synth cabling
Concept L1 Foundations HG
Every Hydra patch runs source → geometry/color transforms → .out()
Procedure L1 Foundations H
Hydra's six built-in source functions each generate a distinct base texture type
Concept L2 First instrument H
Hydra geometry transforms reposition, scale, or tile a texture without changing its colors
Concept L2 First instrument H
Hydra color transforms multiply, shift, or key the RGBA channels of a texture
Concept L2 First instrument H
Hydra's blend family composites two sources by arithmetic on their pixel colors
Concept L2 First instrument HJ
Hydra modulate functions use one source's colors to warp another source's geometry
Principle L3 Craft H
Hydra visuals are built by chaining functions, and the order of the chain changes the output
Procedure L2 First instrument H
Hydra can embed multiple sources inline in one chain instead of routing each to a separate output
Concept L2 First instrument H
Hydra has four independent output buffers (o0–o3) that render separately and can be cross-mixed
Concept L1 Foundations HJ
Hydra's speed global scales the global time variable that drives parameter animation
Fact L2 First instrument H
Any Hydra parameter can be a function of time, enabling continuous animation without retyping code
Concept L2 First instrument H
Hydra shares sketches as links that reopen the editable code, building a traceable remix lineage
Concept L2 First instrument HP

Supporting — enrichment, not gating

Hydra functions fall into five categories: source, geometry, color, blending, and modulation
Fact L1 Foundations H
Hydra's modulate() uses one texture's red/green channels as coordinate offsets to warp another
Concept L2 First instrument HG
Any Hydra number parameter can be a function evaluated each frame, enabling gestural and data-driven control
Procedure L2 First instrument H
Hydra accepts a function in place of any numeric parameter, evaluated every frame
Concept L2 First instrument H
The signal-flow model makes interconnection primary, unlike the canvas-drawing model of Processing
Principle L1 Foundations HG
Hydra blend operations are per-pixel arithmetic on R, G, B values, not layer compositing
Concept L2 First instrument HG
Abstraction hides implementation details so programmers focus on what code does, not how
Concept L1 Foundations H
A whole Hydra chain compiles to one GPU shader that computes every pixel in parallel
Concept L2 First instrument HG
Domain-warping noise with noise — feeding noise into modulation-warp — produces turbulent, liquid, marbled texture and is the richest cheap texture
Concept L2 First instrument HG
Voronoi cell look varies between distance-to-nearest-point and distance-to-second-nearest — each gives a distinct aesthetic
Concept L2 First instrument HG
Two near-frequency spatial oscillators beating against each other produce moire shimmer interference
Concept L2 First instrument HG
Displacement-map is static structural coordinate offset; modulation-warp is its animated cousin driving continuous motion
Concept L2 First instrument HG
One coherent noise source well-warped beats many uncorrelated textures fighting — texture should support form, not compete with the focal-point
Principle L2 First instrument HGL
Strobe/flash is a high-impact accent that must be used sparingly because of photosensitivity risk, never as a default
Principle L2 First instrument HL
A slow warp of a simple texture is the richest single source of visual complexity — it beats a complex static texture
Principle L2 First instrument HG
One or two motions at a time — a still figure on a flowing ground reads far better than everything moving
Principle L2 First instrument HGL
In the glitch style, digital degradation is the material — corruption, pixel-sorting, and RGB split are the primary tools, not side effects to avoid
Concept L2 First instrument HG
Glitch motion is frantic and discontinuous — jumps, freezes, and strobe-flash accents rather than smooth transitions
Concept L2 First instrument HG
Glitch palette is high-contrast and electric — black plus saturated green/magenta/cyan and white, with broken color from channel offset on-brand
Concept L2 First instrument HGL
Polar-warp plus radial-symmetry forms the mandala/kaleidoscope skeleton of a psychedelic visual
Concept L2 First instrument HG
Psychedelic palettes are highly saturated complementary/triadic hues always in motion via palette-cycle — color must never settle
Concept L2 First instrument HL