August 9, 200421 yr I wonder if someone knows a simple calculation to calculate timcode difference TC_Hour - TC_Min - TC_Sec - TC_Frame {Maybe switch between (30fps, 24, 25)} Subtract - TC_Hour - TC_Min - TC_Sec - TC_Frame ------------------------------------------------------- Result TC_Hour - TC_Min - TC_Sec - TC_Frame If anyone could help! Thanks Thomas
August 9, 200421 yr I only have time to give you a few helpful hints. I'll try to get back to you with a more detailed explanation. First, be sure to have a framerate field. Next, you have to reduce the in and out timecodes to their coresponding number of frames. Now the math is simple, right? (frames per hour, frames per minute, etc.) If you plan to create a new timecode as a result of adding or subtracting frames (i.e. when using handles) then you have a final step of reconstituting the new timecode from the number of frames. I have found the MOD and INT functions to be very handy for this. Frames, for example is MOD(#_of_frames, framerate) which gives you the leftover frames. Use INT to eliminate decimal amounts when determining seconds, minutes and hours.
August 9, 200421 yr Author Thanks so much for your help. I am a beginner so I do not understand so good. If you will have some time and if you could explain it easier I would appreciate it! Thanks!
August 12, 200421 yr First convert both time codes to frames using LEFT, RIGHT and MID functions: (Left(timecode;2)*3600*framerate) +(Middle( timecode; 3; 2)*60*framerate)+(Middle( timecode; 5; 2)*framerate)+(Right(timecode; 2)) The subtraction is now simple, resulting in the difference, in frames, between the two timecodes. Making a timecode out of that frame count is more difficult: Right("0" & GetAsText(Int(frames/ (3600*framerate))); 2) & ":" & Right("0" & GetAsText(Int(Mod(frames; (3600*framerate)) / (60*framerate) )); 2) & ":" & Right("0" & GetAsText(Int(Mod(Mod(frames; (3600*framerate)); (60*framerate)) / framerate)); 2) & ":" & Right("0" & GetAsText(Int(Mod(Mod(Mod(frames; (3600*framerate));(60*framerate));framerate))); 2) Ugly, but it works....
Create an account or sign in to comment