Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Convert audio to keyframes data in Source text layer

  • Convert audio to keyframes data in Source text layer

    Posted by Micheel Leavitt on July 24, 2009 at 7:26 pm

    This seems simple enough, I just don’t really know how to pull it off…

    I want the source text to display the left, right, and both channels of Convert Audio to keyframes in one text file by pickwhipping them to Source text. So far I got them all in a big line displaying ten decimal places, and I only really need two decimal places. No fancy formatting, just the numbers displayed on one line with only two decimal places so it can be a header on the comp. Any help would be great. Thanks!

    Micheel Leavitt replied 16 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 24, 2009 at 7:56 pm

    Something like this should work:

    ampLeft = thisComp.layer(“Audio Amplitude”).effect(“Left Channel”)(“Slider”).value.toFixed(2);
    ampRight = thisComp.layer(“Audio Amplitude”).effect(“Right Channel”)(“Slider”).value.toFixed(2);
    ampBoth = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”).value.toFixed(2);

    ampLeft + “, ” + ampRight + “, ” + ampBoth

    Dan

  • Micheel Leavitt

    July 24, 2009 at 8:13 pm

    cool, thanks Dan, I also found another way to do it just now:

    L = thisComp.layer(“Audio Amplitude”).effect(“Left Channel”)(“Slider”);
    R = thisComp.layer(“Audio Amplitude”).effect(“Right Channel”)(“Slider”);
    B = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    d = 100; // set your decimal places: 10ths, 100ths, 1000ths, etc.
    x = Math.round(L*d)/d;
    y = Math.round(R*d)/d;
    z = Math.round(B*d)/d;
    x +”,” + y +”,” + z

    I like yours better tho, much cleaner. Thanks a lot man!

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