Example ====== Change Playback Timings Grid ====== ^ by: | Alex del Bondio | ^ published: | August 2018 | ^ description: | Change fade and release times or overlap for a playback grid | ^ remarks: | | {{ :macros:example:adb_livetiming_12x12.xml }} Remarks * These macros can be used to toggle fade/release times or overlap for basically a full playback page in one go. * This set of macros is set up for a 12x12 grid in playbacks window but can be adjusted by deleting the corresponding lines from the macro (which admittedly is a bit tedious though due to the length of the macro and that you cannot 'group' playbacks for some commands) * Only the originally imported macros will work, meaning you can move but not really copy them (they get a new id when copied thus referencing wrong) * the macros will be highlighted by a halo according which macro last changed time or overlap * there is an macro called ''adb import Live Timing'' that will import all macros to pg11 of the macro workspace * the software might need to be restarted for the halo part to work {{tag> playback fade-in release time overlap halo }} ==== functions ==== * [[:macros:function:Playbacks.Editor.Macros.SetTargetHandle]] * [[:macros:function:Handles.SetSourceHandleFromHandle]] * [[:macros:function:Handles.SetSourceHandle]] * [[:macros:function:Playbacks.IsCueHandle]] * [[:macros:function:Playbacks.Editor.EnsurePlaybackCueSelected]] * [[:macros:function:Handles.RemoveHalo]] * [[:macros:function:Handles.SetPendingHaloToSystemColour]] * [[:macros:function:ActionScript.SetProperty]] * [[:macros:function:Handles.ClearSelection]] ==== affected properties ==== * [[:macros:property:Playbacks.Editor.Macros.Target.Handle]] * [[:macros:property:Playbacks.Editor.SelectedPlayback]] * [[:macros:property:Playbacks.Editor.Times.PlaybackReleaseTime]] * [[:macros:property:Playbacks.Editor.Times.CueFadeInTime]] * [[:macros:property:Playbacks.Editor.Times.CueFixtureOverlap]] ===== Code ===== Playbacks.Editor.Macros.SetTargetHandle("adb.Macros.livetime0") Handles.SetSourceHandleFromHandle(Playbacks.Editor.Macros.Target.Handle) Handles.RemoveHalo() Playbacks.Editor.Macros.SetTargetHandle("adb.Macros.livetime1") Handles.SetSourceHandleFromHandle(Playbacks.Editor.Macros.Target.Handle) Handles.RemoveHalo() Handles.ClearSelection() ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", null) Handles.SetSourceHandle("PlaybackWindow", 0) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle) ActionScript.SetProperty("Playbacks.Editor.Times.PlaybackReleaseTime", time:1) Playbacks.Editor.EnsurePlaybackCueSelected() ActionScript.SetProperty("Playbacks.Editor.Times.CueFadeInTime", time:1) Handles.SetSourceHandle("PlaybackWindow", 1) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle) ActionScript.SetProperty("Playbacks.Editor.Times.PlaybackReleaseTime", time:1) Playbacks.Editor.EnsurePlaybackCueSelected() ActionScript.SetProperty("Playbacks.Editor.Times.CueFadeInTime", time:1) Handles.ClearSelection() Playbacks.Editor.Macros.SetTargetHandle("adb.Macros.livetime1") Handles.SetSourceHandleFromHandle(Playbacks.Editor.Macros.Target.Handle) Handles.SetPendingHaloToSystemColour("Yellow") Handles.ClearSelection() Handles.ClearSelection() Handles.SetSourceHandle("PlaybackWindow", 0) ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle) Playbacks.Editor.EnsurePlaybackCueSelected() ActionScript.SetProperty.Float("Playbacks.Editor.Times.CueFixtureOverlap", 0.5) Handles.ClearSelection() ===== 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]] Set Times * ''ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Handles.SourceHandle)'' makes sure only playbacks get selected (no macros, groups, etc which could stop the macro halfway) * ''ActionScript.SetProperty("Playbacks.Editor.Times.PlaybackReleaseTime", time:1)'' sets a release time of 1s * ''Playbacks.Editor.EnsurePlaybackCueSelected()'' Ensures a playback cue to apply the fadetime to is selected * ''ActionScript.SetProperty("Playbacks.Editor.Times.CueFadeInTime", time:1)'' sets a fade time of 1s Remove Halo * ''Playbacks.Editor.Macros.SetTargetHandle("adb.Macros.livetime0")'' selects a particular macro based on its [[macros:identifier:macroid]]. Copied macros seem to become a new macro id. * ''Handles.SetSourceHandleFromHandle(Playbacks.Editor.Macros.Target.Handle)'' selects the actual handle the macro is on Set Halo * ''Handles.SetPendingHaloToSystemColour("Yellow")'' sets a yellow halo on the macros just fired Overlap * ''ActionScript.SetProperty.Float("Playbacks.Editor.Times.CueFixtureOverlap", 0.5)'' sets an overlap of 50% Import * ''adb import Live Timing'' is a macro that imports the whole set of macros onto page 11 in the macros workspace ===== How to use it ===== * [[:macros:deploying|make this macro available]] ~~DISCUSSION~~