home/ atoms/ hydra-array-args-sequenced

Array arguments in Hydra step at the global bpm rather than animating smoothly

In Hydra, passing an array as an argument (e.g. osc([10, 20, 30])) makes Hydra step through the array values at the global bpm rate (default 30 bpm), not animate smoothly between them. This is a sequencing mechanism, not a smooth interpolation. For smooth continuous control, use a () => thunk with Math.sin or reference a.fft[i]. For a single static value, pass a plain number. Confusing arrays-as-sequence with arrays-as-values is a common source of unexpected tempo-locked jumps.

Examples

osc([10,20,30]) — steps through frequencies at 30 bpm. For smooth: osc(() => 10 + Math.sin(Date.now()*0.001)*10).

Assessment

Predict what osc([4, 8, 16]).out() does and explain how you would achieve smooth frequency variation instead.

“Wrong arg type / array sequencing** | passing an array where a number is needed, or array timing surprises (`[0,1,2]` steps at Hydra `bpm`)”
context/ · L5-debug/hydra.md · chunk 1