Table of Contents

Example

Timecode - Winamp Tracks

by: Sebastian Beutel, November 2019
published: here
description: example to fire some distinct Winamp tracks based on the actual time
remarks: idea: https://www.facebook.com/groups/1811437589141428/permalink/2489876031297577/

The idea is to fire some Winamp tracks - with a timecoded show per track - at various times (real time of day).

The first idea to put everything into one cuelist did not work as then the timecode stamps would not be in successive order. However it can be done with two separate cuelists which also has some more advantages, e.g. it is very easy to adjust the general showtime (just offset the times in the Masterlist) without tampering with the showlist's times.

In theory it would be possible to do this without any coded macros by using the Winamp fixture but this turns out to be not very reliable (see Alex Del Bondio's remarks). Thus, Winamp is assigned as timecode source, and the tracks are selected with SetStartTime().

Global parameters:

A macro file with track macros for track 1~4 and the pause macro is available here: timecodespecial.xml

There are similar functions and properties in the namespaces Timecode.TimecodeOne, Timecode.TimecodeTwo, Timecode.TimecodeThree and Timecode.TimecodeFour. Use the functions for the particular timecode you want to use.

functions

affected properties

control structures

Code

timecodetracks.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
 
  <!-- Winamp uses the hour nibble as track identifier, e.g. the first track in the playlist starts at 01:00:00:00 -->
 
  <macro id="wiki.Macros.SetTimecodeTwoToWA1" name="TC2 Winamp Track 1">
    <description>Sets Timecode 2 to a specific value.</description>
    <sequence>
      <step>ActionScript.SetProperty.Enum("Timecode.TimecodeTwo.Source", "Winamp")</step>
      <step pause="0.05">Timecode.TimecodeTwo.SetSource(Timecode.TimecodeTwo.Source)</step>
      <step pause="0.05">Timecode.TimecodeTwo.SetStartTime(Timecode.MakeTimecodeTime(1, 00, 00, 00, false, 100))</step>
      <step condition="Math.IsEqual(Timecode.TimecodeTwo.IsControlAllowed, true)">Timecode.TimecodeTwo.Reset()</step>
      <step condition="Math.IsEqual(Timecode.TimecodeTwo.IsControlAllowed, true)">Timecode.TimecodeTwo.Play()</step>
    </sequence>
  </macro>
 
  <!-- macros for other tracks are in the attached file -->
 
  <macro id="wiki.Macros.SetTimecodeTwoToPaused" name="Pause Timecode 2">
    <description>Pauses Timecode 2.</description>
    <sequence>
      <step condition="Math.IsEqual(Timecode.TimecodeTwo.IsControlAllowed, true)">Timecode.TimecodeTwo.Pause()</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

The first macro makes sure Timecode 2 is set to Winamp and fires track #1 by setting the timecode time and starting the timecode:

The other macro Pause Timecode 2 might be required to pause Winamp:

How to use it

When playing with this I found it useful, after bigger changes, to release the cuelists and restart them. Apart from that I did not see any hickups. Please share your experience.