Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesTrainingCreative Cloud DebateFAQ

Re: Using soundkeys to control 2 different comps....

COW Forums : Adobe After Effects Expressions

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


Dan EbbertsRe: Using soundkeys to control 2 different comps....
by on Jan 24, 2012 at 10:19:12 pm

Here's a version of the beat-counting expression that will let you define how many frames to skip when a beat is detected. I haven't given it a thorough testing, but it seems to work:


threshold = 10.0;
skipFrames = 5;

audioLev = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
below = true;
frame = timeToFrames(inPoint);
n = 0;
while (frame <= timeToFrames(time)){
t = framesToTime(frame);
if (below){
if (audioLev.valueAtTime(t) >= threshold){
below = false;
n++;
frame += Math.max(0,skipFrames-1);
}
}else if (audioLev.valueAtTime(t) < threshold){
below = true;
}
frame++
}

n


This version starts at the in point and moves forward in time.

Dan



Posts IndexRead Thread
Reply   Like  
+1
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]