A tap bpm control for Hydra. Inspired by Resolume's own tap.
osc(30,.01,beats(1)).out()
osc().rotate(beats_(2).curve(-3)).out()
osc().scale(beats(1).curve(2).range(1,2)).out()
// Ctrl + Space Bar for tapping
// Ctrl + , (Comma) for re-sync
Ctrl + Space Bar
for tapping.Ctrl + , (Comma)
for re-sync (resets time to 0).
beats(n=1)
: A linear ramp from 1 down to 0 everyn
beatsbeats_(n=1)
: A linear ramp from 0 up to 1 everyn
beatsbeatsTri(n=1)
: Goes from 1 to 0 onn
beats, and then back to 1 in the same time, creating a triangle wave.beatsTri_(n=1)
: Same as avobe but inverted.
You can seat the curve of a beat envelope by calling .curve(q)
on it. Positive values will ease in and negative values will ease out. For example, beats().curve(3)
would be cubic easing in.
You can also set the range for an envelope or a curved envelope by calling .range(min=0,max=1)
on it. For example: osc().scale(beatsTri(2).curve(2).range(1,2))
.