Page 1 of 3

To rhythm a video according to a sound

Posted: February 14th, 2005, 1:45 pm
by oscarus
This expression allows you to manipulate time remapping on video layers in accordance with audio layers (fast-forward/freeze frame/rewind/...)

You might need to tweak the sound a little so that it contains clear frequency amplitudes.

Here is how to use it :

First of all convert the audio to kyeframes : Animation>keyframe assistant>Convert audio to keyframes. You get an "Audio Amplitude" layer. The expression only takes into account the keyframes of the "Both channels" stream, so you can consequently delete the "Left" and "Right" channel streams.

Next step is to apply three times the "Slider Control" effect to the Video layer you want to affect. Name them : "frequence min", "frequence max" and "frames"
(you can also use custom names, but correct them accordingly in the expression code).

Finally, apply the expression to the "Time remapping" property of the video layer.

Here two examples :

and here is the expression :

Code: Select all

min=effect("frequence min")(1).valueAtTime(framesToTime(t));max=effect("frequence max")(1).valueAtTime(framesToTime(t));a=effect("frames")(1).valueAtTime(framesToTime(t)); 
f=thisComp.layer("Amplitude audio").effect("Les deux couches")("Curseur").valueAtTime(framesToTime(t)); 
if(f>=min && f<=max){i+=1-a} 

Posted: February 21st, 2005, 8:14 am
by jonnyquest45
effect("Les deux couches")
im a bit confused abut the above line
i know it means two layers
but what effect is this refering too.

Posted: February 21st, 2005, 10:58 am
by Shinjipierre
eheh, Thta's because he's using the french version of after effects.

One should careful when coding script :p

English scripts work for all languages, but ther languages only work on their own version ^^.

"Les 2 couches" = "Both channels"

("Curseur") won't work either ^^.

Posted: February 21st, 2005, 1:13 pm
by jonnyquest45
Shinjipierre wrote:
("Curseur") won't work either ^^.
and just to be a total non french speaking person
what word should i use in this case

Posted: February 21st, 2005, 3:48 pm
by Shinjipierre
Hummm, I've tried your expression... I don't really know how I should configure the 3 sliders, if you could tell us a bit more ...

Posted: February 23rd, 2005, 5:55 am
by oscarus
Hello jonnyquest45 and Shinjipierre !

Here the expression for the English version :

Code :

min=effect("frequence min")(1).valueAtTime(framesToTime(t));max=effect("frequence max")(1).valueAtTime(framesToTime(t));a=effect("frames")(1).valueAtTime(framesToTime(t));
f=thisComp.layer("Audio Amplitude").effect("Both Channels")(1).valueAtTime(framesToTime(t));
if(f>=min && f<=max){i+=1-a}


Posted: February 23rd, 2005, 8:40 am
by jonnyquest45
that is freaking sweet. i can think of a million difrent ways to use this

Posted: February 26th, 2005, 9:05 am
by jonnyquest45
if i wanted this to effect lets say rotation
i would change the part about time remap to rotation?
sorry im new to the whole concept of expressions.

Sound Keys Outputs

Posted: February 26th, 2005, 1:40 pm
by Lasvideo
By adding "-100 to 100" as the range for the frames slider, I can get it to reverse direction. Can anybody modify the expression to utilize the 3 outputs from Sound Keys? I tried the obvious and didnt meet with success.

Posted: March 4th, 2005, 8:54 am
by martin
That's such a pretty cool effect.
But I can't get it to work.
Is there a step by step tutorial?

I made everything like oscarus said.

But the Movie is just jumping fast and is not playing und jumping back & foward etc.,
Do I need a single audio and video or can a take the aufio out of the video track?

do I have to change the frequence min, - max and frames. How does it know , which frequence it should take, for example the bass drum.

Thank you guys.



Posted: March 4th, 2005, 8:56 am
by jonnyquest45
you have to set the feq max and min use the slideers you pu on the video layer. make sure your min is less then you max.
then you need to set the frames. to get it to jump back set a negitive number i like 3 frames to 5 frames for most stuff.

How can expression be modified to create the following…

Posted: March 4th, 2005, 10:12 am
by pseudojag
Can anyone please explain how to modify the above expression so that the video moves forwards slowly and then jumps ahead on the specified frequencies. Just like here…

Thanks for any help you guys can give me


Posted: March 4th, 2005, 11:14 am
by ranjha

if you have trapcodes soundkeys, check out this thread at creativecow, it does exactly what you want. ... ght=ranjha



Posted: March 4th, 2005, 11:40 am
by pseudojag
Dear Ranjha,

Thanks for the link. I have Soundkeys… but could you be more specific with settings…? I tried Dan Ebbert's Sound Keys settings but all I get is a still frame of video. Maybe you could post your settings (what layer was linked to which expression, etc… for clarity's sake).

Thanks for your help


Will Buy Plugin

Posted: March 4th, 2005, 7:01 pm
by Lasvideo
Hey, to whoever applied for a patent relating to sound controling motion... I'd love to buy your softeware. I encourage you to market it, many people would bury you in sales Im sure!