ive been using absTime * a value to control the speed of a visualization i made.
this works great but i want to be able to change the speed with a slider and have it smoothly speed up.
i’ve connected the value to a slider and it is pulsing the visualization every frame, and its looking more like a rapid cut/glitch effect.
i understand WHY this won’t work. In after effects i would use something like the expression below, which accounts for the in-time.
but i imagine i have to approach this completely differently in touch.
any thoughts?
(after effects expression - javascript):
spd = effect(“Slider Control”)(“Slider”);
n = spd.numKeys;
if (n > 0 && spd.key(1).time < time){
accum = spd.key(1).value*(spd.key(1).time - inPoint);
for (i = 2; i <= n; i++){
if (spd.key(i).time > time) break;
k1 = spd.key(i-1);
k2 = spd.key(i);
accum += (k1.value + k2.value)(k2.time - k1.time)/2;
}
accum += (spd.value + spd.key(i-1).value)(time - spd.key(i-1).time)/2;
}else{
accum = spd.value*(time - inPoint);
}
value + accum