<?xml version="1.0" encoding="ISO-8859-1"?>
<device image="Light.gif" initsequence="set 0 0; set 1 0; set 2 0; set 3 0; set 4 0; Set 5 0">
  <channels>
    <function channel="0" minvalue="0" maxvalue="255" name="RGB" fade="yes" type="Red" />
    <function channel="1" minvalue="0" maxvalue="255" name="RGB" fade="yes" type="Green" />
    <function channel="2" minvalue="0" maxvalue="255" name="RGB" fade="yes" type="Blue" />
    <function channel="3" minvalue="0" maxvalue="255" name="Macro" fade="yes" type="Macro" />
    <function channel="4" minvalue="0" maxvalue="255" name="Speed" fade="yes" type="Speed" />
    <function channel="5" minvalue="0" maxvalue="255" name="Mode" fade="yes" type="Mode" action="GetColor" />
  </channels>
  <form width="434" height="264">
    <deviceimage top="0" left="0" />
    <devicename top="0" left="40" />
    <deviceadress top="16" left="40" />
    <dropdown top="63" left="60" width="137" name="Color_Mode" action="SetMode">
      <item caption="RGB Mischung" value="-0" />
      <item caption="Fade Out" value="-1" />
      <item caption="Fade In" value="-2" />
      <item caption="Fade Out &amp; In" value="-3" />
      <item caption="7Farben überblenden" value="-4" />
      <item caption="3Farben umschalten" value="-5" />
      <item caption="7Farben umschalten" value="-6" />
      <item caption="Sound2Light" value="-10" />
      <item caption="Macro" value="-11" />
    </dropdown>
    <label top="63" left="11" caption="Modus:" />
    <colorpicker top="111" left="15" height="108" width="198" mode="rgb" layout="2" channel3="2" channel2="1" channel1="0" />
    <line y1="23" x1="223" y2="247" x2="223" />
    <slider top="33" left="226" height="30" width="200" startvalue="0" endvalue="255" name="color_Speed" action="SetColorSpeed" />
    <label top="12" left="235" caption="Geschwindigkeit" />
    <options top="169" left="247" name="Music_Mode" action="SetMusicMode">
      <option value="-7" caption="Aus" top="0" left="0" />
      <option value="-8" caption="Auto" top="0" left="50" />
      <option value="-9" caption="Macro" top="0" left="100" />
    </options>
    <line y1="136" x1="235" y2="136" x2="419" />
    <label top="142" left="233" caption="Musiksteuerung" />
    <label top="196" left="231" caption="Empfindlichkeit" />
    <slider top="226" left="226" height="30" width="200" startvalue="16" endvalue="255" name="macro" action="SetMusicSpeed" largechange="2" smallchange="1" tickfreq="1" />
    <line y1="67" x1="232" y2="67" x2="416" />
    <options top="75" left="285" name="Strobe" action="SetStrobe">
      <option value="-12" caption="Aus" top="0" left="0" />
      <option value="-13" caption="Ein" top="0" left="50" />
    </options>
    <label top="76" left="235" caption="Strobe:" />
    <slider top="102" left="227" height="30" width="200" startvalue="16" endvalue="255" name="Strobe_Speed" action="SetStrobeSpeed" />
  </form>
  <code>
    <procedure name="INITCONTROLS">!call|GetColor$
!call|GetMusicSpeed$
!call|GetStrobe$</procedure>
    <procedure name="GetColor">!if|{channel_5} &lt; 32|
!set_control|color_Speed|(0)$
$
!if|({channel_5} &lt;32) and ({channel_3} &lt; 16)|
!set_control|color_Mode|(-0)$
$
!if|({channel_5} &gt; 31) and ({channel_5} &lt; 64)|
!set_control|color_Mode|(-1)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 63) and ({channel_5} &lt; 96)|
!set_control|color_mode|(-2)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 95) and ({channel_5} &lt; 128)|
!set_control|color_mode|(-3)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 127) and ({channel_5} &lt; 160)|
!set_control|color_Mode|(-4)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 159) and ({channel_5} &lt; 192)|
!set_control|color_Mode|(-5)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 191) and ({channel_5} &lt; 224)|
!set_control|color_Mode|(-6)$
!set_control|color_Speed|{channel_4}$
$
!if|({channel_5} &gt; 223)|
!set_control|color_Mode|(-10)$
!set_control|music_Mode|(-8)$
$
!if|({channel_5} &lt; 223) and ({channel_3} &lt; 16)|
!set_control|music_Mode|(-7)$
$
!if|({channel_5} &lt; 32) and ({channel_3} &gt; 15)|
!set_control|music_Mode|(-9)$
!set_control|color_Mode|(-11)$
$</procedure>
    <procedure name="SetMode">!if|{color_Mode}|eq|(-0)|
