Beat to frame converter
i want to make a converter which calculates, at a given BPM, the corresponding number of frames of the duration of 1 beat. My goal is to make video loops in sync with a song. (Basically i think my question is how long, in ms, is a frame.)
Any help anyone ?
The number of frames per beat can be calculated as
where F is the framerate (number of frames per second).
Example: BPM=120, F=30 gives 15 frames per beat.
Hey broc, how are you ?
ok so i got several questions :
1. when i send the message getfps, the result is 14.227…. but when i use the jit.fpsgui object, it monitors a value around 59… How do you explain this ?
2. when sending the gettime message, in which format is the result ? frame number, right ?
3. is there a way of setting loop on without jumping to the looppoints ?
4. is the fps codec dependent ? or is it more complicated ?
Sorry, I don’t have any experience with video in Max.
But I’m sure somebody else can answer your questions.
… if I may jump in …
1. two different things.
– the getfps gives you the frames/sec for the encoded movie. you you define this once in the compression dialog when you export the movie file and stays forever with it.
– the fpsgui object reflects the framerate for the reproduction of the movie. this depends on your computer power and can be anything. it has nothing to do with the movie (well the heavier the datarate the slower the reproduction framerate this is… depending on, right, your computer power)
– gettime gets you the time in the bang_moment. this is not ms but the internal quicktime format and can also vary, depending on the compression.
– see messages /jump/frame/time/
– see 1.
Thank you very much.
i still have to find a solution to make perfect loops in a defined bpm.
for 3, i’ll experiment, i should have missed something, but activating the loop makes an automatic jump to the start loop point.
Thank you for the patch (i am not that new to it…).
I’ll probably end with an experimental workaround.
What i do is i have a guy filmed singing a playback.
i want to sync the video with the music, but i still want to play it really live (so parts have no defined lengths).
So the idea is i split the video in 4 or 5 parts. I make cues for this. But at the end of one part, i want like a 1 bar loop until, the next cue is triggered by hand.
I think it will work if i engage loop on when the time value exceeds the loop start points.
Forums > Jitter