<?xml version="1.0"?>
<device image="Mh.gif" initsequence="set 0 128;set 1 128;set 2 128;set 3 128;set 4 0;set 5 0;set 6 2;set 7 0;set 8 0">
	<information>
		<vendor>Robe</vendor>
		<name>Spot 160</name>
		<author>Arne Lüdtke</author>
		<version>1</version>
	</information>
	<channels>
		<function channel="0" minvalue="0" maxvalue="255" name="Pan" fade="yes" type="pan" />
		<function channel="1" minvalue="0" maxvalue="255" name="Tilt " fade="yes" type="tiltfine" />
		<function channel="2" minvalue="0" maxvalue="255" name="Pan (Fein)" fade="yes" type="panfine" />
		<function channel="3" minvalue="0" maxvalue="255" name="Tilt (Fein)" fade="yes" type="tiltfine" />
		<function channel="4" minvalue="0" maxvalue="255" name="PanTilt Speed" fade="yes" action="GetPanTiltSpeed" />
		<function channel="5" minvalue="0" maxvalue="255" name="Lamp ON/OFF" fade="no" />
		<function channel="6" minvalue="0" maxvalue="255" name="Farbe" fade="yes" type="color" action="GetColor" />
		<function channel="7" minvalue="0" maxvalue="255" name="Goborot" fade="yes" action="GetRotGobo" />
		<function channel="8" minvalue="0" maxvalue="255" name="Shutter" fade="yes" action="GetShutter" />
	</channels>
	<form width="380" height="410">
		<deviceimage top="0" left="0" width="33" height="33" />
		<devicename top="0" left="40" width="129" height="17" />
		<deviceadress top="16" left="40" width="129" height="17" />
		<position top="38" left="4" height="177" width="177" />
		<label top="219" left="0" caption="Farbe:" />
		<dropdown top="235" left="0" width="177" name="colordrop" action="SetColor">
			<item caption="Weiß" value="0" />
			<item caption="Türkis" value="10" />
			<item caption="Rot" value="21" />
			<item caption="Cyan" value="32" />
			<item caption="Hellgrün" value="42" />
			<item caption="Magenta" value="53" />
			<item caption="Hellblau" value="64" />
			<item caption="Gelb" value="74" />
			<item caption="Grün" value="85" />
			<item caption="Pink" value="96" />
			<item caption="Blau" value="106" />
			<item caption="Orange" value="117" />
			<item caption="Rainbow Effekt CW" value="-1" />
			<item caption="Keine Rotation" value="191" />
			<item caption="Rainbow Effekt CCW" value="-2" />
		</dropdown>
		<label top="270" left="0" caption="Farbrad Rotation Geschwindigkeit:" />
		<slider top="290" left="0" height="28" width="177" startvalue="0" endvalue="61" tickfreq="16" name="color_speed" action="SetColor" />
		<label top="320" left="0" caption="Gobo:" />
		<dropdown top="336" left="0" width="177" name="gobodrop" action="SetGobo">
			<item caption="Offen" value="0" />
			<item caption="Gobo 1" value="1" />
			<item caption="Gobo 2" value="2" />
			<item caption="Gobo 3" value="3" />
			<item caption="Gobo 4" value="4" />
			<item caption="Gobo 5" value="5" />
			<item caption="Gobo 6" value="6" />
			<item caption="Gobo 7" value="7" />
			<item caption="Goborad Rotation" value="8" />
		</dropdown>
		<label top="366" left="0" caption="Shake/Goborad Geschwindigkeit:" />
		<slider top="386" left="0" height="28" width="177" startvalue="0" endvalue="19" tickfreq="5" name="gobo_speed" action="SetGobo" />
		<label top="40" left="190" caption="Goborotation:" />
		<dropdown top="60" left="190" width="177" name="goborotdrop" action="SetRotGobo">
			<item caption="Gobo Rotation" value="-3" />
			<item caption="Gobo Rotation CW" value="-1" />
			<item caption="Keine Drehung" value="-4" />
			<item caption="Gobo Rotation CCW" value="-2" />
		</dropdown>
		<label top="88" left="190" caption="Gobo Position:" />
		<slider top="108" left="190" height="28" width="177" startvalue="0" endvalue="127" tickfreq="32" name="gobo_pos" action="SetRotGobo" />
		<label top="138" left="190" caption="Gobo Drehgeschwindigkeit:" />
		<slider top="158" left="190" height="28" width="177" startvalue="0" endvalue="61" tickfreq="16" name="goborot_speed" action="SetRotGobo" />
		<label top="366" left="190" caption="Gobo Shake:" />
		<options top="386" left="190" name="goboswitch" action="SetGobo">
			<option value="-1" caption="Aus" left="0" top="0" />
			<option value="-2" caption="An" left="50" top="0" />
		</options>
		<label top="188" left="190" caption="Shutter:" />
		<dropdown top="208" left="190" width="177" name="shutterdrop" action="SetShutter">
			<item caption="Geschlossen" value="0" />
			<item caption="Licht Intensität" value="-1" />
			<item caption="Offen" value="70" />
			<item caption="Stroboskop" value="-2" />
			<item caption="Pulse Effect ansteigend" value="-3" />
			<item caption="Pulse Effect abfallend" value="-4" />
			<item caption="Zufalls Stroboskop" value="-5" />
		</dropdown>
		<label top="236" left="190" caption="Dimmer / Strobo - Pulse Geschw.:" />
		<slider top="256" left="190" height="28" width="177" startvalue="0" endvalue="31" tickfreq="8" name="shutter_speed" action="SetShutter" />
		<label top="286" left="190" caption="Pan/Tilt Geschwindigkeit:" />
		<dropdown top="306" left="190" width="177" name="pantiltdrop" action="SetPanTiltSpeed">
			<item caption="Tracking" value="0" />
			<item caption="Speed" value="-1" />
			<item caption="Tracking mit Blackout Mode 1" value="251" />
			<item caption="Tracking mit Blackout Mode 2" value="254" />
		</dropdown>
		<slider top="334" left="190" height="28" width="177" startvalue="0" endvalue="248" tickfreq="62" name="pantilt_speed" action="SetPanTiltSpeed" />
	</form>
	<code>
		<procedure name="INITCONTROLS">
   !call|GetColor$
   !call|GetGobo$
   !call|GetRotGobo$
   !call|GetShutter$
   !call|GetPanTiltSpeed$
		</procedure>
		<procedure name="GetColor">
