-
Sound Keys Expression
So I’m trying to connect a Sound Keys audio output to the opacity of 15 color solids.
In this case Sound Keys is generating values from 0-100 based on the overall average output of a piece of audio.
Thanks to Dan Ebbert’s old site (thanks Dan!) I was able to create an “and” conditional statement that lets me turn on and off the various solids based on ranges within that 0-100 output. I apply this expression to opacity:
sk= thisComp.layer(“SK_Avg”).effect(“Sound Keys”)(“Output 1”);
if (sk>=7 && sk<=13) t=100 else t=0; t Great! As the values move up and down the spectrum, the 15 solids light up as if someone were playing them like a keyboard. But they're only on for a short time and I think it would look better if they slowly faded out over a few frames instead of just turning off, so I added this: d= 1; tD = opacity.valueAtTime(time - d); F= .5; sk= thisComp.layer("SK_Avg").effect("Sound Keys")("Output 1"); if (sk>=7 && sk<=13) t=100 else t=0 tF= t+ (F*tD); tF I thought this would add (.5 * the previous frame's opacity) to whatever the conditional generated. Doesn't work though. Can anyone help me out with this one? Seems like it should be mighty easy. Best, Mark Woloschuk