-
time remapping’s offsetted speed + slider
Hi all!
I don’t know if this is possible..
I have a composition with time remapping applied on it (2 keyframes, first set at zero and next makes the animation quickier than the original).
I’d need a slider to control the speed of that time remapping, but making that new speed I did (with these 2 keyframes ) be the base speed, and not the original
(so, let’s say now is a 123% quickier than the original.. I want to make the slider think that speed is the original, and then change the speed according to that while moving the slider)I tried this Dan’s solution from this thread https://forums.creativecow.net/readpost/227/26731, but it makes the slider control the original speed of the comp, and overrides my manually keyframed re-speed…
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);
v2 = spd.valueAtTime(k2.time-.001);
accum += (k1.value + v2)*(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);
}
accum/100thanks a lot!