

And this is wrong.īut more worse if we’re using another fps (frame rate)ĭoing the example with 30fps, then we have 16 f++ steps, this makes 1280ms a second.īut before we start the Generator, we must store the microseconds into a variable: So we have the 80ms now 13 times and this makes 1040 ms a second. In this case the seconds are a result of counting the 25 frames in 13 steps up. What I mean is the way you’r calculating the seconds. Second, you have to decide if Bulk TC shall add or subtract the timecodes. First, to use Bulk TC, you have to choose your timecodes' frame rate (defaults to 24 FPS). The timecodes it works with are SMPTE-conform timecodes or simple frames counts. and might be helpful for a smoother display reading Bulk TC is a timecode calculator that can add or subtract multiple timecodes and frame counts. If (f>24) // I’m not French I’m German but the standard is also 25 frames/second There are 2 mager mistakes in this project.ġst the usage of timedAction is not a solution in this case.Ģnd the way to dice the seconds is improper.īefore you bother longer, please let me explain.Īfter if (++indice>7) we have ‘80ms’ by 8 times calling the GenMTC()

Sprintf(toDisp, "%02d:%02d:%02d.%02d", h, m, s, f) ġst of all a good idea, but far from perfect. If (f>24) // I'm French, so from standard is 25 frames/second Serial3.begin(31250) // use of TX3/RX3 of Arduino Mega TimedAction timedAction = TimedAction(10,GenMtc) Ĭhar toDisp // 6 lines of 14 characters. this initializes a TimedAction class that will send MTC quarter frame every 10 milliseconds so 80 milliseconde for Accuracy is’nt good (timing stability along hours, must be implemented in other way with interrupts or else…) #include
#TIMECODE CALCULATOR 25FPS CODE#
Be carefull, every 2 frames as MTC works is around 8/100 of seconde !Įasy code to modify, or adapt to other case. Serial.begin(115200) // To trace and display timeocde
#TIMECODE CALCULATOR 25FPS SERIAL#
Serial3.begin(31250) // I use Arduino Mega TX3/RX3 serial / Modify for other arduino hardware *Įnum // Frames typeīyte h, m, s, f // hour, minutes, secondes, frames time codeīyte frameType // speed of MTC : 24fps / 25fps / 30 drop frame / 30 fps It can be usefull for some people that wants to deal with MTC. This is a piece of code for Arduino to decode MidiTimeCode.