!set_channel|5|0$
!set_channel|4|0$
!set_channel|3|0$
!set_control|Strobe|(-12)$
$
!if|{color_Mode}|eq|(-1)|
!set_channel|5|32$
$
!if|{color_Mode}|eq|(-2)|
!set_channel|5|64$
$
!if|{color_Mode}|eq|(-3)|
!set_channel|5|96$
$
!if|{color_Mode}|eq|(-4)|
!set_channel|5|128$
$
!if|{color_Mode}|eq|(-5)|
!set_channel|5|160$
$
!if|{color_Mode}|eq|(-6)|
!set_channel|5|192$
$
!if|{color_Mode}|eq|(-10)|
!set_channel|5|240$
$
!if|{color_Mode}|eq|(-11)|
!set_channel|5|0$
!set_channel|3|({macro}+16)$
!set_control|macro|0$
!set_control|Strobe|(-12)$
$
</procedure>
    <procedure name="SetColorSpeed">!if|{color_Mode} &lt; (-0)|
!set_channel|4|{color_Speed}$
$
</procedure>
    <procedure name="SetMusicMode">!if|{music_mode}|eq|(-7)|
!set_channel|5|0$
!set_channel|3|0$
!set_control|color_Mode|(-0)
$
!if|{music_mode} = (-8)|
!set_channel|5|240$
$
!if|{music_mode}|eq|(-9)|
!set_channel|3|({macro}+16)$
!set_channel|5|0$
!set_control|macro|0$
$
</procedure>
    <procedure name="SetMusicSpeed">!if|{music_mode}|eq|(-9)|
!set_channel|3|{macro}$
$
!if|{color_mode}|eq|(-11)|
!set_channel|3|{macro}$
$</procedure>
    <procedure name="SetStrobeSpeed">!if|{Strobe} = (-13) and {color_Mode} = (-11)|
!set_channel|4|({Strobe_Speed} + 16)$
$
!if|{Strobe} = (-13) and {color_Mode} = (-0)|
!set_channel|4|({Strobe_Speed} + 16)$
$
!if|{Strobe}=(-13) and {music_Mode}=(-9)|
!set_channel|4|({Strobe_Speed} + 16)$
$
</procedure>
    <procedure name="SetStrobe">!if|{Strobe}|eq|(-12)|
!set_channel|4|0$
!set_control|Strobe_Speed|0$
$
!if|({Strobe} = -13) and ({color_Mode} = -11)|
!set_channel|4|({Strobe_Speed}+16)$
$
!if|({Strobe} = -13) and ({color_Mode} = -0)|
!set_channel|4|({Strobe_Speed}+16)$
$
!if|({Strobe}=(-13)) and ({music_Mode}=(-9))|
!set_channel|4|({Strobe_Speed}+16)$
$
</procedure>
    <procedure name="GetStrobe">!if|{channel_4} &lt; (16)|
!set_control|Strobe|(-12)$
$
!if|{channel_4} &gt; (15) and {color_Mode} = (-0)|
!set_control|Strobe|(-13)$
$
!if|{channel_4} &gt; (15) and {color_Mode} = (-11)|
!set_control|Strobe|(-13)$
$
!if|{Strobe} = (-13)|
!set_control|Strobe_Speed|{channel_4}$
$
</procedure>
    <procedure name="GetMusicSpeed">!if|{music_Mode}|eq|(-9)
!set_control|macro|{channel_3}$
$
!if|{color_Mode}|eq|(-11)
!set_control|macro|{channel_3}$
$
</procedure>
  </code>
</device>