It seems like the value of the slider doesn’t matter, just the index of the most recent keyframe. It will probably looks something like this:
s = comp("MainComp").layer("Value Control").effect("Value 1")("Slider");
v = value;
if (s.numKeys > 0){
n = s.nearestKey(time).index;
if (time < s.key(n).time) n--;
if (n > 0){
if (n ==1){
v = footage("Values.csv").dataValue([2,0]);
}else{
t = time - s.key(n).time;
v1 = footage("Values.csv").dataValue([2,n-2]);
v2 = footage("Values.csv").dataValue([2,n-1]);
v = linear(t,0,1,v1,v2);
}
}
}
v
Dan