Forum Replies Created

  • David Kaminski

    December 11, 2016 at 6:04 pm in reply to: Trigger scale animation up/down on every second beat

    Well this is frustrating. The line should read-

    if (output.valueAtTime(t) < 30){

  • David Kaminski

    December 11, 2016 at 5:59 pm in reply to: Trigger scale animation up/down on every second beat

    Change the “<” to a less than sign. I don’t know why this site changed it.

  • David Kaminski

    December 11, 2016 at 5:55 pm in reply to: Trigger scale animation up/down on every second beat

    I would be curious to know the proper way to do this also. I have a workaround that is not the real deal, but may pass for what you’re looking for.

    I put this expression together based on some examples on this forum. I can’t remember exactly where, but I’m sure Mr. Ebberts is to thank. This will only give a teleporting effect to start… But if you were to then convert the expression into keyframes and turn on motion blur, it gives the effect of movement back and forth on each beat.

    // Increase value by 1 on each beat
    output = thisComp.layer("Snare").effect("Sound Keys")("Output 2");

    above = false;
    frame = Math.round(time / thisComp.frameDuration);
    val = 0;
    while (frame >= 0){
    t = frame * thisComp.frameDuration;
    if (above){
    if (output.valueAtTime(t) &lt; 30){
    above = false;}
    }
    else if (output.valueAtTime(t) >= 30){
    above = true;
    val++;}
    frame--}
    val

    //On each increase, alternate back and forth
    zVal1 = [100,2200];
    zVal2 = [10,2200];
    val%2 ? zVal2 : zVal1;

  • That works, thank you!

  • David Kaminski

    November 23, 2015 at 1:19 am in reply to: Using linear() with smooth() in the same expression

    I continued experimenting and finally achieved what I wanted. I didn’t realize the third value of smooth() was time. Putting my offset in the smooth expression took care of everything. If someone happens to run into the same problem here’s what I did-

    offset = effect("Controller")("Offset");
    s = effect("Controller")("Smoothing");
    output = comp("Comp 1").layer("Setup").effect("Range 1")("Output 1").smooth(s,10,time + offset);
    min = effect("Controller")("Range Minimum");
    max = effect("Controller")("Range Maximum");
    linear(output,0,100,effect("Controller")("Min"),effect("Controller")("Max"));

    Dave

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