macros:example:colourchasechanger_v2

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:colourchasechanger_v2 [2017/12/16 20:51] – ↷ Page moved from colourchasechanger_v2 to macros:example:colourchasechanger_v2 yyy898macros:example:colourchasechanger_v2 [2020/04/05 08:02] (current) – external edit 127.0.0.1
Line 6: Line 6:
 ^ published: | December 2017 | ^ published: | December 2017 |
 ^ description: | changes the colours of a color chase to any color you want | ^ description: | changes the colours of a color chase to any color you want |
-^ remarks: | This is an updated version to the old one, this time using system syntax so it goes faster and whitout your screen flickering. |+^ remarks: | This is an updated version [[macros:example:changecolorchaseold|to the old one]], this time using system syntax so it goes faster and whitout your screen flickering. | 
 +^ ::: | Also see the author's remarks on how to use it [[#how_to_use_it|(below the code)]] | 
 +^ ::: | [[http://forum.avolites.com/viewtopic.php?f=20&t=4823|In the original post]] there is also a short manual linked which you might find helpful. |
  
-{{tag>change chase blind colour ]}}+Kim Wida developed a slightly changed version: [[macros:example:palettechasechanger_v3|]].
  
 +{{tag>change chase blind colour}}
 +
 +==== functions ====
 +  * [[macros:function:actionscript.setproperty.boolean]]
 +  * [[macros:function:Programmer.SetBlindMode]]
 +  * [[macros:function:Group.RecallGroupNumeric]]
 +  * [[macros:function:Palette.ApplyPalette]]
 +  * [[macros:function:actionscript.setproperty]]
 +  * [[macros:function:Palette.StoreCurrentPaletteReplace]] -- alternatively [[macros:function:Palette.MergeCurrentPalette]] (see [[#explanation]])
 +  * [[macros:function:Programmer.Editor.Clear]]
 +
 +
 +==== properties ====
 +  * [[macros:property:programmer.blindactive]]
 +  * [[macros:property:Palette.CurrentPaletteHandle]]
 +  * [[macros:property:Attribute.Mask.Clear.Value]]
 +  * [[macros:property:Programmer.Editor.Fixtures.Clear.Presets]]
 +  * [[macros:property:Expert.ClearMenu.FadeTime]]
    
 ===== Code ===== ===== Code =====
-<code xml ColorChaseChanger.xml>+<code xml ColorChaseChanger_v2.xml>
 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
 <avolites.macros> <avolites.macros>
 <!-- V2.0 by Nijs Jonas 7/12/2017 --> <!-- V2.0 by Nijs Jonas 7/12/2017 -->
 +
 <macro id="UserMacro.colchasechanger2"> <macro id="UserMacro.colchasechanger2">
-<name>Color chase changer</name> +  <name>Color chase changer</name> 
-<sequence> +  <sequence> 
-<step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step> +    <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step> 
-<step pause="0.01">Programmer.SetBlindMode(false, 0)</step> +    <step pause="0.01">Programmer.SetBlindMode(false, 0)</step> 
-<step pause="0.01">Group.RecallGroupNumeric(100)</step> +    <step pause="0.01">Group.RecallGroupNumeric(100)</step> 
-<step pause="0.01">Palette.ApplyPalette("Location=Colours,1,16", false)</step> +    <step pause="0.01">Palette.ApplyPalette("Location=Colours,1,16", false)</step> 
-<step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,1")</step> +    <step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,1")</step> 
-<step pause="0.01">Palette.StoreCurrentPaletteReplace()</step> +    <step pause="0.01">Palette.StoreCurrentPaletteReplace()</step> 
-<step pause="0.01">Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false, Expert.ClearMenu.FadeTime)</step> +    <step pause="0.01">Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,  
-<step pause="0.01">Group.RecallGroupNumeric(100)</step> +Expert.ClearMenu.FadeTime)</step> 
-<step pause="0.01">Palette.ApplyPalette("Location=Colours,1,17", false)</step> +    <step pause="0.01">Group.RecallGroupNumeric(100)</step> 
-<step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,2")</step> +    <step pause="0.01">Palette.ApplyPalette("Location=Colours,1,17", false)</step> 
-<step pause="0.01">Palette.StoreCurrentPaletteReplace()</step> +    <step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,2")</step> 
-<step pause="0.01">Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false, Expert.ClearMenu.FadeTime)</step> +    <step pause="0.01">Palette.StoreCurrentPaletteReplace()</step> 
-<step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step> +    <step pause="0.01">Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.Presets, false,  
-<step pause="0.01">Programmer.SetBlindMode(false, 0)</step> +Expert.ClearMenu.FadeTime)</step> 
-</sequence>+    <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step> 
 +    <step pause="0.01">Programmer.SetBlindMode(false, 0)</step> 
 +  </sequence>
 </macro> </macro>
 </avolites.macros> </avolites.macros>
