home/ atoms/ hydra-rig-audio-shim-4-bins

In this rig, Hydra's `a` object is a 4-bin shim fed from Strudel, not the native mic FFT

This rig disables Hydra’s native microphone FFT (detectAudio:false) and replaces the a object with a custom shim (in web/src/main.js) fed from Strudel’s audio analysis. Only four bins are wired: a.fft[0] (bass), a.fft[1] (low-mid), a.fft[2] (high-mid), a.fft[3] (highs). Reading a.fft[4] or above returns undefinedNaN, which can blank the output — so native tutorials that call a.setBins(8) and read a.fft[7] do not work here; stay within 0..3. In a Hydra-only preset, a instead comes from the mic and reads 0 until the performer presses m.

Examples

.rotate(() => a.fft[0] * 2) // bass-driven rotation — works .rotate(() => a.fft[5]) // undefined → NaN → blanks output // 4 bins map bass / low-mid / high-mid / highs

Assessment

Describe what a.fft[2] represents in this rig, explain why reading a.fft[6] causes visual problems, and state the valid bin index range.

“`a` here is **not** Hydra's native mic FFT. `detectAudio:false`; `web/src/main.js` swaps `a` for a **4-bin shim fed from Strudel**. Only `a.fft[0]`, `[1]`, `[2]`, `[3]` exist”
context/ · L1-instruments/hydra/gotchas.md · chunk 1