Table of Contents

Example

Playback - Set fade-in time

by: Sebastian Beutel
published: August 2018
description: Set a playback's fade-in time
remarks:

This is also an example how time:x is parsed into a time value.

See Playback - Set fade-in time - modular for a more versatile version using newer syntax.

functions

affected properties

control structures

Code

SetPBFadeInTime.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <macro id="Wiki.Macros.Fadeintime3" name="PB Fade-In Time 3s">
    <sequence>
      <step>Handles.ClearSelection()</step>
      <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", null)</step>
 
      <step>Handles.SetSourceHandle("PlaybackWindow", 0)</step>
      <step condition="Playbacks.IsCueHandle(Handles.SourceHandle)">
        ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)</step>
      <step>Playbacks.Editor.EnsurePlaybackCueSelected()</step>
      <step>ActionScript.SetProperty("Playbacks.Editor.Times.CueFadeInTime", time:3)</step>
 
      <step>Handles.SetSourceHandle("PlaybackWindow", 1)</step>
      <step condition="Playbacks.IsCueHandle(Handles.SourceHandle)">
        ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)</step>
      <step>Playbacks.Editor.EnsurePlaybackCueSelected()</step>
      <step>ActionScript.SetProperty("Playbacks.Editor.Times.CueFadeInTime", time:3)</step>
 
      <step>Handles.ClearSelection()</step>
      <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", null)</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

Note that this requires the first playback to be a single cue. If it is e.g. a cue list or a macro then the property Playbacks.Editor.SelectedPlayback isn't set and the macro fails.

How to use it