ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Animated sound bars responded to the music

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jahoo Clouseau
Animated sound bars responded to the music
on Oct 28, 2017 at 6:05:25 pm

I,m trying to make a simple UI with some animated elements which should look like a Blakmagic Design video assist bottom overlay. Is it possible to make a sound bars reacting to the actual soundtrack? And what about the something like a histogram -- is it possible to make it respond to the real footage on layer below the overlay?


Return to posts index

Andrei Popa
Re: Animated sound bars responded to the music
on Oct 30, 2017 at 2:27:28 pm

You should rightclick your audio layer>Keyframe Assistant> Convert Audio to Keyframes. This will create a new layer with the left, right and both channel proprieties. Make a bar, put the anchor point to one end, and pickwhip the size expression to one dimension of the new layer created. You must probably multiply this pickwhip value by some number(look at the top value of the channel you pickwhiped and divide 100 to that. This should be the multiplier).
So your expression on the scale should look something like this:

thisComp.layer("Audio Amplitude 2").effect("Both Channels")("Slider")*3;
if(x<100) [x,value[1]] else [100,value[1]]


The if is there to make sure your bar does not go over 100 in size, even if the sound comes out really loud.

Andrei
My Envato portfolio.


Return to posts index

Jahoo Clouseau
Re: Animated sound bars responded to the music
on Oct 31, 2017 at 5:39:36 am

Thanks Andrei, any thoughts on histogram?

thisComp.layer("Audio Amplitude 2").effect("Both Channels")("Slider")*3;
if(x&lt;100) [x,value[1]] else [100,value[1]]


Return to posts index


Andrei Popa
Re: Animated sound bars responded to the music
on Oct 31, 2017 at 7:56:39 am

I don't know about the histogram. This will make your histogram stick to the end of the bar
x=thisComp.layer("Bar Layer").sourceRectAtTime(time).width*thisComp.layer("Shape Layer 1").transform.scale[0]/100+thisComp.layer("Bar Layer").transform.position[0];
y=value[1];
[x,y]


If you could somehow put a condition that the speed to go to the right should me slower, maybe you could achieve the effect. Don't have any other idea at the moment. Let me now if you pull this up, i'm curious about the result.

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]