• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Using audio to adjust the Y positioning of an object

Explorer ,
Jan 04, 2024 Jan 04, 2024

Copy link to clipboard

Copied

Hello Everyone!

 

I am trying to create a basic animation in which a character on a pogo stick is bouncing up and down. To do this, I used audio from a real pogo stick and the keyframe assistant to generate a slider that could help influence the Y positioning.

 

Unfortunately, it moved my character completely off-screen and I realize that I need to create a custom expression to help center the object and let the audio slider influence the positioning. I have very little experience in creating expressions. There's more info available in this recording:

 

Video link just in case: https://youtu.be/q-7pPgxgvns

 

I'd welcome any insight!

I am trying to create a basic animation in which a character on a pogo stick is bouncing up and down. To do this, I used audio from a real pogo stick and the keyframe assistant to generate a slider that could help influence the Y positioning. Unfortunately, it moved my character completely ...
TOPICS
Audio , Experiment , Expressions , How to , Scripting

Views

154

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Enthusiast , Jan 04, 2024 Jan 04, 2024

Hi, the solution would be simple. You need to rewrite your expression a bit. Leave the first line of expressions as is and modify the second one to the following:

 

[value[0], value[1] + temp]

 

This will add audio amplitude values to the Y coordinates only. If the "temp" value produces too high values and you want to adjust them further, you can come up with something like this:

 

[value[0], value[1] + temp / 50]

 

Where 50 is a percent of how much you would like to reduce the amplitude.

Depending on th

...

Votes

Translate

Translate
Community Expert , Jan 04, 2024 Jan 04, 2024

Here's the workflow:

  1. Select the Both Channels Audio Amplitude value in the Timeline and open the Graph Editor
  2. Make sure the Graph Editor is set to Value and look for the maximum and minimum values and make a note of them
  3. Make a note of the minimum and maximum Y value you want for the Pogo Stick character
  4. Start an expression for the Pogo Stick character's position value
  5. Add the following expression to Position:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
y = ease(t,
...

Votes

Translate

Translate
Enthusiast ,
Jan 04, 2024 Jan 04, 2024

Copy link to clipboard

Copied

Hi, the solution would be simple. You need to rewrite your expression a bit. Leave the first line of expressions as is and modify the second one to the following:

 

[value[0], value[1] + temp]

 

This will add audio amplitude values to the Y coordinates only. If the "temp" value produces too high values and you want to adjust them further, you can come up with something like this:

 

[value[0], value[1] + temp / 50]

 

Where 50 is a percent of how much you would like to reduce the amplitude.

Depending on the complexity of the animation, it would probably also be worth trying to go with Motion Sketch to do that animation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2024 Jan 04, 2024

Copy link to clipboard

Copied

Here's the workflow:

  1. Select the Both Channels Audio Amplitude value in the Timeline and open the Graph Editor
  2. Make sure the Graph Editor is set to Value and look for the maximum and minimum values and make a note of them
  3. Make a note of the minimum and maximum Y value you want for the Pogo Stick character
  4. Start an expression for the Pogo Stick character's position value
  5. Add the following expression to Position:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
y = ease(t, MinBothChannelValue, MaxBothChanelValue, -MaxUpMove, 0);
[value[0], value[1] + y]

If your minimum Both Channels value was 2.4 and the maximum was 8.5, and you wanted to Pogo Stick to move up 400 pixels, then the second line would look like this:

y = ease(t, 2.4, 8.5, -400, 0);

 

Because a pogo stick makes the loudest noise when it hits the ground, accelerates with some smaller noises, and then is quiet, you won't get a perfect motion. A better option would be to have a single bass drum or timpani sound for every jump. You will get a smoother arc.

 

If you want a perfect emulation of a pogo stick bouncing, animating three keyframes (bottom, top, bottom) and adjusting the Speed Graph to give you a nice smooth arc, then adding a simple loopOut() expression might get you a much better look with a lot less fiddling. 

RickGerard_0-1704440684426.png

Compare that to what I get from a pogo stick recording:

RickGerard_1-1704440899293.png

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 05, 2024 Jan 05, 2024

Copy link to clipboard

Copied

LATEST

Both expressions did the desired job and I'm going to tuck this info away for future projects.

 

Mr. Gerard, your advice on the loop was spot on as looping keyframes did create a much smoother motion. I apprecaite both your insights and help for this rookie.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines