home/ atoms/ hydra-modulate-warp

Hydra's modulate() uses one texture's red/green channels as coordinate offsets to warp another

Where blend combines pixel colors at the same coordinates, modulate() is a distinct category: it uses the color channels of one (modulating) texture to displace the sample coordinates of the base texture. Specifically, the red channel offsets the x-coordinate and the green channel the y-coordinate, and an amount parameter scales the displacement (e.g. modulate(o1, 0.9)). The result is a spatial warp — like looking through textured glass — not a color change: bright regions of the modulator pull the base signal out of place, giving liquid, rippling, or lensing distortion. This UV-displacement mechanism underlies feedback warping, lensing, and animated noise deformation. Misconception: modulate does not mix or tint colors the way blend does — it moves where pixels are sampled from. Every geometry transform has a modulate variant (modulateRotate, modulateScale, modulateKaleid, …) that drives that geometric parameter from a texture value rather than a constant, applying it by differing amounts across the image for spatially non-uniform effects.

Examples

osc(10,0.1,0.8).modulate(noise(3),0.1).out()   // noise warps the oscillator
osc(5).modulateRotate(osc(2),0.5).out()          // inner osc drives per-pixel rotation
osc(21,0).modulate(o1).out(o0)
osc(40).rotate(1.57).out(o1)                     // buffer-driven feedback warp

Assessment

Explain in one sentence why modulate(noise(3)) produces a warped oscillator rather than a noise-colored one, and say which channel drives horizontal vs vertical displacement. Compare the visual result of .modulate(noise(3)) vs .blend(noise(3)) on the same source, and contrast modulate() with diff()/add() at the pixel level, naming a scenario where you would choose modulate.

“modulate(texture, amount) uses the red and green channels of the input texture to modify the x and y coordinates of the base texture.”
“_**modulate**_ functions use the colors from one source to affect the _**geometry**_ of the second source”
corpus · hydra-getting-started-official-interactive-tutorial · chunk 1
“modulate(texture, amount) uses the red and green channels of the input texture to modify the x and y coordinates of the base texture.”
corpus · hydra-livecoding-networked-visuals-source-repo · chunk 3
“modulation which is using instead of combining the colors of two things is using the colors of one thing to affect the coordinates of the other thing and so it sort of ends up being like a warp kind of thing”
corpus · live-coding-visuals-with-hydra-olivia-jack-no-bounds-eulerro · chunk 2