User Tools

Site Tools


macros:example:changepageswithtimecode

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:example:changepageswithtimecode [2022/07/15 12:25] icke_siegenmacros:example:changepageswithtimecode [2022/07/15 13:15] (current) – [Explanation] icke_siegen
Line 6: Line 6:
 ^ published: | here | ^ published: | here |
 ^ description: | change playback pages if enabled (useful with timecode) | ^ description: | change playback pages if enabled (useful with timecode) |
-^ remarks: | idea from Discord/Avolites Users#general: +^ remarks: | idea from Discord/Avolites Users#general:\\ Antisthenes — 12.07.2022 \\ triggering or macro question please \\ Is there any way to auto switch the song playback page when corresponding timecode starts? |
-^^^ | Antisthenes — 12.07.2022 +
-^^^ | triggering or macro question please raised_hand | +
-^^^ | Is there any way to auto switch the song playback page when corresponding timecode starts? |+
  
-{{tag>tag1 tag2 tag3}}+{{tag>playback page toggle}}
  
 ==== functions ==== ==== functions ====
-  * [[:macros:function:someusedfunction]] +  * [[:macros:function:ActionScript.SetProperty.Boolean]] 
-  * [[:macros:function:anotherusedfunction]] +  * [[:macros:function:Handles.Playbacks.ChangePage]]
-  * [[:macros:function:someusedfunction]] +
-  * [[:macros:function:anotherusedfunction]]+
  
 ==== affected properties ==== ==== affected properties ====
-  * [[:macros:property:someproperty]] +  * [[:macros:property:custom]]
-  * [[:macros:property:anotherusedproperty]]+
  
 ==== control structures ==== ==== control structures ====
   * [[macros:control_structures|step condition]]   * [[macros:control_structures|step condition]]
 +  * [[macros:active_binding|]]
 +
 +Here is a file with macros for Playback pages 1~10: {{ :macros:example:timecode2page.xml |}}
    
 ===== Code ===== ===== Code =====
-<code xml filename.xml>+<code xml ChangePages.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>+  <!-- idea from Discord/Avolites Users#general: 
 +    Antisthenes — 12.07.2022 
 +    triggering or macro question please raised_hand  
 +    Is there any way to auto switch the song playback page when corresponding timecode starts? 
 +  --> 
 + 
 +  <macro id="Wiki.Macros.Timecode.TogglePages" name="Toggle Pb Pages By Timecode"> 
 +    <description>Toggle Pb Pages By Timecode.</description> 
 +    <variables> 
 +      <boolean id="Enabledvalue="True"/
 +    </variables> 
 +    <active binding="Wiki.Macros.Timecode.TogglePages.Enabled"/
 +    <sequence> 
 +      <step>ActionScript.SetProperty.Boolean("Wiki.Macros.Timecode.TogglePages.Enabled", !Wiki.Macros.Timecode.TogglePages.Enabled)</step> 
 +    </sequence> 
 +  </macro>  
 +   
 +  <macro id="Wiki.Macros.Playbacks.Page1" name="Toggle Pb to Page 1">
     <sequence>     <sequence>
-      <step></step> +      <step condition="Wiki.Macros.Timecode.TogglePages.Enabled">Handles.Playbacks.ChangePage(0)</step> 
-     </sequence>+    </sequence> 
 +  </macro> 
 +   
 +  <macro id="Wiki.Macros.Playbacks.Page2" name="Toggle Pb to Page 2"> 
 +    <sequence> 
 +      <step condition="Wiki.Macros.Timecode.TogglePages.Enabled">Handles.Playbacks.ChangePage(1)</step> 
 +    </sequence>
   </macro>   </macro>
 </avolites.macros> </avolites.macros>
Line 44: Line 64:
 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 defines a custom variable ''Enabled'', sets it to True by default, and makes it possible to toggle it on/off while showing its status (with [[macros:active_binding|]]). 
 + 
 +The other macros check if this variable is TRUE and toggle Playbacks to designated pages.
  
 ===== How to use it ===== ===== How to use it =====
  
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
 +  - The first macro can be copied or moved to a macro&executor button and lets you enable/disable the function of the other macros.\\ \\ Then, in order to achieve the intended behaviour:\\ \\ 
 +  - create a cuelist with as many cues as you need to toggle pages with tracks, and open it in Playback View
 +  - into each cue insert the respective macro (click on the ''Macros'' cell, click ''[Add]'', select the macro...)
 +  - make this cuelist run by timecode and learn the correct timestamps
  
-tbd +This way timecode controls this cuelist which in turn controls your Playbacks pages unless this mechanism is disabled.
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/changepageswithtimecode.1657887942.txt.gz · Last modified: 2022/07/15 12:25 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki