Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Dan Ebberts Audio Sync

  • Dan Ebberts Audio Sync

    Posted by Mcmohawk on April 7, 2006 at 11:02 pm

    Hi,

    Has anyone done Dan Ebberts audio sync tutorial. Im trying to apply the same technique to something im working on where a precomp repeats its action by using layer markers in an expression on time remapping.
    when i add the expression (changing the comp name in the expression to that of the layer containing my markers) i get an error message reading –

    Bad Method Arguments. this property has no keyframe number 1
    error occured at line 1.

    im kind of new to experssions, ive tried everything i know but i cant get the expression to work!

    any help would be greatly appreciated

    Dan Ebberts replied 20 years, 1 month ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    April 8, 2006 at 12:44 am

    It sounds like you haven’t added a marker to the layer with the time remapping expression. That’s how the expression knows what time in your time-remapped layer to sync to the markers in the other layer. It might be that you just need to add a marker at time = 0 on your time-remapped layer if you just want the layer to start playing from time 0 whenever there’s a marker on the other layer. Make sense?

    Dan

  • Mcmohawk

    April 8, 2006 at 9:02 pm

    cheers dan

    yeah, thats got the expression working. For some reason now though the action of the time remapped layer only plays upto half way to the markers it is synced to. is there a way to make it play right up to the next marker? the movements will be the same speed all the way through, its just there is not enough time to play it fully

    very confused

  • Dan Ebberts

    April 8, 2006 at 10:46 pm

    Try this expression instead. You’ll need to change the name of the layer in the first line to match your triggering layer.

    trigger = thisComp.layer(“myTriggerLayer”); // layer with trigger markers
    n = 0;
    if (trigger.marker.numKeys > 0){
    n = trigger.marker.nearestKey(time).index;
    if (trigger.marker.key(n).time > time){
    n–;
    }
    }
    hit = marker.key(1).time;
    if (n == 0) t = 0 else t = trigger.marker.key(n).time;
    time – t + hit;

    Dan

  • Dan Ebberts

    April 8, 2006 at 10:50 pm

    This version is a little better. If the time remapped animation you want to trigger starts at time = 0, you don’t need a marker on the time remapped layer:

    trigger = thisComp.layer(“myTriggerLayer”); // layer with trigger markers
    n = 0;
    if (trigger.marker.numKeys > 0){
    n = trigger.marker.nearestKey(time).index;
    if (trigger.marker.key(n).time > time){
    n–;
    }
    }
    if (marker.numKeys > 0) hit = marker.key(1).time else hit = 0;
    if (n == 0) t = 0 else t = trigger.marker.key(n).time;
    time – t + hit;

    Dan

  • Mcmohawk

    April 9, 2006 at 12:33 am

    cheers dan, your an absolute legend!!

    that second expression works perfectly. i dont suppose you could give me a brief run down on the expression, just so i know whats going on. this goes so much past my expression knowledge!

    thanks again

    Tom

  • Dan Ebberts

    April 9, 2006 at 6:31 am

    Brief run down, huh? OK –

    The key is this part of the code:

    n = 0;
    if (trigger.marker.numKeys > 0){
    n = trigger.marker.nearestKey(time).index;
    if (trigger.marker.key(n).time > time){
    n–;
    }
    }

    Which sets variable “n” to number of the previous marker in the trigger layer, or 0 if a marker hasn’t been reached yet. The rest of the code just figures out what to set the remapped time to based on the previous marker in the trigger layer, the current time, and the marker (if any) of the time remapped layer.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy