Brian Dunning's FileMaker Custom Functions

TimeCodeCalculations ( inVleA ; inVleB ; FrRate ; filmFrm ; fnType )

An attempt to perform several time-code-oriented calculations using -- within a single function -- a set of non-recursive computations.

  Average rating: 4.3 (35 votes) Log in to vote

Edward Souza   Edward Souza
Duana A.S. Designs, LLC
n/a

Share on Facebook Share on Twitter

  Sample input:
( "00;10;00;00" ; "00;22;18;25 ; "29.97DF" ; "" ; "tcDiff" )
  Sample output:
00;12;18;25

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This is the fifth version of "TimeCodeCalculations" written; hopefully, it will be working fine for those needing to compute SMPTE time-code oriented calculations. It is until under beta testing; reporting its bugs or giving ideas on how to have it improved will be greatly appreciated.
The calculations "TimeCodeCalculations" performs are:
1. the time lag between two SMPTE time-code spots ("tcDiff");
2. the midpoint of two different SMPTE time-code spots, or a SMPTE time-code spot and a frame number, or two different frame numbers ("tcAxle");
3. the sum or subtraction of a SMPTE time-code spot and a frame number or the sum of two SMPTE time-code spots ("tcSum");
4. the conversion from SMPTE time-code to film footage and vice-versa ("tcCvn"), and;
5. the frame rate conversion of a SMPTE time-code spot ("frCvn").

I wrote a didactical yet long essay attempting to clearify the complexity of SMPTE time-code subject. I just hope the text compiled from several SMPTE sources aids you -- who have the patience to read it -- to gather a broader understanding of this matter.
For a deeper understanding of the custom function and how it works, please refer to the sections entitled "WHAT CAN YOU EXPECT FROM THIS CUSTOM FUNCTION" and "CUSTOM FUNCTION PARAMETERS".

Thank you for trying "TimeCodeCalculations".

 

Comments

Paul C.   Paul C., London, UK
Sep 8, 2010
Hey Edward,

Awesome CF!
I copied version 1.1.5, looked at it, and was going to write down some suggestions, but I see you changed some of the code and shortened it a great deal.
I like the way you structure your CFs, too, reminds me of Actionscript. :)
Also thanks for the intro on SMPTE timecode. I'll rate you 5, buddy.
 
Edward Souza   Edward Souza, Sao Paulo, BR
Sep 9, 2010
Hello, Paul,

Thank you, buddy! :)
You are right; the CF definitely needed a great deal of rethinking and restructuring, for it was too procedural. All I did was to design it modularly.
My deepest appreciation for your words.
All the best.
 
comment   comment, VR
Sep 11, 2010
See my notes here:
http://www.fmfunctions.com/fid/267
 
Edward   Edward, Sao Paulo, BR
Sep 11, 2010
Hello, Comment,

Already read and answered them.
I will be revising the CF as soon as I can.

Cheers.

Edward
 
Marianna   Marianna, RJ, Brasil
Sep 13, 2010
Oi, Edward,

Tô acompanhando essa troca de mensagens entre vc e o tal do Comment... se eu entendi bem, vc deu um banho de conhecimento e de atitude nele.
Comecei agora a usar o FileMaker no PC... serah q vc pode me explicar o basico?
Vlw e teh +.
 
Edward Souza   Edward Souza, Victoria, BC, CA
Sep 16, 2010
Hello, Marianna,

Sorry for the delay answering your message.

I don't mean to be rude, but in here we are supposed to discuss Custom Functions or exchange messages in English only, Marianna. Nonetheless, I appreciate your support. Thank you.

Which version of FM do you have?
I haven't touched a PC or the Windows version of FileMaker since v5.5, so I don't know how helpful I might be. Still, it will be an honor to help you.

All the best. :-)
 
Hubert Henle   Hubert Henle, Berlin
Sep 19, 2016
Hi Edward,

Not sure whether this CF is still supported - the last comment dates back several years now!

Anyway, while implementing your CF in a database solution I stumbled across two issues which I thought are worthwhile sharing:

1. In lines 399 and 400 (opening in TextWrangler) I had to replace the dots by a comma. That's certainly an issue with the systems decimal character setting which is a comma in my case. Changing the system setting is not an option.

2. If tcDiff results in 00:00:00:00 "error_02 - negative result" is returned. I believe this is down to an error in line 497; replacing "validTotFrs > 0" by "validTotFrs ≥ 0" gives the correct result.

Best, Hubert
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.