Example ====== Chase - Halve speed ====== ^ by: | Gregory Haynes, Feb 2016 | ^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=3744#p15848 | ^ description: | halves currently 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. \\ **In version 10.1, one of the affected variables has changed - you need to use the correct macro for your Titan version.** | {{tag>halve connect chase speed bpm}} ==== functions ==== * [[macros:function:actionscript.setproperty]] * [[macros:function:actionscript.setproperty.float]] * [[macros:function:simplemath]] ==== affected properties ==== * [[macros:property:handles.sourcehandle]] * [[macros:property:playbacks.editor.selectedplayback]] * [[macros:property:playbacks.editor.times.chasespeed]](until version 10.0) * [[macros:property:playbacks.editor.times.playbackspeed]] (from version 10.1) **This macro changes the speed which is stored with the chase. If you've set the user setting 'Connected View Sets: Temporary Chase Speed' then when applying this macro, the main chase speed is halved 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 ===== ==== until Titan version 10.0 ==== Halves the speed of the currently connected chase. ActionScript.SetProperty("Handles.SourceHandle", Playbacks.Editor.SelectedPlayback) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle) ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", Playbacks.Editor.Times.ChaseSpeed / 2) ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", 0.0) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle) ==== from Titan version 10.1 ==== Halves the speed of the currently connected chase. ActionScript.SetProperty("Handles.SourceHandle", Playbacks.Editor.SelectedPlayback) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle) ActionScript.SetProperty.Float("Playbacks.Editor.Times.PlaybackSpeed", Playbacks.Editor.Times.PlaybackSpeed / 2) ActionScript.SetProperty.Float("Playbacks.Editor.Times.PlaybackSpeed", 0.0) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle) ===== Explanation ===== 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("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle)''\\ this selects the currently connected chaser for editing * ''ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", Playbacks.Editor.Times.ChaseSpeed / 2)''\\ sets the speed of the chaser to its half * ''ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseSpeed", 0.0) ''\\ if the speed is less than 1.0: sets speed to 0.0 * ''ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)''\\ restores the selected playback from before the macro was run ===== How to use it ===== **Please choose the correct macro for your Titan version.** * [[macros:deploying|make this macro available]] * with a chase running and connected (Speed and Cross Fade on the wheels), triggering this macro halves 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 halve it. ~~DISCUSSION~~