Belle Nuit Montage - Editing etc. - Lausanne - Suisse - e-mail: matti@belle-nuit.com
Homepage : Realbasic - Search - Sitemap
The TimeCode class provides methods to calculate Time Code values for film, video and audio applications. It supports all current frame rates including NTSC with Drop Frame.
Download class and sample project
TimeCode works with REALBasic 2.1 or later. It is self-contained and works with both 68k and PowerPC. It should work on Windows, but it hasn't been tested for.
Initializes the TimeCode class. You should call this method in the open event of your window, if you drag an instance directly to the window in the IDE. It sets the following default values
It also resets the Error and the Errormessage, so you might call this method after an error. The Class has written with Error handling, so you shouldn't get Runtime exceptions when you provide unvalid values. When the input values are invalid, the output is set to 0 or "". You can check for error with the Error method and check for an eventually errormessage.
If an error has occurred, you have to reset the class with TimeCode before doing further calculations
returns current frame rate
sets current frame rate. Allowed are values from 1 to 99 frames per second. fps 29.97 automatically enables Drop Frame mode.
return current Gauge
sets current Gauge. Allowed are 16 and 35. Gauge is used in the Meter, the Feet and the Keyframe functions.
returns current pulldown status
sets current pulldown status. Pulldown is used by the Keycode functions
True if TC is a valid timecode.
Translates from one frame rate to another based on the frame number.
Time Code values are treated as numbers in this class. This functions adds the colons for proper formatting. It uses the "00:00:00:00" for all frame rates, except for 29.97 where its uses "00:00:00;00"
Parses a time code string to a Time Code value which can be used as an argument for the Time Code functions. Allowed separators are ":", ";" and "."
Returns the TimeCode as time of the day 1.1.1904
Returns the timepart of the date as timecode.
The sum-function adds each value of the array.
Returns the 4th editing point when 3 points are provided.The edit array must have exactely 4 values: SourceIn, SourceOut, RecordIn,RecordOut. If all values are different from zero, then RecordOut is calculated.
Feet is formatted like feet.frames. 16.08 means 16 feet, 8 frames. In 35 mm, 1 feet has 16 frames, in 16mm 1 feet has 35 frames.
Meter is formatted like meter.cm
The Keycode functions use the Keycode format: prefix+feet+"+"+frames. In 35mm, one feet has 16 frames, in 16mm Keycode one feet has 20 frames (not 40).
Returns an about-string of the class.
Returns a string with the definitions of the methods.
Returns a string with the definitions of the properties.
Returns the current version of the class.
This class does not have any public property.
The TimeCode class is an extended port of the Excel Time Code extension to REALbasic. You can find more information about the Time Code on the TC.XLA-page.
© Belle Nuit Montage / Matthias Bürcher April 2000. All rights reserved. Written in Switzerland.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Comments please to matti@belle-nuit.com
The latest version is available at http//www.belle-nuit.com/
14.11.00 1.0.1 fixed bug in drop,undrop and h24 which caused errors in drop frame calculations.
8.6.00 Released as open source
6.5.00 Release TimeCode 1.0
![]()
Homepage : Realbasic - Search - Sitemap
e-mail: matti@belle-nuit.com - www.belle-nuit.com - 5.5.02