Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Strummin’ a guitar

  • Strummin’ a guitar

    Posted by Rob Wolf on July 19, 2007 at 2:44 am

    Ok, here’s a nice brain teaser for you all…

    I have a character whose arm I’d like to animate strumming a guitar using the puppet tool and Convert Audio to Keyframes (CAK). I’ve got the guitar track isolated, so it’s a really clean audio sample to work with. The puppet tool is a bit unpredictable, but I’ve got it looking somewhat believable.

    I know I need to write an expression to get the arm to move along with the audio. I’m still very new to expressions and this is way outta my league.

    I’ve got my keyframes created from my audio track, and they seem to go between 0 and 12. My arm position needs to move on the Y axis from 25 to 35.

    Since it’s a guitar, the strumming needs to vacillate between up and down motions. In other words, it’s not just a function of making the loud parts go up and the soft parts go down. Something tells me there’s a Sin function in my future.

    Bonus points for making the X position vary randomly from 55 to 60.

    Anyone like to take a crack at this?

    Thanks,
    Rob

    Filip Vandueren replied 18 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    July 19, 2007 at 9:43 am

    Hi Rob,

    I think this would be best tackled using markers.
    The audio-amplitude keyframes hold too much informations for this, we just need the exact moment we can consider the start of a strum, not how long or loud the strum is.
    To figure that out with expressions would mean a lot of looking forward and backward in time to see if the amplitude is (still) above a certain level: this is a very slow process unfortunately.

    Depending on how long your clip is, my first suggestion would be to enter the strums manually (you can do this in realtime by hitting the *-key during a ram- or audio-preview).

    The markers could be generated by a script that analyzes your audio-amplitudes, but I believe this code would need so much masaging and even then manually editing the results that I think it a waste of time.

    Once you have a bunch of markers at the start of each strum, you van use the techniques described in this tutorial:

    https://library.creativecow.net/articles/ebberts_dan/audio_sync.php

    see if you can get that set up, then we’ll discuss the alternating strum, and random values.

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