FORUMS: list search recent posts

# Audio to Keyframe fade out

FAQ   •   VIEW ALL
 Audio to Keyframe fade out on Aug 29, 2016 at 2:13:51 pm

Hi there,

I'm trying to hold and fade out on flashing solid.

It's opacity value is creating using an audio to keyframe object.

Any advice would be grateful.

Many thanks,

J

 Re: Audio to Keyframe fade outon Aug 29, 2016 at 5:23:10 pm

Try something like this:

//This gets the audio from the audio Amplitude layer that 'Convert Audio to Keyframes' made
var aud = thisComp.layer("Audio Amplitude")("Effects")("Both Channels")("Slider");

// This gets the value of the Opacity property BEFORE you applied the expression. Basically returns the value you'd see when
// you click the 'opacity' value box to enter a value. It then divides that by 100 to give you a range 0-1 instead of 0-100.
var offset = value/100;

// Now, we multiply the audio data by our offset.
aud*offset

What this does, is that it allows you to keyframe your opacity from 0-100, and have that compound on top of the data that's being created by the Audio to Keyframes. So, just paste this expression onto opacity, set a keyframe at 100 for when you want the fade out to begin, and a keyframe at 0 when you want the fade to be complete. This works because when your opacity is 100, we divide it by 100 and get a value of 1. The audio data multiplied by 1 is just the audio data. When our opacity is 0, we multiply the audio value by 0 and get 0. When our opacity is 50, we divide that by 100 to get 0.5, and 0.5 times our audio data is half of the value.

I hope that makes sense. Give it a try and let me know if it doesn't work!

David Conklin
mographcode.tumblr.com

 Re: Audio to Keyframe fade outon Aug 30, 2016 at 10:31:48 am

It doesn't seem to be doing what I need.

I think I need to create some sort of linear ramp from 100-0.

So when the opacity is 100 it automatically trigger a ramp that fades out for a set duration.

Any ideas?

Cheers,

J