FORUMS: list search recent posts

Incrementing position of a layer using Trapcode Sound Keys

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
james baron
Incrementing position of a layer using Trapcode Sound Keys
on Jan 6, 2012 at 4:52:21 pm

Hi there,

Im trying to use the result of an output of sound keys to incrementally move the position of a layer..

This is what I have tried, I cannot get the value to continually increment


Thanks in advance for any help!

SK = thisComp.layer("Soundkeys").effect("Sound Keys")("Output 1").valueAtTime(time+0.1)
xPos = value[0] ;
yPos = value[1] ;
if (SK > 80){
[xPos +20, yPos];
}else{ [xPos , yPos ] ; }


Return to posts index

Kevin Camp
Re: Incrementing position of a layer using Trapcode Sound Keys
on Jan 6, 2012 at 5:25:32 pm

i can't experiment with this now, but i think you should be able to incorporate dan's beat counter expression:

http://www.motionscript.com/design-guide/audio-count.html

the beat counter expression is the second one on that page.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Dan Ebberts
Re: Incrementing position of a layer using Trapcode Sound Keys
on Jan 6, 2012 at 6:34:50 pm

Another possibility is to set the Sound Keys Range Falloff control to "None (integrate)". This causes the output value to continually increase in response to the audio.

Dan



Return to posts index


james baron
Re: Incrementing position of a layer using Trapcode Sound Keys
on Jan 8, 2012 at 10:20:10 am

thanks for the replies...

Ok I tried using a while loop but am still stumped... I cant get the position to keep on incrementing

SK = thisComp.layer("Soundkeys").effect("Sound Keys")("Output 1").valueAtTime(time+0.1);
xPos = value[0] ;
yPos = value[1] ;
frame = Math.round(time / thisComp.frameDuration);

while (frame >= 0){
t = frame * thisComp.frameDuration;
if (SK > 80){
xPos = xPos+20;

}else {
xPos = xPos;
}
frame--
}

[xPos, yPos]


Return to posts index

Dan Ebberts
Re: Incrementing position of a layer using Trapcode Sound Keys
on Jan 8, 2012 at 4:39:23 pm

Try this:


SK = thisComp.layer("Soundkeys").effect("Sound Keys")("Output 1");
x = 0;

for (f = timeToFrames(time); f >= 0; f--){
t = framesToTime(f);
if (SK.valueAtTime(t) > 80) x += 20;
}

value + [x,0]



Dan



Return to posts index

james baron
Re: Incrementing position of a layer using Trapcode Sound Keys
on Jan 8, 2012 at 5:08:09 pm

ahh!! thanks so much, appreciate it. I see the mistakes I was making

Cheers!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]