Copy link to clipboard
Copied
Hey guys,
I'd like to make the opacity of a layer react to my audio file. I already converted the audio to keyframes and successfully mapped it to the opacity. However, it doesn't really look very good. The keyframes go only go up to 80, but I'd like the opacity to be 100 whenever the keyframes are at 80. I'd also like to change the speed of the opacity changes. Does someone know how to change the expression to solve my problem?
My expression currently looks like this:
thisComp.layer("Audioamplitude").effect("Linker Kanal")("Schieberegler")
Hope someone can help me. Thanks in advance!
You have to take a look at the Both Channels Slider values in the Graph Editor to determine the minimum and maximum values that you want to use to drive opacity. If the audio levels slider goes from a low of 0 to a high of 20 you have to make a choice of where you want the opacity to start increasing and where you want it to be at 100%. Then you put those values in one of the linear methods. You can try linear, easeIn, or easeOut. The interpolation method you will use looks like this when you ca
...Copy link to clipboard
Copied
You have to take a look at the Both Channels Slider values in the Graph Editor to determine the minimum and maximum values that you want to use to drive opacity. If the audio levels slider goes from a low of 0 to a high of 20 you have to make a choice of where you want the opacity to start increasing and where you want it to be at 100%. Then you put those values in one of the linear methods. You can try linear, easeIn, or easeOut. The interpolation method you will use looks like this when you call it up from the Expression Language menu: linear(t, tMin, tMax, value1, value2). if you set the value of the sliders as t then completing the expression is very simple.
Your expression would look like this:
t = thisComp.layer("Audioamplitude").effect("Linker Kanal")("Schieberegler");
linear(t, 8, 18, 25, 100);
This will set of values will keep the opacity at a minimum value of 25 and start increasing the opacity as the audio level increases to a value of 18. Changing linear to easeIn or easeOut will change the look slightly but audio usually reacts very quickly so you won't see much of a difference. The values you choose for the first set of numbers in the array depend on your audio file. The graph editor's Value Graph is the easiest way to look at the audio values to make that decision.
Copy link to clipboard
Copied
Awesome. Thank you very much!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now