User Tools

Site Tools


macros:example:dummyspeedascondition

Example

Dummy speed as condition

by: Kim Wida, February 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5584
description: example of how to use a dummy playback speed as step condition

functions

affected properties

control structures

Code

<step pause="0.01">ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", handle:"chaseHandleUN=1049")</step>
<step pause="0.01">Handles.SetSourceHandleFromHandle("chaseHandleUN=1049")</step>
<step> { if ( Math.IsEqual(Playbacks.Editor.Times.PlaybackSpeed, 60.0) ) 
        { Profiles.AssignHandleProfile(handle:"chaseHandleUN=19162",493461); }
      else
        { Profiles.AssignHandleProfile(handle:"chaseHandleUN=19162",493448); }
      } </step>
<step> { if(Math.IsEqual(Playbacks.Editor.Times.PlaybackSpeed, 60.0) )
         { ActionScript.SetProperty("Handles.PendingLegend", "Instant"); }
       else
         { ActionScript.SetProperty("Handles.PendingLegend", "Latch");  }
      } </step>
<step> { if(Math.IsEqual(Playbacks.Editor.Times.PlaybackSpeed, 60.0) )
        { ActionScript.SetProperty("Playbacks.Editor.Times.PlaybackSpeed", 30.0); }
      else
        { ActionScript.SetProperty("Playbacks.Editor.Times.PlaybackSpeed", 60.0); }
       } </step>
<step pause="0.01">Handles.SetLegend()</step>
<step pause="0.01">Handles.ClearSelection()</step>

Explanation

  • The chase with usernumber 1049 is used as dummy, its speed is used as contions for the next steps
  • if the speed is 60 BPM then another chase's profile is set to a certain profile, else it is set to another profile
  • if the speed is 60 BPM then the dummy's legend is set to 'Instant', else it is set to 'Latch'
  • if the speed is 60 BPM then the speed is set to 30 BPM, else it is set to 60 BPM (the classic toggle)

This is not operational within itself but a good example for some special syntax.

You could leave a comment if you were logged in.
macros/example/dummyspeedascondition.txt · Last modified: 2018/09/08 17:23 by icke_siegen