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

Rotating Object to Music Expression?

New Here ,
Nov 07, 2016 Nov 07, 2016

Hello all,

I've been deep into a project for a long time and it's coming to the end.  I have Sound Keys set up with ONE output. 

I am looking to rotate a circle only to the Sound Keys Output, although I do not want the circle to move right 10 degrees then move back (-10 degrees), rather I'd like it to continuously move clockwise as the output value continuously adds itself to the previous value based off time.  

Is there an expression that would cover that?  Here's an example of what I thought was 'close' but the circle keeps going back and forth rather than continously around in 360 degrees. 

time+comp("Main Comp").layer("Sound Keys").effect("Sound Keys")("Output 1")

I've attached a screen shot as well for guidance. 

Thank you for your help!

RyanScreenshot_4.png

TOPICS
Expressions
1.7K
Translate
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 1 Correct answer

Community Expert , Nov 08, 2016 Nov 08, 2016

Set the Sound Keys Range 1 Falloff to None (integrate).

Dan

Translate
Community Expert ,
Nov 07, 2016 Nov 07, 2016

You have to iterate over all previous frames to achieve that which makes the expression pretty slow for long comps.

var result = valueAtTime(0);

for(var t=0; t<=time; t+=thisComp.frameDuration){

    result += comp("Main Comp").layer("Sound Keys").effect("Sound Keys")("Output 1”).valueAtTime(t)

}

result;

Alternatively, if you want the rotation to happen in a regular pattern at each beat, you can use my tool BeatAssistant. It will generate keyframes for you and hence be much faster:

http://aescripts.com/beat-assistant/

Cheers,

Mathias

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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 ,
Nov 08, 2016 Nov 08, 2016
LATEST

Set the Sound Keys Range 1 Falloff to None (integrate).

Dan

Translate
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