<?xml version="1.0" encoding="ISO-8859-1"?>
<device image="Pilot300.gif" initsequence="set 0 0; set 2 0; set 3 255; set 4 127; set 5 127; set 8 127; set 9 127">
  <information>
    <author>Paul Korn</author>
    <name>Pilot 150</name>
    <vendor>PR</vendor>
    <panarea degree="540" />
    <tiltarea degree="270" />
    <version>1</version>
  </information>
  <channels>
    <function channel="0" minvalue="0" maxvalue="255" name="Gobo" fade="no" type="gobo" />
    <function channel="1" minvalue="0" maxvalue="255" name="Goborot" fade="no" action="getGoborot" />
    <function channel="2" minvalue="0" maxvalue="255" name="color" fade="no" type="color" />
    <function channel="3" minvalue="0" maxvalue="255" name="Shutter" 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="panfine" fade="yes" type="panfine" />
    <function channel="7" minvalue="0" maxvalue="255" name="tiltfine" fade="yes" type="tiltfine" />
  </channels>
  <form width="435" height="270">
    <deviceimage top="0" left="0" width="33" height="33" />
    <devicename top="0" left="40" width="150" height="17" />
    <deviceadress top="16" left="40" width="129" height="17" />
    <position top="40" left="4" height="230" width="242" />
    <!-- < ^v > -->
    <!-- Helligkeit -->
    <label top="184" left="256" caption="Helligkeit/Frequenz" />
    <slider top="200" left="264" height="25" width="153" startvalue="0" endvalue="255" tickfreq="51" smallchange="10" largechange="20" name="shutter_index" action="setShutter" />
    <!-- Color -->
    <!-- Gobo -->
    <label top="40" left="248" caption="Gobos" />
    <!-- Goborot -->
    <!-- Shutter/Shaking -->
    <!-- Fokus -->
    <label top="8" left="248" caption="Farbe" />
    <slider top="128" left="264" height="25" width="153" startvalue="0" endvalue="255" smallchange="10" largechange="20" name="gobos_index" tickfreq="51" action="setGoborot" />
    <label top="112" left="256" caption="Winkel/Dregeschwindigkeit" />
    <dropdown top="8" left="296" width="121" name="color" channel="2">
      <item caption="weiß" value="0" color="#ffffff" />
      <item caption="Rot" value="28" color="#ff0000" />
      <item caption="Gelb" value="56" color="#fee118" />
      <item caption="Hellgrün" value="84" color="#80ff00" />
      <item caption="Pink" value="112" color="#ff8cff" />
      <item caption="UV" value="140" color="#6c02fd" />
      <item caption="Cyan" value="168" color="#00ffff" />
      <item caption="Grün" value="196" color="#009f00" />
      <item caption="Blau" value="224" color="#3333ff" />
      <item caption="Orange" value="252" color="#ff9a35" />
    </dropdown>
    <dropdown top="48" left="296" width="121" name="gobo" channel="0">
      <item caption="offen" value="0" />
      <item caption="Gobo 1" value="34" />
      <item caption="Gobo 2" value="67" />
      <item caption="Gobo 3" value="100" />
      <item caption="Gobo 4" value="133" />
      <item caption="Gobo 5" value="166" />
      <item caption="Gobo 6" value="200" />
      <item caption="Gobo 7" value="233" />
    </dropdown>
    <command top="230" left="310" width="56" caption="Reset" clicksequence="save 0; set 0 6; hold 5500; restore 0" />
    <dropdown top="88" left="296" width="121" name="gobos_mode" action="setGoborot">
      <item caption="normal" value="0" />
      <item caption="Drehen UZ" value="-1" />
      <item caption="Drehen GUZ" value="-2" />
    </dropdown>
    <label top="72" left="256" caption="Gobomodus" />
    <label top="152" left="248" caption="Shutter" />
    <dropdown top="160" left="296" width="121" name="shutter_mode" action="setShutter">
      <item caption="Dimmer" value="0" />
      <item caption="Stobo" value="-1" />
    </dropdown>
  </form>
  <code>
    <procedure name="INITCONTROLS">
   !call|getGoborot$
   !call|getShutter$
   !call|getPrism$</procedure>
    <procedure name="setGoborot">
!if|{gobos_mode}=0|
 !set_channel|1|(8+({gobos_index}*0.6079))$
|
  !if|{gobos_mode}=-1|
   !set_channel|1|(164+({gobos_index}*0.1608))$
 |
   !if|{gobos_mode}=-2|
    !set_channel|1|(214+({gobos_index}*0.1608))$
  $
 $
$    </procedure>
    <procedure name="getGoborot">

!if|({channel_1} &gt; -1) and ({channel_1}&lt; 8 )|
 !set_channel|1|8$
 !set_control|gobos_mode|0$
$
!if|({channel_1} &gt;205) and ({channel_1}&lt; 214 )|
 !set_channel|1|8$
 !set_control|gobos_mode|0$
$
!if|({channel_1} &gt; 7) and ({channel_1}&lt; 164 )|
 !set_control|gobos_mode|0$
 !set_control|gobos_index|(({channel_1}-8)/0.6079)$
$
!if|({channel_1} &gt; 163) and ({channel_1} &lt;206)|
 !set_control|gobos_mode|-1$
 !set_control|gobos_index|(({channel_1}-164)/0.1608)$
$
!if|({channel_1} &gt; 213) and ({channel_1} &lt; 256)|
 !set_control|gobos_mode|-2$
 !set_control|gobos_index|(({channel_1}-214)/0.1608)$
$
		</procedure>
    <procedure name="setShutter">
!if|{shutter_mode}=0|
 !set_channel|3|(10+({shutter_index}*0.4902))$
$
!if|{shutter_mode}=-1|
  !set_channel|3|(136+({shutter_index}*0.2157))$
$</procedure>
    <procedure name="getShutter">
!if|({channel_3} &gt;-1) and ({channel_3} &lt;10)|
 !set_control|shutter_mode|0$
 !set_control|shutter_index|(({channel_3}-10)/0.4900)$
$
!if|({channel_3} &gt; 9) and ({channel_3} &lt; 136)|
 !set_control|shutter_mode|0$
 !set_control|shutter_index|(({channel_3}-10)/0.4900)$
$
!if|({channel_3} &gt; 135) and ({channel_3} &lt;252)|
 !set_control|gobos_mode|-1$
 !set_control|shutter_index|(({channel_3}-136)/0.2156)$
$
!if|({channel_3} &gt;251) and ({channel_3} &lt;256)|
 !set_control|shutter_mode|0$
 !set_control|shutter_index|(({channel_3}-9)/0.732)$
$</procedure>
    <procedure name="setPrism">
!if|{prism_mode}=0|
 !set_channel|7|0$
$
 !if|{prism_mode}=-1|
  !set_channel|7|(48+({prism_index}*0.1627))$
 $
 !if|{prism_mode}=-2|
  !set_channel|7|(194+({prism_index}*0.2393))$
 $
 !if|{prism_mode}=-3|
  !set_channel|7|(128+({prism_index}*0.2393))$
 $
		</procedure>
    <procedure name="getPrism">
!if|({channel_7} &gt; -1) and ({channel_7}&lt; 32 )|
 !set_control|prism_mode|0$
$
!if|({channel_7} &gt;31) and ({channel_7}&lt; 48 )|
 !set_control|prism_mode|-1$
 !set_channel|7|48$ 
$
!if|({channel_7} &gt; 47) and ({channel_7} &lt;128)|
  !set_control|prism_mode|-1$
  !set_control|prism_index|(({channel_7}-48)/0.1627)$
 $
!if|({channel_7} &gt; 193) and ({channel_7} &lt; 256)|
  !set_control|prism_mode|-2$
  !set_control|prism_index|(({channel_7}-194)/0.2393)$
 $
!if|({channel_7} &gt; 127) and ({channel_7} &lt; 190)|
  !set_control|prism_mode|-3$
  !set_control|prism_index|(({channel_7}-128)/0.2393)$
 $

		</procedure>
  </code>
</device>