That works! amazing, thanks so much.
I understand the top few lines; checking if there are any markers and setting the values if the CTI is before or after the marker range, but if you have time could you explain what the last bit is doing?
Namely:
linear(time,m.key(i-1).time,m.key(i).time,i-1,i)
else
linear(time,m.key(i).time,m.key(i+1).time,i,i+1);
Thanks again.