FORUMS: list search recent posts

automated looping expression?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben Bigelow
automated looping expression?
on Oct 13, 2012 at 12:31:28 am

Hello,

Have a looping problem for all you expression masters. Thanks in advance.

So I have a video layer. I would like to loop 6 frames of it, then scrub the in/out point of that loop down in time of the footage. To elaborate:

Lets say my footage is 10 seconds long. What would be happening is the first 6 frames would loop, then after a determined number of cycles of the loop (lets say 5 times, or for 1 second), it would then start looping on frame number 2 of the 10 second clip, again for 6 frames (so it's now looping frames 2-7). Then frames 3-8, etc. This would continue.

I'm trying get functionality akin to something you might find in a VJ software, where you set a loop duration, then can move that loop throughout the clip.

Hopefully this makes sense! My brain is slogged trying and failing all day.

Thank you!


Return to posts index

Dan Ebberts
Re: automated looping expression?
on Oct 13, 2012 at 1:57:09 am

I think this works:

numFrames = 6;
numLoops = 5;

f = timeToFrames(time)
startFrame = Math.floor(f/(numLoops*numFrames));
fOffset = f%(numLoops*numFrames)%numFrames;
framesToTime(startFrame + fOffset)


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]