macros:example:doublechasespeed

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:doublechasespeed [2017/11/22 09:46] icke_siegenmacros:example:doublechasespeed [2019/04/27 11:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 Example Example
  
-====== Double chase speed ======+====== Chase - Double speed ======
  
 ^ by: | Gregory Haynes, Feb 2016 | ^ by: | Gregory Haynes, Feb 2016 |
 ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=3744#p15848 | ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=3744#p15848 |
 ^ description: | double current chase's BPM rate | ^ description: | double current chase's BPM rate |
-^ remarks: | The problem with this code is that it requires the chase to be set as the selected playback in the editor (used for the Edit Times menu). This means that the Playback View which could be showing a cue list switches to show the chase instead, to get around this I have stored the previous selected playback and restore that afterwards but this does cause the display to flicker. |+^ remarks: | The problem with this code is that it requires the chase to be set as the selected playback in the editor (used for the Edit Times menu). This means that the Playback View which could be showing a cue list switches to show the chase instead, to get around this I have stored the previous selected playback and restore that afterwards but this does cause the display to flicker. \\ **In version 10.1, one of the affected variables has changed - you need to use the correct macro for your Titan version.**|
  
 +{{tag>double connect chase speed bpm}}
 ==== functions ==== ==== functions ====
   * [[macros:function:actionscript.setproperty]]   * [[macros:function:actionscript.setproperty]]
Line 18: Line 19:
   * [[macros:property:handles.sourcehandle]]   * [[macros:property:handles.sourcehandle]]
   * [[macros:property:playbacks.editor.selectedplayback]]   * [[macros:property:playbacks.editor.selectedplayback]]
-  * [[macros:property:playbacks.editor.times.chasespeed]]+  * [[macros:property:playbacks.editor.times.chasespeed]] (until version 10.0) 
 +  * [[macros:property:playbacks.editor.times.playbackspeed]] (from version 10.1)
  
-**This macro works perfectly well in Titan 9.1does misbehave in 10.0 (always sets speed to 1 BPM), and throws an error in 10.1 (variable not registered).**+**This macro changes the speed which is stored with the chaseIf you've set the user setting 'Connected View Sets: Temporary Chase Speed' then when applying this macrothe main chase speed is doubled and then overwrites the temp chase speed.** 
 + 
 +**In version 10.1, one of the affected variables has changed - you need to use the correct macro for your Titan version.**
    
 ===== Code ===== ===== Code =====
 +
 +==== until Titan version 10.0 ====
 <code xml doublechasespeed.xml> <code xml doublechasespeed.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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
- <macro name="Chase Speed Double" id="Avolites.Macros.ChaseSpeedDouble">+ <!-- This macro does not work in versions from 10.1 as the property Playbacks.Editor.Times.ChaseSpeed has been swopped for Playbacks.Editor.Times.PlaybackSpeed. --> 
 +  <macro name="Chase Speed Double" id="Avolites.Macros.ChaseSpeedDouble">
     <description>Double the speed of the currently connected chase.</description>     <description>Double the speed of the currently connected chase.</description>
     <sequence>     <sequence>
Line 33: Line 40:
       <step>Math.Min("Playbacks.Editor.Times.ChaseSpeed", Playbacks.Editor.Times.ChaseSpeed * 2, 3600.0)</step>       <step>Math.Min("Playbacks.Editor.Times.ChaseSpeed", Playbacks.Editor.Times.ChaseSpeed * 2, 3600.0)</step>
       <step condition="Math.IsEqual(Playbacks.Editor.Times.ChaseSpeed, 0.0)">ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", 1.0)</step>       <step condition="Math.IsEqual(Playbacks.Editor.Times.ChaseSpeed, 0.0)">ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", 1.0)</step>
 +      <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)</step>
 +    </sequence>
 +  </macro>
 +</avolites.macros>
 +</code>
 +
 +==== from Titan version 10.1 ====
 +<code xml doublechasespeed.xml>
 +<?xml version="1.0" encoding="utf-8"?>
 +<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
 + <!-- This macro does not work in versions below 10.1 as the property Playbacks.Editor.Times.PlaybackSpeed formerly was  Playbacks.Editor.Times.PlaybackSpeed. --> 
 +  <macro name="Chase Speed Double" id="Avolites.Macros.ChaseSpeedDouble">
 +    <description>Double the speed of the currently connected chase.</description>
 +    <sequence>
 +      <step>ActionScript.SetProperty("Handles.SourceHandle", Playbacks.Editor.SelectedPlayback)</step>
 +      <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle)</step>
 +      <step>Math.Min("Playbacks.Editor.Times.PlaybackSpeed", Playbacks.Editor.Times.PlaybackSpeed * 2, 3600.0)</step>
 +      <step condition="Math.IsEqual(Playbacks.Editor.Times.PlaybackSpeed, 0.0)">ActionScript.SetProperty.Float("Playbacks.Editor.Times.PlaybackSpeed", 1.0)</step>
       <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)</step>       <step>ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)</step>
     </sequence>     </sequence>
Line 43: Line 68:
  
 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]]
 +
 +In version 10.1, the property ''Playbacks.Editor.Times.ChaseSpeed'' was swopped for ''Playbacks.Editor.Times.PlaybackSpeed''. Apart from that, the mechanics of the macro are unchanged.
  
   * ''ActionScript.SetProperty("Handles.SourceHandle", Playbacks.Editor.SelectedPlayback)''\\ temporarily stores the currently selected playback into 'Handles.SourceHandle' from where it will be retrieved when the macro is finished, see Gregory's explanation above   * ''ActionScript.SetProperty("Handles.SourceHandle", Playbacks.Editor.SelectedPlayback)''\\ temporarily stores the currently selected playback into 'Handles.SourceHandle' from where it will be retrieved when the macro is finished, see Gregory's explanation above
Line 54: Line 81:
 ===== How to use it ===== ===== How to use it =====
  
-**This macro works perfectly well in Titan 9.1, does misbehave in 10.0 (always sets speed to 1 BPM), and throws an error in 10.1 (variable not registered).**+**Please choose the correct macro for your Titan version.**
  
   * [[macros:deploying|make this macro available]]   * [[macros:deploying|make this macro available]]
   * with a chase running and connected (Speed and Cross Fade on the wheels), triggering this macro doubles the speed of the chase   * with a chase running and connected (Speed and Cross Fade on the wheels), triggering this macro doubles the speed of the chase
 +  * watch the user setting 'Connected View Sets'. This macro always affects the main chase speed, not the temporary speed. Hence, if there is a temporary chase speed set with the wheels, applying this macro will return to the main chase speed and double it.
  
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/doublechasespeed.1511343980.txt.gz · Last modified: 2017/11/22 09:46 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki