I suck at math haha… I read the wikipedia article on cubic interpolation and am none the wiser
Would it make sense to request this as an API feature? Something like automation[]:value_at(float thingy), where thingy ranges from 1.0 to automation.length (or automation.length + 0.9999?)
Well, if you’re talking about a long sweeping curve (a whole pattern long) then I would click to make another point where I wanted the value. Read the box and delete the point again afterwards. I think that’s about as good as it gets now.
With future releases, automation must surely be the next logical step to be worked on.
I need to automation value at any point (1.0001, 1.0438, etc.), not just on whole pattern lines. And besides, putting a point somewhere changes the curve.
Nah? I just need the pseudocode instead of math formulas, then I’m all set… it’s not like cubic interpolation is a mystery, it’s just to me ^^
ok, i looked at the curve in renoise and it looks like a ‘cubic ease in-out’ type of curve. So I converted some old actionscript easing code to lua :
-- t: current time, b: beginning value, c: change in value, d: duration
function easeInOutCubic (t, b, c, d)
t = t / (d/2);
if (t < 1) then
return (c/2) * (t*t*t) + b;
end
t = t-2
return (c/2) * (t*t*t + 2) + b;
end
so you only need 2 values either side and the distance between them, then ‘t’ is the time you want the value for.