-
Can i get a “figed time”?
Hi everybody!
I did a metronome. The vertical bar is animated by a simple expression :
var amplitude = 32;
var bpm = 120; (beatPerMinute)
var f = (bpm/60)*2; (frequence)
sin(2*Math.PI*f*time)
Now i want to play a sound at the right time. It’s why i created a comp. Into this, a only one soundlayer with a marker at the frame number 1 (not 0).
I commented this marker : “playSound”.I addded this comp in another comp to time remaptime it and add expression on it :
var c = thisLayer.source;
var myComment = "playSound";
var m= c.marker.key(myComment);var amplitude = 32;
var bpm = comp('metronome').layer('barre').effect("Paramètre glissière")("Curseur");
var velocité = 2*Math.PI*((bpm/60)/2);var v = amplitude*Math.sin(velocité * time);
frames = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
iTime = framesToTime(frames+1, fps = 1.0 / thisComp.frameDuration);
iV = amplitude*Math.sin(velocité * iTime);absV = Math.abs(v);
absiV = Math.abs(iV);if(absV == amplitude || (absV
I need to substract the time value when the condition begins true and i don't know how to do that...
"m.time + time - figedTime"Thx for help
Sorry, there were no replies found.