-
If Else with built in decay and no markers/keyframes?
tl;dr
How can I trigger a value that decays without keyframes or markers to calculate decay time.I’m in pre-production for a music video using MIDI to trigger visuals. There will be a controller layer with keyframes generated from MIDI representing pitch and velocity from the MIDI file. I know how to map the opacity of a layer with a certain value from the control layer but can’t make it decay without using keyframes or markers. I want to avoid this because I plan to have 70+ layers (each mapped to a value from the controller layer).
Here’s an example applied to a layer opacity:
if (thisComp.layer(“Control”).effect(“Slider Control”)(“Slider”) ==5) 100 else 0
This accomplishes the revealing of the layer every time the control value is 5, but strictly in an On/Off fashion.
I tried using *time* to facilitate a decay:
if (thisComp.layer(“Control”).effect(“Slider Control”)(“Slider”) ==5) 100/time else 0
This won’t work because if the triggering happens later in the timeline, the decay has already begun.
All the methods of decay I’ve seen use keyframes and markers to calculate time offset etc, but with 70 layers being triggered over and over, I don’t think that’s an option for me.
Any ideas? I’m afraid I’ll have to go back to the drawing board pretty soon. Thanks guys!
—————————–
Caleb