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 :
http://oscarvideo.free.fr/remap_ar.mov
http://oscarvideo.free.fr/remap_av.mov
and here is the expression :
Code: Select all
t=timeToFrames(inPoint);i=0;
while(timeToFrames()>=t)
{
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}
t++;
}
timeRemap.valueAtTime(time-framesToTime(i))