Hydra feedback, external sources, and networked streams
Learning objectives
- learner can route output buffers back as feedback to grow emergent and fractal structure
- learner can bring in webcam, screen/window, and video-file sources and process them like any signal
- learner can drive Hydra reactively from audio FFT and extend it with external libraries and networked WebRTC peers
Capstone — one whole task that evidences the objectives
Perform an audio-reactive Hydra set that feeds output buffers back into themselves for emergent feedback texture, mixes a live webcam/window-capture source, and loads the rtc-patch-bay library via loadScript() to pull in a second browser peer over WebRTC — all reacting to an FFT band.
Prerequisite modules
This module takes Hydra from a self-contained pattern generator to the instrument it was actually built to be: a patchable video synthesizer that eats the world — your face, your screen, your collaborator’s browser — and reacts to the music in the room. In a club or algorave setting this is the difference between a screensaver and a set: feedback gives visuals a living, analog-video-art texture; a camera puts the performer inside the image; a networked peer turns solo visuals into a duo.
The arc starts supported and narrow. First, drill the core feedback move — routing output into a named buffer and reading that buffer back — until src(o0).modulate(...) is muscle memory, then use the shape-blend-and-repeat recipe to watch tiling compound into fractal self-similarity. Second, swap generated sources for external ones: initialize a webcam into s0 and process it inside src(), then graduate to capturing another browser window. Third, wire an FFT bin from the a object into a feedback or blend parameter so the whole patch breathes with the bass. Only then assemble the network layer: use loadScript() to pull in the rtc-patch-bay module, and lean on the patch-bay model of WebRTC streams to subscribe to a second performer’s canvas.
Every required atom is load-bearing for the capstone — you cannot perform it without buffer feedback, camera and window sources, FFT wiring, script loading, and peer streaming. The supporting atoms deepen rather than gate: the camera-at-screen recursion story and Crutchfield’s differential-equation framing explain why feedback behaves the way it does, while envelope following and p5.sound situate Hydra’s audio analysis in the wider audio-reactive toolbox.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
audio-reactive-map
updateAudio(); scale(1 + amp * 0.01)
p5live-0044 · CC0-1.0
voronoi(() => 4 + a.fft[0] * 10).out()
hydra-0035 · 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
tiling-repeat
osc(10).repeat(3, 3).out()
hydra-0008 · CC0-1.0
tile [4,4] (circle 0 0.3) >> add
punctual-0020 · 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
scale-pulse
uv *= 1.0 + 0.3 * sin(u_time * 2.0);
glsl-0030 · public-domain
updateAudio(); scale(1 + amp * 0.01)
p5live-0044 · CC0-1.0
raymarch-sdf
vec3 nrm(vec3 p){vec2 e=vec2(.001,0);return normalize(vec3(map(p+e.xyy)-map(p-e.xyy),map(p+e.yxy)-map(p-e.yxy),map(p+e.yyx)-map(p-e.yyx)));}
glsl-0033 · public-domain
boolean-sdf
float u = min(a, b); float s = max(a, -b);
glsl-0006 · public-domain
visual-pulse
zoom (1 ~~ 2 $ osc 0.25) (circle 0 0.3) >> add
punctual-0022 · 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 — Make the image listen (audio-reactive show) optional
- Live Visualist — zero to performing live-coded & generative visuals — Reactive & procedural — make it listen, and go to the GPU required
- VJ — visual performance with projection, light & video — Generate & compose: build your own look recommended
Unlocks — modules that require this one