Example
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
<?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>
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.
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..