-
video speed connected to audio amplitude
Hi,
this might sound weird, and I am certainly not very comfortable with Javascript, but I try to do this for a couple of hours now with no success:
I want a video to play faster whenever the audio of another layer gets louder. I tried this:
(Get_Frame is a Sapphire FX, which shows a specific frame from a clip. This expression is connected to that very Get_Frame instance.)var1 = effect(“S_GetFrame”)(“Get Frame”);
a = thisComp.layer(“Audioamplitude”).effect(“”Both Channels”)(“Slider”);
b = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false)/10;
var2 = a + b;
if (var2 > var1) {var1 = var2};
var1;What I want here is the video not to go back in time, but only advance in time. The “/10” sets the slowest speed to 3fps. The whole problem here is that it still goes back in time a couple of frames (depending on the audio). The main issue would be that the value for Get_Frame is only supposed to go up over time, and not down.
My knowledge of Javascript is almost non existing, and to even get to that point took a while. Any help is greatly appreciated!
Cheers
Marcus