!if|({channel_5} &lt; 128) or ({channel_5} = 191)|
 !set_control|colordrop|{channel_5}$
|
!if|({channel_5} &gt; 127) and ({channel_5} &lt; 190)|
  !set_control|colordrop|-1$
  !set_control|color_speed|(189-{channel_5})$
 $
!if|({channel_5} &gt; 193)|
  !set_control|colordrop|-2$
  !set_control|color_speed|({channel_5}-194)$
 $
$
		</procedure>
		<procedure name="SetColor">
!if|({colordrop} &gt; -1)|
  !set_channel|5|({colordrop})$
|
!if|{colordrop}|eq|-1|
  !set_channel|5|(189-{color_speed})$
 $
!if|{colordrop}|eq|-2|
  !set_channel|5|({color_speed}+194)$
 $
$
		</procedure>
		<procedure name="GetGobo">
!if|({channel_6} &lt; 96)|
 !set_control|gobodrop|(({channel_6}-2)/12)$
 !set_control|goboswitch|-1$
|
!if|({channel_6} &gt; 95)|
 !set_control|gobodrop|(((({channel_6}-(({channel_6}-96) mod 20))-96)/20)+1)$
 !set_control|gobo_speed|(({channel_6}-96) mod 20)$
 !set_control|goboswitch|-2$
 $
$
		</procedure>
		<procedure name="SetGobo">
!if|({gobodrop} &lt; 8) and ({goboswitch} = -1)|
 !set_channel|6|(({gobodrop}*12)+2)$
