Thanks for your reply!
Your suggestion may be overkill for what I need
I'm looking for a very simple uniform and consistent up and down bouncing movement to the beat of a song. It should be really simple. My aim is for a somewhat "robotic feel" to the movement rather than dynamic movement that might change depending on the amplitude of the audio.
Just simple up and down with a bit of ease-in and ease-out at the "up" position, to better simulate jumping motion. Something like that.
Add this to your position for each head. Change the framesPerBeat to match your music, and amp to match how much movement you want.
curframe=timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
bob=easeOut(cyc2, 1, 30, 0, amp);
Since you are making a crowd of heads dance, I would assume that you want to offset them a bit to look more natural.
I added random offset to the time and amplitude.
seedRandom(3, timeless = true);
curframe=timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false)+offsetTime;
bob=ease(cyc2, 0, 29, 0, amp+offsetAmp);
- Select your audio layer
- Press the L key twice to reveal the waveform and check to see if you can see the beat
- If you have a strong indication of the beat then open the keyframe assistant from the Animation Menu or by right clicking and select convert audio to keyframes
- Select the newly created Audio Amplitude layer and press the U key to reveal the keyframes and select the tor Channels slider then open the graph editor and make sure you are editing the value graph
- Examine the high and low points of the graph and make note of the values
- Add your image layer to the composition if it is not already there and press the P key to reveal the position property
- Move the image layer to it's starting or resting position
- Hold down the Alt/Option key to add an expression to the position property and enter type in these letters t = then select the Expression Pickwhip and drag to the Both Channels slider, release and add ; then return to the first line of the expression.
- Type y = then from the Expression Language Menu just to the right of the pickwhip button select the expression method: ease(t, tmin, tmax, value1, value2) from the Interpolation section (now you know why the first variable was "t")
- Change tmin to the lowest average value you noted when examining the graph for Both Channels
- Change tmax to the highest average value you noted when examining the graph for Both Channels
- Set the value 1 to zero and value2 to the maximum number of pixels you want to have the image layer move, then add a semicolon to the end of the line
- Finnish the expression by setting up an array that will take the current value of x and subtract new y value from the current value of y to move the layer up to the beat like this [value, value - y]
- Select any other layer or property to close your expressio
You should have no errors and the final expression should look like this:
t =thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
y = ease(t, 3, 20, 0, 400);
[value, value - y]
So there you go. The whole process should take you about 4 or 5 minutes. Make adjustments to the values in the ease method as required. If needed you can add some smoothing to the expression but this gets complicated very quickly.
If you have no idea what I am talking about in any of the steps try using the search help field at the top right corner of AE and search for things like graph editor or keyframe assistant.
An alternate method would be to set markers on the beat in Audition or by hand in AE, then use an expression that looked at even or odd marker numbers and used the same ease or even a linear method to change the value of y.
Will try these suggestions out and see if I get the results I'm looking for.
@Donald, it's actually not a bunch of heads bouncing up and down together, but rather in sequence. So head A would be bouncing up and down and then we cut to head B bouncing up and down, then head C and so on.
I'll post back with an update. Thanks again : )