2 Replies Latest reply on Nov 3, 2017 1:41 AM by Mathias Moehl

    Offset Sync (Speed Sync)??


      Hi, Im trying to sync Stroke offset to music, so that on the beat of a song, it will speed up for a moment of time, and then return to a normal speed. So i guess another way to word it would be, Have the offset go at a specific "Offset Per second" speed, but one the beat, speed up to a different speed. is there any kind of expression that could be done to create a continuous Offset speed, and i could then just keyframe the beats so that it speeds up and slows back down. Hoping that there is because do it by hand, is EXTREMELY time consuming, and makes me use a calculator.


      I am Using: Adobe After Effects CC 2017OS: Windows 10 Education (Using a school given laptop)

      Intel Core i5-7200U 4-core processor @ 2.50GHz , 8 GB Ram , Integrated Graphics


      Hope someone can help me out Thank you in advance!


      Edit: I know that i can get a constant speed with (x*time) x being how much to offset by per second, but still can think of a way to have it speed up on the beat of a song,

        • 1. Re: Offset Sync (Speed Sync)??
          Mylenium Most Valuable Participant

          All you need to know on integrating temporal properties:


          Expression Speed and Frequency Control



          1 person found this helpful
          • 2. Re: Offset Sync (Speed Sync)??
            Mathias Moehl Adobe Community Professional

            I would first add a marker at each beat on your music layer. You can do that either manually or with BeatEdit for Premiere Pro as shown here


            Beat Assistant for Ae also has a similar functionality, but its beat detection is  less robust:

            Tutorial Getting started with Beat Assistant


            The you can apply the following expression to it that will increase the value at each marker:

            f=5; //duration in frames for the increment happen at each frame, set to zero if you want it to click
            d=20; //amount to increase at each marker
            musicLayer = thisComp.layer("music"); // replace "music" by the name of the layer that contains the markers
            f=framesToTime(f, fps = 1.0 / thisComp.frameDuration);
            n = 0;
            if (musicLayer .marker.numKeys > 0){
              n = musicLayer .marker.nearestKey(time).index;
              if (time > musicLayer .marker.key(n).time && n < musicLayer .marker.numKeys){
            r=(d*(n-1)) + value;
            linear (time, musicLayer .marker.key(n).time-f, musicLayer .marker.key(n).time,r,r+d);

            in the first 2 lines you control how exactly the value increases at each marker (increases by 20 over the duration of 5  frames in the example)

            in line 3 you specify the layer on which the markers are. i.e. replace the "music" as needed.

            This expression is a modification of the expression described here:

            Increment Rotation At Markers - AE ENHANCERS

            The original requires the markers to be on the same layer as the expression. But since with the technique described above the markers are always on the audio layer, this expression I wrote here can also deal with markers from another layer.