1 Reply Latest reply on Apr 10, 2011 9:54 AM by Rick Gerard

    Speaker Bounce Expression

    ColtonVideography.com Level 1

      I'd like to make a speaker graphic bounce (scale oscillation) at a constant rate, as if the beat of the music were making it bulge. Is there an expression that could make the scale oscilate at a constant rate?

        • 1. Re: Speaker Bounce Expression
          Rick Gerard Adobe Community Professional & MVP

          You'll want to use the Keyframe assistant to convert your Audio layer to keyframes. Then you can tie the scale of the layer to the audio keyframes with a simple expression. If you've renamed your audio keyframes layer "audio:" this expression should work just fine:

          aud = thisComp.layer("audio").effect("Both Channels")("Slider"); // Audio Keyframe value
          
          s = ease(aud, 50, 100);
          [s, s]
          
          

          All the expression is doing is taking the value of the Both Channels Slider and scaling the 0 to about 20 values generated by the Keyframe assistant to values between 50 and 100% for the scale property. You can further refine the expression by adding an if / else statement that sets a minimum and maximum triggering value for the audio keyframes. You can also adjust the last two values in the ease expression to any two scale properties you want.

           

          Hope this helps.