sub-frame keyframes

Moderators: Disciple, zlovatt

Post Reply
theau
Posts: 2
Joined: April 27th, 2010, 8:05 am

Hi,

I am trying to work out an expression to beat match a song.

I have two keyframes on a time remap which i want to be able to control their distance apart from a slider and loop.
I need to be to control it with a slider as the BPM is not divisible by my frame rate.

Is there an easy way to do this?
theau
Posts: 2
Joined: April 27th, 2010, 8:05 am

so, i've been playing around with this and this is where i've got to:

start = effect("start")("Slider");
bpm =effect("BPM")("Slider");
bar = bpm/60; 
t = ((time - start)%bar)/bar; 
valueAtTime(linear(t, key(1).time, key(4).time)) 

This is sort of working, it allows me to input four keyframes and have them cycle through to the beat however i there are a few things that I cant work out how to fix. The first issue i have is once it gets to beat / keyframe 4 it cuts straight back to beat 1 instead of holding for the full duration of a beat. Secondly, is there any way of making the keyframes snap rather than interpolate?

thanks

Luke
Post Reply