here's some tips on getting this to werk-
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("Audio Amplitude").effect("Both Channels")(1).valueAtTime(framesToTime(t));
if(f>=min && f<=max){i+=1-a}
t++;
}
timeRemap.valueAtTime(time-framesToTime(i))
To recapitulate the usefull help put on this thread already:
1. Add music to comp first,
2. Select Menu 'Animation' - apply the Keyframe Assist - Convert audio to keyframes.
3. Add your videoclip to comp, disable its audio track, or you will hear strange clicks on final render.
4. Select the video layer in the comp, then select the menu 'Effects' - Expression Controls - Slider control ; you can set the effects layer name by hitting the enter key, if you are new to AE this should help. Rename the first Slider Control to frequence max.
5. Repeat step 4, naming the next Slider to 'frequence min'
6. Do step 4 again, name slider 'frames'.
7; Observe the "Audio Amplitude" keyframes layer created from your music track layer. you can expand the effects sub-levels to see the slider level called "Both Channels" . You can see a graph which corresponds to the audio of the music layer waveform.
8. Set the 'frequence max' effect slider you added to your video track to the peak value you observed in step 7, on my audio this was ~55.0 , then set frequence min to about 40.0 this gives enough animation effect for my liking. I set frames slider to -3.0.
Have fun