Line 43: Line 66:
 a brief explanation of the syntax used. For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]] a brief explanation of the syntax used. For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]]
  
-<code> +Essentially this macro does: 
-  <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)</step> //first step for going into blind mode + 
-  <step pause="0.01">Programmer.SetBlindMode(false, 0)</step> //second step, after this step the desk goes into blind mode +  * enter blind mode 
-  <step pause="0.01">Group.RecallGroupNumeric(100)</step> //selects group 100 +  * replace a palette - e.g. our foreground colour - for a certain fixture group with another palette, clear  
-  <step pause="0.01">Palette.ApplyPalette("Location=Colours,1,16", false)</step> //selects the colour palette on the first page on the 16th slot +  * replace yet another palette - e.g. our background colour - for a certain fixture group with another palette, clear  
-<step pause="0.01">ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,1")</step> //sets the colour palette on the second page on the 1th slot into the desks memory +  * exit blind mode 
-<step pause="0.01">Palette.StoreCurrentPaletteReplace()</step> //replace the palette in the desks memory with whats in the programmer + 
-<step pause="0.01">Programmer.Editor.Clear(Attribute.Mask.Clear.Value, Programmer.Editor.Fixtures.Clear.PresetsfalseExpert.ClearMenu.FadeTime)</step> //clear the desk +The commands are as follows: 
-<step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)</step> //first step of going out of blind mode + 
-<step pause="0.01">Programmer.SetBlindMode(false, 0)</step> //second step of going out of blind mode +  * ''ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)'' and ''Programmer.SetBlindMode(false, 0)'' toggle to blind mode, see [[macros:example:blindmodeonoff]] 
-</code>  +  * ''Group.RecallGroupNumeric(100)'' recalls a specific group of fixtures - here group no. 100 
 +  * ''Palette.ApplyPalette("Location=Colours,1,16", false)'' selects the colour palette on the first page of the Colours workspace window, 16th slot 
 +  * ''ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,1")'' sets the colour palette on the second page on the 1th slot into the desks memory, i.e. makes it the current palette handle for the next actions 
 +  * ''Palette.StoreCurrentPaletteReplace()'' replaces the palette in the desks memory - the active palette handle - with what'in the programmer \\ **HINT:** if you instead want to replace only a part of the palette then you need to merge it instead of replace the entire paletteUse [[macros:function:palette.mergecurrentpalette|]] instead 
 +  * ''Programmer.Editor.Clear(...)'' clears the programmer (for the parameters see [[macros:function:Programmer.Editor.Clear]] - clears according to the current clear maskclearing the presets as setgloballyin the globally set clear/release time)  
 +  * repeat the above steps, now with ''Palette.ApplyPalette("Location=Colours,1,17", false)'' and ''ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,2")'', in order to replace the background colour 
 +  * ''ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)'' and ''Programmer.SetBlindMode(false, 0)'' exit blind mode again - see above
  
 ===== How to use it ===== ===== How to use it =====
Line 60: Line 89:
   - make a color chase that uses color pallets   - make a color chase that uses color pallets
   - place those color pallets on the color pallets windows page 2 positions 1 and 2   - 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 ID 100 +  - 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.+  - when you want to change the colors, place the 2 new colors you want on the color pallets page 1 positions 16 and 17 
   - run the macro and have fun.   - run the macro and have fun.
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/colourchasechanger_v2.1513457467.txt.gz · Last modified: 2017/12/16 20:51 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki