home/ modules/ hydra-feedback-cameras-and-networks

Hydra feedback, external sources, and networked streams

  • 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

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.

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

Feeding an output buffer back as its own input makes tiny changes compound into emergent patterns
Concept L2 First instrument H
Hydra video feedback is created by routing output into a named buffer and reading that buffer back
Procedure L3 Craft H
Blending a Hydra shape with its own output and then repeating it yields self-similar fractal structure
Concept L2 First instrument H
Hydra can use webcams, screen capture, video files, and images as source buffers alongside generated visuals
Procedure L1 Foundations HJ
Hydra processes a webcam by initialising it into s0 and using it inside src()
Procedure L2 First instrument H
Hydra can use another browser tab or window as a live video source, then process it like any signal
Concept L2 First instrument H
Hydra's `a` object exposes real-time FFT bins so any parameter can be driven by an audio frequency band
Procedure L2 First instrument HJ
Hydra's loadScript() imports arbitrary JavaScript libraries (Three.js, Tone.js, p5.js) into the live editor
Procedure L3 Craft H
Hydra models WebRTC browser streams as patchable modules, enabling live routing of video between remote peers
Concept L2 First instrument HJ
Hydra can use other browser windows as live video sources via WebRTC peer-to-peer streaming
Concept L3 Craft HJ

Supporting — enrichment, not gating

Video feedback pointing a camera at its own output produces self-similar, fractal-like patterns from simple recursion
Concept L2 First instrument HL
A camera-screen feedback loop is a physical system that iterates a differential equation
Concept L3 Craft HG
Envelope following maps smoothed audio amplitude over time to continuously control visual parameters
Concept L3 Craft HB
p5.sound wraps the Web Audio API in a Processing-style interface for audio analysis and playback
Concept L1 Foundations HJ
A visual pulse is amplitude-following, not beat-locked, and will drift from the musical grid
Concept L2 First instrument HJ
Feedback gain near 1 causes runaway whiteout — leave headroom and decay each frame
Principle L2 First instrument HG
Fractal visuals have two build routes: domain repetition with raymarching for 3D lattices, or feedback zoom for a cheap 2D self-similar tunnel
Concept L2 First instrument HG
Continuous slow zooming is the signature motion of fractal visuals — iteration count and zoom depth are the main expressive controls
Principle L2 First instrument HG
Mapping audio low-mid to fractal zoom rate or feedback gain risks runaway whiteout — keep gain in check
Principle L2 First instrument JH