Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Trying to follow a tutorial, but stuck on expression

  • Trying to follow a tutorial, but stuck on expression

    Posted by Adam Dorsz on February 17, 2019 at 9:17 pm

    Hi,

    I’m trying to create a 3D audio visualizer in AAF and I’m stuck on an expression error.

    In the tutorial that I am following at around 1m30s, the guy copies an expression and inserts it into the position of a solid. I wrote down the expression and checked that it matches, but when I paste it in I get the ‘expression result must be of dimension 2, not 1’ error. I don’t know anything about expressions and I have no idea what I’m doing wrong. Would be great if someone could help me out.

    Thank you!

    https://youtu.be/yklQsJB9rcY?t=91

    myEndTime = 0;
    thisTime = time-thisLayer.inPoint;

    segMin = 0.8; //minimum segment duration
    segMax = 0.8; //maximum segment duration
    minVal =[0.0];
    maxVal =[10.99,6.99];

    end = 0;
    j = 0;
    if (thisTime >= myEndTime) t = thisTime else t= myEndTime;
    while (t>=end){
    j+=1;
    seedRandom(j,true);
    start = end;
    end += random(segMin,segMax);
    }
    endVal = random(minVal,maxVal);
    seedRandom(j-1,true);
    dummy = random();
    startVal = random(minVal,maxVal);

    [Math.floor(startVal[0]), Math.floor(startVal[1])]*150+[40,40];

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Adam Dorsz replied 7 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 17, 2019 at 9:40 pm

    I think to get it to work, you just need to add a semicolon to this line:

    if (thisTime >= myEndTime) t = thisTime else t= myEndTime;

    like this:

    if (thisTime >= myEndTime) t = thisTime; else t= myEndTime;

    Dan

  • Adam Dorsz

    February 17, 2019 at 9:58 pm

    That works, thank you sir!

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