FORUMS: list search recent posts

How to keep adding a number to a value?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jasper de Bruin
How to keep adding a number to a value?
on Mar 14, 2013 at 11:40:27 am

Hi there,

I used Trapcode Soundkeys to generate a number everytime you hear a kick in the audio. Everytime you hear a kick in the audio, the output in Soundkeys changes from 0 to 50 (and instantly drops to 0 afterwards). It's basically an on/off-switch timed on the kick.

Now I want to automatically add +50 to the rotation of another layer on every kick. I made this expression so far:

kick = layer.soundkeys.output1 ;

if ( kick = 50 ) {
[ value + 50 ] ;

However the problem is, this expressions makes my rotation to be stuck at 50 degrees (from the start). How can I make my layer to rotate 50 degrees on every kick?

Any ideas?

Thank you!

-Jasper


Return to posts index

Dan Ebberts
Re: How to keep adding a number to a value?
on Mar 14, 2013 at 5:34:50 pm

Expressions have no memory, so your expression either needs to go back in time and count all the previous kicks up to the current frame, or possibly you can make use of the Sound Keys "None (integrate)" Falloff option for that output.

Dan



Return to posts index

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