|
!if|({goboswitch} = -2)|
  !set_channel|6|((({gobodrop}-1)*20)+{gobo_speed}+96)$
 $
!if|({gobodrop} = 8) and ({goboswitch} = -1)|
  !set_channel|6|236$
 !call|GetGobo$
 $
$
		</procedure>
		<procedure name="GetRotGobo">
!if|({channel_7} &lt; 128)|
 !set_control|goborotdrop|-3$
 !set_control|gobo_pos|{channel_7}$
|
!if|({channel_7} &gt; 127) and ({channel_7} &lt; 190)|
  !set_control|goborotdrop|-1$
  !set_control|goborot_speed|(189-{channel_7})$
 $
!if|({channel_7} = 191)|
  !set_control|goborotdrop|-4$
 $
!if|({channel_7} &gt; 193)|
  !set_control|goborotdrop|-2$
  !set_control|goborot_speed|({channel_7}-194)$
 $
$
		</procedure>
		<procedure name="SetRotGobo">
!if|{goborotdrop}|eq|-1|
  !set_channel|7|(189-{goborot_speed})$
 |
!if|{goborotdrop}|eq|-2|
  !set_channel|7|({goborot_speed}+194)$
 $
!if|{goborotdrop}|eq|-3|
  !set_channel|7|({gobo_pos})$
 $
!if|{goborotdrop}|eq|-4|
  !set_channel|7|191$
 $
$
		</procedure>
		<procedure name="GetPanTiltSpeed">
!if|({channel_4} &lt; 1) or ({channel_4} &gt; 249)|
  !set_control|pantiltdrop|{channel_4}$
 |
!if|({channel_4} &gt; 0) and ({channel_4} &lt; 250)|
  !set_control|pantiltdrop|-1$
  !set_control|pantilt_speed|(249-{channel_4})$
 $
$
		</procedure>
		<procedure name="SetPanTiltSpeed">
!if|{pantiltdrop}|gt|-1|
 !set_channel|4|{pantiltdrop}$
|
!if|{pantiltdrop}|eq|-1|
  !set_channel|4|(249-{pantilt_speed})$
 $
$
		</procedure>
		<procedure name="GetShutter">
!if|({channel_8} = 0) or ({channel_8} = 70)|
  !set_control|shutterdrop|{channel_8}$
 |
!if|({channel_8} &gt; 0) and ({channel_8} &lt; 64)|
  !set_control|shutterdrop|-1$
  !set_control|shutter_speed|(({channel_8}-1)/2)$
 $
!if|({channel_8} &gt; 95) and ({channel_8} &lt; 128)|
  !set_control|shutterdrop|-2$
  !set_control|shutter_speed|({channel_8}-96)$
 $
!if|({channel_8} &gt; 159) and ({channel_8} &lt; 176)|
  !set_control|shutterdrop|-3$
  !set_control|shutter_speed|(({channel_8}-160)*2)$
 $
!if|({channel_8} &gt; 175) and ({channel_8} &lt; 192)|
  !set_control|shutterdrop|-4$
  !set_control|shutter_speed|(({channel_8}-176)*2)$
 $
!if|({channel_8} &gt; 191)|
  !set_control|shutterdrop|-5$
  !set_control|shutter_speed|(({channel_8}-192))$
 $
$
		</procedure>
		<procedure name="SetShutter">
!if|{shutterdrop}|gt|-1|
 !set_channel|8|{shutterdrop}$
|
!if|{shutterdrop}|eq|-1|
  !set_channel|8|(({shutter_speed}*2)+1)$
 $
!if|{shutterdrop}|eq|-2|
  !set_channel|8|(96+{shutter_speed})$
 $
!if|{shutterdrop}|eq|-3|
  !set_channel|8|(160+({shutter_speed}/2))$
 $
!if|{shutterdrop}|eq|-4|
  !set_channel|8|(176+({shutter_speed}/2))$
 $
!if|{shutterdrop}|eq|-5|
  !set_channel|8|(192+{shutter_speed})$
 $
$
		</procedure>
	</code>
</device>