Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Limiting Expressions

  • Limiting Expressions

    Posted by Sandman on July 21, 2006 at 2:25 pm

    I am linking the scale of a Layer, to the audio keyframes of my soundtrack. I know how to do this, by dragging the pick whip of my Expression.

    Now I want the Scale expression not to go below or above certain dimensions (let’s say the scale fo the layer shouldn’t go below 25%, and not above 200%).

    Unfortunately i am not very good at writing expressions, what do I need to add to the expression that looks like this, in order to limit the scale?:

    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [temp, temp]

    thanks,
    y

    Sandman replied 20 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Mylenium

    July 21, 2006 at 3:39 pm

    Use something like this:


    min_audio=0; //minimum audio amplitude
    max_audio=10; //maximum audio amplitude
    min_scale=25; //minimum allowed scale
    max_scale=90 //maximum allowed scale

    driver=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);

    result=linear(driver,min_audio,max_audio,min_scale,max_scale);

    [result,result]

    Mylenium

    [Pour Myl

  • Sandman

    July 31, 2006 at 8:26 am

    cheers

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy