Example
====== PaletteChaseChanger (V3) ======
^ by: | Kim Wida, Feb 2018 |
^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=5578 |
^ description: | two macros: one changes two palettes in blind mode, the other shifts a number of palettes in pairs. |
^ remarks: | slightly corrected by Sebastian Beutel |
This is related to [[macros:example:colourchasechanger_v2]].
{{tag>palette chase blind}}
==== functions ====
* [[:macros:function:ActionScript.SetProperty.Boolean]]
* [[:macros:function:Programmer.SetBlindMode]]
* [[:macros:function:Attribute.Mask.IncludeAll]]
* [[:macros:function:Group.RecallGroupNumeric]]
* [[:macros:function:Palette.ApplyPalette]]
* [[:macros:function:Palette.StoreCurrentPaletteReplace]]
* [[:macros:function:Programmer.Editor.Clear]]
* [[:macros:function:Handles.SetSourceHandleFromHandle]]
* [[:macros:function:Palette.StoreCurrentPaletteReplace]]
* [[:macros:function:ActionScript.SetProperty.Enum]]
* [[:macros:function:Handles.CopyDestination]]
* [[:macros:function:Handles.ClearSelection]]
==== affected properties ====
* [[:macros:property:Programmer.BlindActive]]
* [[:macros:property:Palette.CurrentPaletteHandle]]
* [[:macros:property:Handles.SourceHandle]] //(implicitely used)//
* [[:macros:property:Handles.OperationMode]]
===== Code =====
{{ :macros:example:palettechasechanger_v3.xml }}
ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)
Programmer.SetBlindMode(false, 0)
Attribute.Mask.IncludeAll("Palette")
Group.RecallGroupNumeric(17)
Palette.ApplyPalette("Location=Positions,1,69", false)
ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Positions,1,71")
Palette.StoreCurrentPaletteReplace()
Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets,
false, Expert.ClearMenu.FadeTime)
Group.RecallGroupNumeric(17)
Palette.ApplyPalette("Location=Positions,1,70", false)
ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Positions,1,72")
Palette.StoreCurrentPaletteReplace()
Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets,
false, Expert.ClearMenu.FadeTime)
ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)
Programmer.SetBlindMode(false, 0)
Handles.SetSourceHandleFromHandle(Handles.GetHandle("Positions",0,69))
ActionScript.SetProperty.Enum("Handles.OperationMode", "move")
Handles.CopyDestination("Positions", 89)
Handles.ClearSelection()
Handles.SetSourceHandleFromHandle(Handles.GetHandle("Positions",0,68))
ActionScript.SetProperty.Enum("Handles.OperationMode", "move")
Handles.CopyDestination("Positions", 88)
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]]
The multiple steps are briefly explained inline. It is best understood wirht e applications hints below:
* a chaser should be created which toggles fixture group #17 between palettes #71 und #72
* various palettes should be stored as palettes #60~69, with the even numbers being something like 'foreground' and the odd numbers something like 'background'
* the macro ''Up Chase Move'' cycles through these palettes in pairs, in a way that palette #68 always contains a 'foreground' palette and #69 is always the corresponding 'background' palette. You may apply this macro multiple times. The funtions sued to move a paletted are similar to [[macros:example:movehandle|moving a chase handle]].
* finally the macro ''Up Two Change'' toggles to blind, copies the contents from palette #68 to #71 and #69 to #72, and exits blind mode. This can be looked at in [[macros:example:colourchasechanger_v2|]].
>> => Jonas Nijs's ColourChaseChanger(v2) macro is very very useful. But it's a little uncomfortable to use in busking show, becuase it need some step to copy palettes. So I made a macro which circulate 8 palettes with one button. If you wan to circulate 10 or more, you can edit it.
**Note the different numbering:**
- "Location=Positions,1,68" is 1-based. 'Positions,1,68' refers to the 68th item on page 1 of the Positions window
- ("Positions",0,69) [0-based] refers to to item 70 on page 1 of the Positions window
- ("Positions", 89) [0-based] refers to item in slot 90 of the current page of the Positions window
===== How to use it =====
- [[:macros:deploying|make this macro available]]
- Using fixture group #17, create a chaser which oscillates between position palette 1,71 and 1,72.
- Fire UpChaseMove (possibly a few times) so select another pair of palettes.
- Fire UpTwoColorChange to make these palettes used in the chase.
~~DISCUSSION~~