Expression to play sound on event
by Kevin Sheppard
on
Nov 26, 2008 at 3:27:04 am
Hi all,
I used an expression to randomize visibility of a muzzle flash. Values are either 0 or 100% for the flash's opacity. I have a sound file of a single bullet being fired from a gun and I was wondering if there was an expression to play the file every time the flash's opacity was 100%.
Re: Expression to play sound on event by Giriraj Bakale on Nov 26, 2008 at 10:20:06 am
hello Kevin
Yes there is a simple way for your problem...
what you can do is u can import the sound file in
timeline,...
right click on that audio file click on
Keyframe assistant---> Convert Audio to Key frames...
By this u get audio values,press U key to get the values on audio layer..
select the muzzle flash footage add expression on its opacity layer,
link the opacity of muzzle flash footage to the value of audio footage..
when u play u will get that effect,...
i hope so u got it...
sorry brother i dont know how to load video, no means
i could have sent u a video tutorial of this.....
will best of luck.....
Re: Expression to play sound on event by Kevin Sheppard on Nov 26, 2008 at 12:25:43 pm
Ok that would have probably worked if I had a continuous audio file that spanned the duration of the comp, but the gun shot sound is just a couple frames long. I want the sound file to play when the muzzle flash is at full opacity.