home/ atoms/ hydra-audio-reactivity

Any numeric parameter in Hydra can be replaced with a function, enabling audio or MIDI to modulate visual parameters

Hydra’s API is uniformly numeric: wherever a number appears (frequency, rotate amount, modulate strength), a function can be substituted instead. This means audio FFT values, MIDI controller readings, or any computed value can drive any visual parameter without special routing. The audio input object provides frequency-band values (via FFT) that can be directly passed as parameters, and MIDI controllers map similarly. This design makes audio-reactivity a natural extension of the same patching idiom used for static values.

Examples

osc(10, 0.1, () => a.fft[0]).out(o0) — the oscillator’s color offset tracks the bass FFT bin in real time. Or: use a MIDI knob to control .rotate() amount.

Assessment

Demonstrate two ways to make a Hydra visual react to audio: one using FFT and one using MIDI. Explain why Hydra’s numeric-as-function design makes this straightforward.

“everything that's a number here could also be a function so I could make this modulite function correspond to yeah that you can see there's like an FFT thing going on here”
corpus · olivia-jack-hydra-live-coding-visuals-in-the-browser-talk · chunk 3