<?xml version="1.0" encoding="ISO-8859-1"?>
<device image="Viper.gif" initsequence="set 0 128; set 1 0; set 2 0; set 3 85; set 4 128; set 5 128; set 6 0; set 7 128; set 8 128; set 9 128">
  <information>
    <name>Viper</name>
    <author>Florian Seewig</author>
    <vendor>Showtec</vendor>
  </information>
  <channels>
    <function channel="0" minvalue="0" maxvalue="255" name="GoboRoto" fade="no" action="GetGoboRot" />
    <function channel="1" minvalue="0" maxvalue="255" name="Color" fade="no" type="color" />
    <function channel="2" minvalue="0" maxvalue="255" name="Gobo" fade="no" type="gobo" />
    <function channel="3" minvalue="0" maxvalue="255" name="StrobeDimmer" fade="no" action="GetShutter" />
    <function channel="4" minvalue="0" maxvalue="255" name="Pan" fade="yes" type="pan" />
    <function channel="5" minvalue="0" maxvalue="255" name="Tilt" fade="yes" type="tilt" />
    <function channel="6" minvalue="0" maxvalue="255" name="Effekt" fade="no" />
    <function channel="7" minvalue="0" maxvalue="255" name="Prisma" fade="no" action="GetPrisma" />
    <function channel="8" minvalue="0" maxvalue="255" name="PanFein" fade="yes" type="panfine" />
    <function channel="9" minvalue="0" maxvalue="255" name="TiltFein" fade="yes" type="tiltfein" />
  </channels>
  <form width="408" height="312">
    <deviceimage top="0" left="0" />
    <devicename top="0" left="40" />
    <deviceadress top="16" left="40" />
    <position top="45" left="11" height="180" width="180" />
    <dropdown top="242" left="15" width="177" name="Color" channel="1">
      <item caption="Offen" value="0" />
      <item caption="Offen + Gelb" value="7" />
      <item caption="Gelb" value="14" />
      <item caption="Gelb + Blau" value="16" />
      <item caption="Blau" value="21" />
      <item caption="Blau + Rot" value="26" />
      <item caption="Rot" value="30" />
      <item caption="Rot + Lila" value="35" />
      <item caption="Violett" value="40" />
      <item caption="Violett + Orange" value="48" />
      <item caption="Orange" value="51" />
      <item caption="Orange + Pink" value="57" />
      <item caption="Pink" value="61" />
      <item caption="Pink + Türkis" value="67" />
      <item caption="Türkis" value="71" />
      <item caption="Türkis + Hellgrün" value="75" />
      <item caption="Hellgrün" value="83" />
      <item caption="Hellgrün + Dunkelviolett" value="86" />
      <item caption="Dunkelviolett" value="91" />
      <item caption="Dunkelviolett + Offen" value="98" />
      <item caption="Offen" value="101" />
      <item caption="Offen + Gelb" value="106" />
      <item caption="Gelb" value="111" />
      <item caption="Gelb + Blau" value="115" />
      <item caption="Blau" value="122" />
      <item caption="Blau + Rot" value="125" />
      <item caption="Rot" value="130" />
      <item caption="Rot + Lila" value="135" />
      <item caption="Violett" value="140" />
      <item caption="Violett + Orange" value="148" />
      <item caption="Orange" value="151" />
      <item caption="Orange + Pink" value="157" />
      <item caption="Pink" value="161" />
      <item caption="Pink + Türkis" value="167" />
      <item caption="Türkis" value="171" />
      <item caption="Türkis + Hellgrün" value="175" />
      <item caption="Hellgrün" value="183" />
      <item caption="Hellgrün + Dunkelviolett" value="186" />
      <item caption="Dunkelviolett" value="191" />
      <item caption="Dunkelviolett + Offen" value="198" />
      <item caption="Rotation 1" value="205" />
      <item caption="Rotation 2" value="211" />
      <item caption="Rotation 3" value="220" />
      <item caption="Rotation 4" value="227" />
      <item caption="Rotation 5" value="236" />
      <item caption="Rotation 6" value="245" />
      <item caption="Rotation 7" value="252" />
    </dropdown>
    <dropdown top="284" left="15" width="177" name="Gobo" channel="2">
      <item caption="Offen" value="0" />
      <item caption="Gobo 1" value="17" />
      <item caption="Gobo 2" value="29" />
      <item caption="Gobo 3" value="41" />
      <item caption="Gobo 4" value="53" />
      <item caption="Gobo 5" value="65" />
      <item caption="Gobo 6" value="77" />
      <item caption="Gobo 7" value="91" />
      <item caption="Offen" value="104" />
      <item caption="Gobo 1" value="116" />
      <item caption="Gobo 2" value="128" />
      <item caption="Gobo 3" value="140" />
      <item caption="Gobo 4" value="152" />
      <item caption="Gobo 5" value="164" />
      <item caption="Gobo 6" value="176" />
      <item caption="Gobo 7" value="190" />
      <item caption="Rotation 1" value="201" />
      <item caption="Rotation 2" value="211" />
      <item caption="Rotation 3" value="217" />
      <item caption="Rotation 4" value="225" />
      <item caption="Rotation 5" value="233" />
      <item caption="Rotation 6" value="241" />
      <item caption="Rotation 7" value="250" />
    </dropdown>
    <slider top="284" left="218" height="29" width="182" startvalue="0" endvalue="117" name="goborotslider" largechange="50" smallchange="10" tickfreq="10" action="SetGoboRot" />
    <slider top="80" left="216" height="29" width="182" startvalue="0" endvalue="75" name="shutterslider" largechange="50" smallchange="10" tickfreq="10" action="SetShutter" />
    <dropdown top="126" left="220" width="177" name="Effekt" channel="6">
      <item caption="Normal" value="0" />
      <item caption="Frost" value="128" />
      <item caption="Prisma" value="213" />
    </dropdown>
    <slider top="208" left="218" height="29" width="182" startvalue="0" endvalue="117" name="prismaslider" largechange="50" smallchange="10" tickfreq="10" action="SetPrisma" />
    <label top="226" left="14" caption="Color:" />
    <label top="266" left="15" caption="Gobo:" />
    <label top="236" left="218" caption="Gobo Rotation:" />
    <label top="32" left="220" caption="Strobe/Dimmer:" />
    <label top="108" left="220" caption="Effekt:" />
    <label top="160" left="220" caption="Prisma Rotation:" />
    <dropdown top="50" left="220" width="177" name="shutterdrop" action="SetShutter">
      <item caption="Shutter zu" value="0" />
      <item caption="Shutter auf" value="85" />
      <item caption="Dimmer" value="-1" />
      <item caption="Random Strobe" value="90" />
      <item caption="Strobe Speed" value="-2" />
      <item caption="Einblenden" value="-3" />
      <item caption="Ausblenden" value="-4" />
    </dropdown>
    <dropdown top="180" left="220" width="177" action="SetPrisma" name="prismadrop">
      <item caption="Stop" value="-1" />
      <item caption="Rotation CCW" value="0" />
      <item caption="Rotation CW" value="138" />
    </dropdown>
    <dropdown top="254" left="220" width="177" name="goborotdrop" action="SetGoboRot">
      <item caption="Stop" value="-1" />
      <item caption="Rotation CCW" value="0" />
      <item caption="Rotation CW" value="138" />
    </dropdown>
  </form>
  <code>
    <procedure name="INITCONTROLS">
   !call|GetGoboRot$
   !call|GetPrisma$
   !call|GetShutter$

   </procedure>
    <procedure name="SetGoboRot">
