Table of Contents
Example
ColourChaseChanger (old style)
by: | Jonas Nijs, Aug. 2016 |
---|---|
published: | http://forum.avolites.com/viewtopic.php?f=20&t=4823 |
description: | changes the colours of a color chase to any color you want |
remarks: | This is an old, recorded, macro, and reproduced here for reference. |
Also see the author's remarks on how to use it (below the code) | |
In the original post there is also a short manual linked which you might find helpful. |
functions
Code
- ColorChaseChanger.xml
<?xml version="1.0" encoding="utf-8"?> <avolites.macros> <!-- V1.0 by Nijs Jonas 31/08/2016 --> <macro id="UserMacro.colchasechanger"> <name>Color chase changer</name> <sequence> <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Blind.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Blind.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Group.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Group.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","NumericKeys.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","NumericKeys","",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","NumericKeys","",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","KeypadEnter.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","KeypadEnter.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","View.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","View.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","AttributeGroup.4","NoGroup",4)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","AttributeGroup.4","NoGroup",4)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",34)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",34)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","SelectPage","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","SelectPage","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Record.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Record.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Softkey.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Softkey.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","SelectPage","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","SelectPage","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",35)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",35)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","SelectPage","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","SelectPage","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Record.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Record.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","ColoursTouch","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","ColoursTouch","Colours",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Softkey.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Softkey.1","NoGroup",1)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","SelectPage","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","SelectPage","Colours",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Clear.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Clear.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonDown","Blind.0","NoGroup",0)</step> <step pause="0.001">Menu.InjectInput("OnButtonUp","Blind.0","NoGroup",0)</step> </sequence> </macro> </avolites.macros>
Explanation
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
As this is a recorded macro, instead of explaining the function, we translate the button presses (see Console and simulator for an explanation of how this is written here), and explain their results:
<Blind> // enter blind mode <Group> <1> <0> <0> <Enter> // group 100 <View> [C](olours) // opens/activates colour palette window [Colour Palette Button 35] // set selected fixture group to colour 34 [Colour Page 2] // change page in colour palette window <Record> [Colour Button 1] [Replace] // this replaces the colour palette [Colour Page 1] // change page in colour palette window [Colour Palette Button 36] // set selected fixture group to colour 35 [Colour Page 2] // change page in colour palette window <Record> [Colour Button 2] [Replace] // this replaces the colour palette [Colour Page 1] // change page in colour palette window <Clear> // clear programmer <Blind> // exit blind mode
Effectively we enter blind mode, replace the palettes which are used for some chasers with other colours (which are taken from other colour palettes), and exit blind mode again.
How to use it
- make a color chase that uses color pallets
- place those color pallets on the color pallets windows page 2 positions 1 and 2
- create a group for all the fixtures used in that color chase and give that group usernumber 100
- when you want to change the colors, place the 2 new colors you want on the color pallets page 1 positions 35 and 36 (will be the two bottom right ones when you go full screen and supper size.
- run the macro and have fun.
In the original post there is also a short manual linked which you might find helpful.
That's a perfect example for both: what you can acchieve with macros, and where the limits are. In that case, the use of variables would be really helpful. E.g. if I could pass target and source palette numbers as argument, I could easily re-use this macro many times. Another possible error: this macro assumes that the colours window opens on the correct page, which might not be the case. [S. Beutel]