User Tools

Site Tools


macros:example:timecodetracks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
macros:example:timecodetracks [2019/11/18 10:13] – created icke_siegenmacros:example:timecodetracks [2020/03/29 12:02] (current) – [Explanation] icke_siegen
Line 14: Line 14:
 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. 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 theary 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 [[macros:example:timecodestarttime|Alex Del Bondio's remarks]]. Thus, Winamp is assigned as timecode source, and the tracks are selected with ''SetStartTime()''.+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 [[macros:example:timecodestarttime|Alex Del Bondio's remarks]]). Thus, Winamp is assigned as timecode source, and the tracks are selected with ''SetStartTime()''.
  
 Global parameters: Global parameters:
Line 24: Line 24:
  
 A macro file with track macros for track 1~4 and the pause macro is available here: {{ :macros:example:timecodespecial.xml |}} A macro file with track macros for track 1~4 and the pause macro is available here: {{ :macros:example:timecodespecial.xml |}}
 +
 +//There are similar functions and properties in the namespaces [[macros:namespace:timecode.timecodeone|]], [[macros:namespace:timecode.timecodetwo|]], [[macros:namespace:timecode.timecodethree|]] and [[macros:namespace:timecode.timecodefour|]]. Use the functions for the particular timecode you want to use.//
  
 ==== functions ==== ==== functions ====
   * [[:macros:function:actionscript.setproperty.enum]]   * [[:macros:function:actionscript.setproperty.enum]]
-  * [[:macros:function:Timecode.TimecodeX.SetSource]] +  * [[:macros:function:Timecode.TimecodeOne.SetSource]] 
-  * [[:macros:function:Timecode.TimecodeX.SetStartTime]]+  * [[:macros:function:Timecode.TimecodeOne.SetStartTime]]
   * [[:macros:function:Timecode.MakeTimecodeTime]]   * [[:macros:function:Timecode.MakeTimecodeTime]]
   * [[:macros:function:Math.IsEqual]]   * [[:macros:function:Math.IsEqual]]
-  * [[:macros:function:Timecode.TimecodeX.Reset]] +  * [[:macros:function:Timecode.TimecodeOne.Reset]] 
-  * [[:macros:function:Timecode.TimecodeX.Play]] +  * [[:macros:function:Timecode.TimecodeOne.Play]] 
-  * [[:macros:function:Timecode.TimecodeX.Pause]]+  * [[:macros:function:Timecode.TimecodeOne.Pause]]
  
  
 ==== affected properties ==== ==== affected properties ====
-  * [[:macros:property:Timecode.TimecodeX.Source]] +  * [[:macros:property:Timecode.TimecodeOne.Source]] 
-  * [[:macros:property:Timecode.TimecodeX.IsControlAllowed]]+  * [[:macros:property:Timecode.TimecodeOne.IsControlAllowed]]
  
 ==== control structures ==== ==== control structures ====
Line 45: Line 47:
    
 ===== Code ===== ===== Code =====
-<code xml filename.xml>+<code xml timecodetracks.xml>
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
-<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd"+<avolites.macros
- <macro name="" id=""> + 
-    <description></description>+  <!-- Winamp uses the hour nibble as track identifier, e.gthe first track in the playlist starts at 01:00:00:00 --
 + 
 +  <macro id="wiki.Macros.SetTimecodeTwoToWA1name="TC2 Winamp Track 1"> 
 +    <description>Sets Timecode 2 to a specific value.</description>
     <sequence>     <sequence>
-      <step></step> +      <step>ActionScript.SetProperty.Enum("Timecode.TimecodeTwo.Source", "Winamp")</step> 
-     </sequence>+      <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>   </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> </avolites.macros>
 </code> </code>
Line 62: Line 81:
 This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]]
  
-tbd+The first macro makes sure Timecode 2 is set to Winamp and fires track #1 by setting the timecode time and starting the timecode: 
 +  * ''ActionScript.SetProperty.Enum("Timecode.TimecodeTwo.Source", "Winamp")'' sets Winamp as property ''Timecode.TimecodeTwo.Source'' 
 +  * ''Timecode.TimecodeTwo.SetSource(...)'' activates this as actual timecode source (the pause is required to avoid race conditions here) 
 +  * ''Timecode.TimecodeTwo.SetStartTime(...)'' sets a specific start time 
 +    * the time itself needs to be of [[macros:type:object:TimecodeTime|type TimecodeTime]] whicch is created with ''Timecode.MakeTimecodeTime(1, 00, 00, 00, false, 100)'' (thus, for more tracks, change this to (1, 00, 00, 00, false, 100),  (2, 00, 00, 00, false, 100) - see http://forum.avolites.com/viewtopic.php?f=20&t=6298 
 +  * the next two functions - ''Timecode.TimecodeTwo.Reset()'' to rewind the track to the given time, and ''Timecode.TimecodeTwo.Play()'' to actually start the timecode, are only applicable if the timecode source can be controlled (i.e. not Clock, MIDI or SMPTE), and are only executed if the flag ''Timecode.TimecodeTwo.IsControlAllowed'' is set to true 
 + 
 +The other macro ''Pause Timecode 2'' might be required to pause Winamp: 
 +  * if this timecode source can be controlled (''<step condition="Math.IsEqual(Timecode.TimecodeTwo.IsControlAllowed, true)">''
 +  * then ''Timecode.TimecodeTwo.Pause()'' pauses this timecode
  
 ===== How to use it ===== ===== How to use it =====
  
-  [[:macros:deploying|make this macro available]]+  [[:macros:deploying|make this macro available]] 
 +  * start Winamp, load some songs as playlist 
 +  * in Titan create your master cuelist  
 +    * load the macros ''TC Winamp Track 1'', ''TC Winamp Track 2'' etc. and set the timestamps to your liking 
 +    * make sure to add another empty cue after the last track (I found that sometimes the last macro is only executed if another cue comes next) 
 +    * for extra safety you may add some cues with the macro ''Pause Timecode 2'' to interrupt the timecode when needed 
 +    * set this cuelist to listen to Timecode 3 in playback options, and set Timecode 3 to source=Clock in the Timecode menu\\ {{:macros:example:tc_masterlist.png?400|}}  {{:macros:example:tc_masterlist_options.png?400|}} 
 + 
 +  * next, create your showlist 
 +    * track 1 starts at 01:00:00:00, track 2 starts at 02:00:00:00 etc - add as many cues as you like/need 
 +    * after each track add a cue (last second of the track) with the macro ''Pause Timecode 2'' to stop Winamp 
 +    * make sure to add another empty cue after the last track (I found that sometimes the last macro is only executed if another cue comes next) 
 +    * set this cuelist to listen to Timecode 2 in playback options, and set Timecode 2 to source=Winamp in the Timecode menu/\\ {{:macros:example:tc_showlist.png?400|}} {{:macros:example:tc_showlist_options.png?400|}}
  
-tbd+  * finally, make sure Timer is enabled in the timecode menu:\\ {{:macros:example:timecode_menu.png?120|}}
  
 +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.
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/timecodetracks.1574071987.txt.gz · Last modified: 2019/11/18 10:13 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki