-
Triggering Opacity (and other things) with Markers
Hey all,
I’m fairly new to expressions and scripting in AE. I’ve been messing around with this, but I decided to ask here since I can’t seem to figure it out. Currently, I’m visualizing pieces of music in MIDI format. As far as I can tell, AE doesn’t work with MIDI directly. And I need something more accurate than Sound Keys (need to be able to visualize individual instruments/notes).I’m using a modified version of this script so that it breaks the MIDI down further into individual notes AND it creates markers on null layers instead of keyframes. This allows me to use the Markers to trigger animations I want for the different notes as described by Dan Ebberts.
So in my main Comp, I’ll have a PreComp for each note that contains the animation and has Markers named “start” and “stop” (for the MIDI note’s In and Out points).
The idea was to have the animation playback when the “start” marker was hit and end at the “stop” marker. But following Dan’s method I realize I probably can’t do this since the layer is being time remapped and could possible disrupt the space-time continuum. So I decided to have the “start” marker trigger the animation, and have the “stop” marker affect the layer’s opacity. Ideally, I’d like the opacity to start fading out and finish at 0% when it hits the “stop” marker.
The problem now is once the opacity gets down to 0% at the first “stop” marker, it stays at 0% for the duration of the comp. Is it possible to force the layer to be at 100% opacity at the “start” marker, fade down to 0% at the “stop” marker, and then be back at 100% by the time the next “start” marker hits?
So for example…
frame 10 at “start” marker – animation starts and layer is at 100% opacity.
frame 100 – opacity starts fading out.
frame 110 at “stop” marker – opacity is at 0%
frame 150 at next “start” marker – animation starts and layer is back at 100% opacity.Is this even possible, or is there a better (much easier) way that I’m missing?
Thanks!
