Timecode.TimecodeOne.SetStartTime

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
sideshowbond
Posts: 167
Joined: 18 Nov 2016, 20:58

Timecode.TimecodeOne.SetStartTime

Postby sideshowbond » 04 Nov 2019, 09:14

I was wondering how the time formatting on

Code: Select all

Timecode.TimecodeOne.SetStartTime(TimecodeTime time)

works.

Any help is appreciated :)
User avatar
Gregory
Site Admin
Posts: 1145
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Timecode.TimecodeOne.SetStartTime

Postby Gregory » 05 Nov 2019, 15:29

You can use either the Timecode.MakeTimecodeTime function to create a value or the is a cast converter "timecode" in v12.0 which you can use to convert a string in the following format "HH:MM:SS.FF/RR", for hours, minutes, seconds, frames and rate respectively. Rate is optional and you can use either colons or periods as separators.
User avatar
sideshowbond
Posts: 167
Joined: 18 Nov 2016, 20:58

Re: Timecode.TimecodeOne.SetStartTime

Postby sideshowbond » 06 Nov 2019, 15:00

Thanks Greg. As I am not on v12 yet, am I looking at something similar to this?

Code: Select all

<step>Timecode.MakeTimecodeTime(01, 02, 03, 04, false, 100)</step>
<step>Timecode.TimecodeThree.SetStartTime(TimecodeTime)</step>

I managed to get the first step working via API and had a result returned, however when I try to run this as macro I get an action script error. I got an idea in which area I am heading wrong, I have no idea how exactly though.
User avatar
Gregory
Site Admin
Posts: 1145
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Timecode.TimecodeOne.SetStartTime

Postby Gregory » 09 Nov 2019, 18:55

Try something like this:

Code: Select all

<step>Timecode.TimecodeThree.SetStartTime(Timecode.MakeTimecodeTime(01, 02, 03, 04, false, 100))</step>

The MakeTimecodeTime function returns a TimecodeTime object which can be passed in directly as the parameter to the SetStartTime function.
User avatar
sideshowbond
Posts: 167
Joined: 18 Nov 2016, 20:58

Re: Timecode.TimecodeOne.SetStartTime

Postby sideshowbond » 10 Nov 2019, 20:34

awesome, thank you. Combined with the Resume macro this works lovely to trigger Winamp tracks. However would there be a way to set the timcode to anything higher than 23hrs? Winamp plays timecode for track 26 just fine, Titan displays that as 01:00:00:00 but seems to read that as 26, obviously counting the days which are not displayed. However would there be a way to set the days as well so I can trigger songs 25 upwards?
User avatar
Gregory
Site Admin
Posts: 1145
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Timecode.TimecodeOne.SetStartTime

Postby Gregory » 19 Nov 2019, 21:22

The only way to set higher track numbers is to use the Winamp fixture and set the Playlist attribute. Once you have done this you could change the track position by leaving the hour set to zero without affecting the current track.

Unfortunately it doesn't help with the above question but in case it is useful for you there is a slightly different way of setting the start time:

Code: Select all

Timecode.SetStartTime(int:Timecode.TimecodeThree.SelectedTimecode, Timecode.MakeTimecodeTime(5, 0, 0, 0, false, 100), false, true)

The reset argument will make Winamp to jump directly to the specified time without having to send an additional Reset command, the delta argument will increment or decrement the start time by the time specified (note this is separate from the current time).

Who is online

Users browsing this forum: No registered users and 2 guests