ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Color Expression with Audio

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: Color Expression with Audio
on Jan 31, 2008 at 6:24:38 pm

Something like this should work:

threshold = 10.0;

audioLev = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

above = false;
frame = Math.round(time / thisComp.frameDuration);
n = 0;
while (frame >= 0){
t = frame * thisComp.frameDuration;
if (above){
if (audioLev.valueAtTime(t) < threshold){
above = false;
}

}else if (audioLev.valueAtTime(t) >= threshold){
above = true;
n++;
}
frame--
}

seedRandom(n,true);
random([1,1,1]) + [0,0,0,1];


You may have to adjust the value of "threshold".

Dan



Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]