-
making opacity binary (on or off) with expression
I’m trying to make an effect controlled by music, and I need to make a layer’s opacity controlled by the Audio Amplitude keyframes I converted from the audio. I think I’m 80% there with this expression on the opacity of the layer:
transform.opacity=(thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”))
That’s varying the opacity, but what I need is for the layer’s opacity to be binary, either 0% or 100% depending on the “audio amplitude”. In other words, I want to be able to say, “if the amplitude is greater than X, be ON, if not, be OFF” Does that make sense? Any ideas?
transform.opacity=(thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider"))