macros:example:timecodestarttimefrompalettefade
Table of Contents
Example
Timecode - Set Start Time from Palette Fade
by: | Gregory Haynes, February 2022 |
---|---|
published: | here |
description: | set the Timecode start time from palette fade time |
remarks: | best used with Web API. Set the fade time via POST request and then fire this macro to set the start time. |
This is a brilliant workaround for versions before Titan v14 when the TimecodeTime cast was introduced. The API calls are shown in Set Timecode Start from Palette fade
functions
affected properties
control structures
Code
- TCtimefromPalettefade.xml
<?xml version="1.0" encoding="utf-8"?> <avolites.macros> <macro id="Avolites.Macros.SetStartTime" name="Set Start Time from Palette Fade"> <description>Set the start time from the current palette fade time.</description> <sequence> <step>Timecode.TimecodeOne.SetStartTime( Timecode.MakeTimecodeTime( 0, 0, int:Palette.Numeric.InputValue, Math.Cast.ToInteger(( Palette.Numeric.InputValue - float:int:Palette.Numeric.InputValue) * 1000), false, 1000))</step> </sequence> </macro> </avolites.macros>
Explanation
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
This takes the number entered in the root menu (used for specifying the time to fire the next palette), splits it into seconds and milliseconds and uses that to create a TimecodeTime object and set the start time.
How to use it
- you can now input a time with the number keys and then fire this macro to transfer this into a timecode start time
- in order to use this with WebAPI you need to copy this macro to a handle - albeit it looks like you can remove it from the handle thereafter copying makes it available for the WebAPI
For WebAPI workflow would be to set the Palette.Numeric.InputValue from WebAPI first and then run the macro. The seconds value will rollover into minutes and even hours so you can use a value of 120 for 2 minutes etc..
You could leave a comment if you were logged in.
macros/example/timecodestarttimefrompalettefade.txt · Last modified: 2022/02/04 10:05 by 127.0.0.1