FORUMS: list search recent posts

After Effects layer marker playing audio

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Richard Chisholm
After Effects layer marker playing audio
on Sep 28, 2016 at 10:00:12 am

Hi

I am using an expression to trigger the playing of a sound using layer markers. The expressions are placed on the Time Remap and Audio Level as outlined below. The expression works great until you have the markers too close together in which case the sounds are clipped or cancel each other out. Is there a way around this or is there an alternative script someone could suggest? Basically I want to each triggered instance of the sound to play in it's entirety even if they overlap.

Cheers

Rich

TIME REMAP
len = thisLayer.source.duration;
if(marker.numKeys > 0){
m = marker.nearestKey(time).index;
if(marker.key(m).time > time) m--;
if(m > 0){
mt = marker.key(m).time;
if(time &lt; mt+len){
linear(time, mt, mt+len, 0, len);
}else 0
}else 0
} else value;

AUDIO LEVELS
len = thisLayer.source.duration - framesToTime(1, fps = 1.0/thisComp.frameDuration);
if(marker.numKeys > 0){
m = marker.nearestKey(time).index;
if(marker.key(m).time > time) m--;
if(m > 0){
mt = marker.key(m).time;
if(time &lt; mt+len){
value;
}else [-48, -48];
}else value;
} else value;


Return to posts index

Dan Ebberts
Re: After Effects layer marker playing audio
on Sep 28, 2016 at 4:02:12 pm

The only think I can think of would be to duplicate the audio layer and have one expression respond to odd markers and the other respond to even markers (you might have to extend this to more layers if more than two sounds can overlap).

Dan



Return to posts index

Richard Chisholm
Re: After Effects layer marker playing audio
on Sep 29, 2016 at 8:09:33 am

Hi Dan

Thanks for the reply. Not sure that will work as I have the sounds firing off in quite close proximity at times so will end up with a bunch of repeated layers. I take it there's no way of creating an instance of the clip (like you can in Flash for example) and deleting after use, so that each instance plays in it's entirety?

Cheers

Rich


Return to posts index


Dan Ebberts
Re: After Effects layer marker playing audio
on Sep 29, 2016 at 1:18:07 pm

That's correct.

Dan



Return to posts index

Richard Chisholm
Re: After Effects layer marker playing audio
on Sep 29, 2016 at 1:25:39 pm

Nuts.


Return to posts index

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