I have a layer which opacity is being controlled by this expression:
0+thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")*7
I like the way it works, but I was curious if there is a way to somehow 'calm it down'. Right now the changes of opacity based on the audio input are really quick and agressive both going up and down, and as much as the sudden growth of the opacity value looks nice, the sudden drops of it don't fit my project. I have very little experience with writing expressions for AE so I am not sure if its possible to write down expression which would:
1. take the value from Audio Amplitude
2. multiply it by 7
3. a. IF value from current frame 'x' is greater than value from frame 'x-1', then use that value
b. IF value from current frame 'x' is equal to value from frame 'x-1', then use that value
c. IF value from current frame 'x' is lower than value from frame 'x-1', drop opacity value by given percent
What I want to achieve is to allow the quick sudden increases of opacity to happen, but stop the sudden drops.
Thanks a lot for any help and sorry for my ****** english.
Check this example and other stuff on Dan's site:
If you just want to smooth stuff, then expressions can have a .smooth() function thrown at them. Since you want to control thresholds and drop-offs, this would also be relevant: