sync loops with groove~ and jit.movie

Michael Beil's icon

I try to sync an audio-file to a movie with live operated loops. I use groove~ and jit.movie with viddl. It works fine for the whole file with the help of the sync-out at the right outlet of groove~ attached to a position message to jit.movie. But after changing the loop-points groove~ counts sync from 0. to 1. for the looped segment and in jit.movie the whole movie is played back in the time of the loop. How can I sync a loop to jit.movie without stopping and without losing sync?
(just changing loop-points in both objects while running causes the video to slow down a bit and get out of sync)

Rob Ramirez's icon

just takes a bit of math, i present to you... chicken drums!

Max Patch
Copy patch and select New From Clipboard in Max.

Michael Beil's icon

wow, very elegant solution. Thank you. Made my day. The snapshot is the thing I didn‘t think about. It doesn‘t work with the right outlet of the signal out. It‘s kind of amazing how smooth it works. Respect.