!if|{goborotdrop}|gt|-1|
 !set_channel|0|({goborotdrop} + {goborotslider})$
|
 !set_channel|0|130$
$
    </procedure>
    <procedure name="SetPrisma">!if|{prismadrop}|gt|-1|
 !set_channel|7|({prismadrop} + {prismaslider})$
|
 !set_channel|7|130$
$</procedure>
    <procedure name="GetGoboRot">
!if|({channel_0} &lt; 118)|
 !set_control|goborotdrop|0$
 !set_control|goborotslider|{channel_0}$
|
!if|({channel_0} &gt; 137)|
  !set_control|goborotdrop|138$
  !set_control|goborotslider|({channel_0}-138)$
 |
    !set_control|goborotdrop|-1$
 $
$
    </procedure>
    <procedure name="GetPrisma">!if|({channel_7} &lt; 118)|
 !set_control|prismadrop|0$
 !set_control|prismaslider|{channel_7}$
|
!if|({channel_7} &gt; 137)|
  !set_control|prismadrop|138$
  !set_control|prismaslider|({channel_7}-138)$
 |
    !set_control|prismadrop|-1$
 $
$</procedure>
    <procedure name="SetShutter">
!if|{shutterdrop}|gt|-1|
 !set_channel|3|{shutterdrop}$
|
 !if|{shutterdrop}|eq|-1|
  !set_channel|3|({shutterslider} + 10)$
 $
 !if|{shutterdrop}|eq|-2|
  !set_channel|3|((({shutterslider} / 5) * 4)+ 95)$
 $
 !if|{shutterdrop}|eq|-3|
  !set_channel|3|((({shutterslider} / 5) * 2)+ 160)$
 $
 !if|{shutterdrop}|eq|-4|
  !set_channel|3|((({shutterslider} / 5) * 2)+ 200)$
 $
$
    </procedure>
    <procedure name="GetShutter">
!if|({channel_3} &lt; 10)|
 !set_control|shutterdrop|0$
|
!if|({channel_3} &gt; 9) and ({channel_3} &lt; 85)|
  !set_control|shutterdrop|-1$
  !set_control|shutterslider|({channel_3}-10)$
 $
!if|({channel_3} = 85)|
  !set_control|shutterdrop|85$
 $
!if|({channel_3} &gt; 85) and ({channel_3} &lt; 95)|
  !set_control|shutterdrop|90$
 $
!if|({channel_3} &gt; 94) and ({channel_3} &lt; 156)|
  !set_control|shutterdrop|-2$
  !set_control|shutterslider|((({channel_3}-95) / 4) * 5)$
 $
!if|({channel_3} &gt; 155) and ({channel_3} &lt; 196)|
  !set_control|shutterdrop|-3$
  !set_control|shutterslider|((({channel_3}-160) / 2) * 5)$
 $
!if|({channel_3} &gt; 195) and ({channel_3} &lt; 236)|
  !set_control|shutterdrop|-4$
  !set_control|shutterslider|((({channel_3}-200) / 2) * 5)$
 $
$
    </procedure>
  </code>
</device>