Members | Sign In
All Forums > Hardware and LBE construction
avatar

DMX XML Specification

posted Sep 25, 2012 22:36:27 by NickJackson
Is there a specification of exactly how the XML file drives the DMX channels and what all the attributes do? I'm pretty sure index is the DMX channel, but is value 0-100 or 0-255? What does 'change' do? Are values LTP or HTP?

I'm playing with some environmental effects, and it's the difference between a light 'we might be in trouble' smoke and a 'I can't see my hand in front of my face' smoke!
page   1
15 replies
avatar
MarkBell said Oct 02, 2012 13:25:29
Index is the address of the particular device (or channel) and the value goes from 0-255 (8 bits, or 1 full byte). DMX-512 is an RS-485 protocol with a particular packet organization.

For Reference
avatar
MichaelMesich said Oct 05, 2012 03:19:58
Index 1/2/3 in the file appear to relate to R/G/B across all the lights.

Is there a way to target a specific light in the chain? (I know the comments in the file say "first light box" but this doesn't appear to really be the case.) I would like to seperate out Shield and Red Alert for example so I can foster actual usage of Red Alert(!) while still having an indicator of shield presence.

Is there info on targeting a fogger? I haven't found that yet.

I'm also curious if there are any other captured events we could control against and just what the "change" attribute is there for.

[Last edited Oct 05, 2012 03:20:59]
avatar
MarkBell said Oct 05, 2012 03:29:49
Index 1/2/3 are set up to control addresses 1/2/3, which are the rgb channels on the dmx compatible light that Thom uses. The file is configurable to use up to 512 addresses or channels, so all you'd have to do is set the red alert to trigger address 43 (where your red alert lights are all set to channel 43) and boom.
avatar
MichaelMesich said Oct 05, 2012 05:07:34
I don't see a triggering of address anywhere though:

<event type="RED_ALERT" continuous="yes">

<!-- steady red light -->
<timeblock mseconds="1000">
<setvalue index="0" value="200" change="0"/>
<!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

I don't see any channel specs here. Just an index of 0/1/2 (forgot to 0-index above) referring to RGB amounts. How do I target a different channel/device?
avatar
MichaelMesich said Oct 05, 2012 06:18:08
Aha! Dip-switches!

Ran across a reference to them in another thread and figured out these SlimPARs have an up/down setting after setting them to Channel-3.

Setting the rear lamp to start at d-3 let's me hit it independently! Red Alert + Shield Light combo achieved!

Thanks for the pointers. I'm looking forward to thinking about more things to do with more lights now. :)
avatar
MichaelMesich said Oct 06, 2012 03:16:05
Any idea what the CHANGE attribute does? I wouldn't mind a way to ease the light instead of just jumping from one setting to another.
avatar
ThomRobertson said Oct 08, 2012 17:14:35
CHANGE is change over time. So, if you want the light channel to fade to black, use
CHANGE = -0.1

currently the change stops at the limits of 0 and 255.
Creator of Artemis
avatar
MarkBell said Dec 03, 2012 13:16:48
Is the CHANGE attribute tied to a particular timing? Like does

<setvalue index="4" value="100" change="-0.1"/>
      <!-- red   value of first light box -->


decay channel 4 a particular amount (10%?) over a particular time (100 ms?)?

Also, does CHANGE accept any values asides from 0 and -0.1?
avatar
MarkBell said Dec 10, 2012 13:00:35
More questions! Can you set up a particular event to have 2 types? like, if I wanted Red Alert to flash several times then settle to a specific value, could I have an event
<event type="RED_ALERT" continuous="no">
and an event
<event type="RED_ALERT" continuous="yes">
to follow? Or if I wanted some lights to flash for a bit then return to normal and other lights to hit red and stay there?
[Last edited Dec 10, 2012 13:00:55]
avatar
ThomRobertson said Dec 13, 2012 02:39:13
decay channel 4 a particular amount (10%?) over a particular time (100 ms?)?


Yes.

Also, does CHANGE accept any values asides from 0 and -0.1?


It takes any floating point number.

Creator of Artemis
avatar
MarkBell said Dec 15, 2012 15:06:05
Ok, more questions about change - I can't seem to get it to do much of anything. I've tried different values in both continuous and not continuous events, I've used positive and negative numbers, nothing seems to do much of anything. Example:

  <event type="TRACTORED_FOR_DOCKED" continuous="yes">

    <!-- steady yellow light -->
    <timeblock mseconds="1000">
      <setvalue index="5" value="200" change="-0.1"/>
      <!-- red   value of first light box -->
      <setvalue index="6" value="200" change="-0.1"/>
      <!-- green value of first light box -->
      <setvalue index="7" value="13" change="0"/>
      <!-- blue  value of first light box -->
    </timeblock>
    <timeblock mseconds="1000">
      <setvalue index="5" value="150" change="0.1"/>
      <!-- red   value of first light box -->
      <setvalue index="6" value="150" change="0.1"/>
      <!--green value of first light box -->
      <setvalue index="7" value="13" change="0"/>
      <!-- blue  value of first light box -->
    </timeblock>
  </event>


Just goes from one value to the other without changing anything. Am I missing something?
[Last edited Dec 15, 2012 15:06:28]
avatar
ThomRobertson said Dec 20, 2012 01:53:53
I've just looked at the code, and I'm not sure it's working properly. If I need to fix it, it'll be fixed in the upcoming V1.70 release.
Creator of Artemis
avatar
ThomRobertson said Dec 20, 2012 20:14:23
Okay, hear's a video of the change value in action.
http://youtu.be/2B_iE7hT5iM

That's when red alert is on.

Here's all of my DMXCOmmands.XML:
--------------------------------------------------------






<?xml version="1.0" encoding="utf-8"?>

<DMX_CONTROL version="1.66">

<!-- ********************************************************************************************* -->
<event type="NORMAL_CONDITION_1" continuous="yes">

<!-- steady soft white light -->
<timeblock mseconds="1000">
<setvalue index="0" value="100" change="0"/>
<!-- red value of first light box -->
<setvalue index="1" value="100" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="100" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="PLAYER_SHIELDS_ON" continuous="yes">

<!-- steady blue light -->
<timeblock mseconds="1000">
<setvalue index="0" value="0" change="0"/>
<!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="200" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="TRACTORED_FOR_DOCKED" continuous="yes">

<!-- steady yellow light -->
<timeblock mseconds="1000">
<setvalue index="0" value="200" change="0"/>
<!-- red value of first light box -->
<setvalue index="1" value="200" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="COMPLETELY_DOCKED" continuous="yes">

<!-- steady green light -->
<timeblock mseconds="1000">
<setvalue index="0" value="0" change="0"/>
<!-- red value of first light box -->
<setvalue index="1" value="200" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="RED_ALERT" continuous="yes">

<timeblock mseconds="2000">
<setvalue index="0" value="200" change="-90"/>
<!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/>
<!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="2000">
<setvalue index="0" value="0" change="30"/>
<!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/>
<!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/>
<!-- blue value of first light box -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="SHIP_DAMAGE_20" continuous="yes">
<!-- flicker the light of the first light box -->
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="600">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="450">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="4501">
</timeblock>

</event>


<!-- ********************************************************************************************* -->
<event type="SHIP_DAMAGE_40" continuous="yes">
<!-- flicker the light of the first light box -->
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="200">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="550">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="4501">
</timeblock>

</event>


<!-- ********************************************************************************************* -->
<event type="SHIP_DAMAGE_60" continuous="yes">
<!-- flicker the light of the first light box -->
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="733">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="1450">
</timeblock>
<timeblock mseconds="81">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="1001">
</timeblock>

</event>

<!-- ********************************************************************************************* -->
<event type="SOMETHING_HITS_PLAYER">

<!-- flicker the light of the first light box -->
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="255" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="255" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="255" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="255" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="255" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="255" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="255" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="255" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="255" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="60">
<setvalue index="0" value="0" change="0"/> <!-- red value of first light box -->
<setvalue index="1" value="0" change="0"/> <!-- green value of first light box -->
<setvalue index="2" value="0" change="0"/> <!-- blue value of first light box -->
</timeblock>
</event>

</DMX_CONTROL>

Creator of Artemis
avatar
MarkBell said Dec 22, 2012 20:11:23
Ah, so my values for change may just be too slow to notice. I'll try upping the values and see if that does it.
avatar
MarkBell said Dec 23, 2012 13:04:14
And that did it!

<event type="TRACTORED_FOR_DOCKED" continuous="yes">
<!-- pulsing yellow light -->
<timeblock mseconds="500">
<setvalue index="5" value="200" change="-100"/> <!-- red value of first light box -->
<setvalue index="6" value="200" change="-100"/> <!-- green value of first light box -->
<setvalue index="7" value="13" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="500">
<setvalue index="5" value="150" change="100"/> <!-- red value of first light box -->
<setvalue index="6" value="150" change="100"/> <!-- green value of first light box -->
<setvalue index="7" value="13" change="0"/> <!-- blue value of first light box -->
</timeblock>
</event>

It's subtle, but the light pulsing as the tractor grabs you is noticeable and kinda neat. The change also makes it much smoother (and simpler to implement) than my last approach, which was updating the value of the tractor every 100 ms with an adjustment of 10 or so. 1 value/10ms is also a nice and easy way to calculate your modes. Also, Red Alert - It's not quite what I want, but it's pretty close. It flashes with the sound file, reverting to the previous lighting mode between flashes, then stays on for 30 seconds before flashing again. Long enough to not be too distracting, but enough to remind folks that they're at Red Alert. I also am a fan of fading in :) The engine defaults to 0 if there's no value input, but change still works - it just starts at 0.

<event type="RED_ALERT" continuous="yes">
<!-- timed red light -->
<timeblock mseconds="500">
<setvalue index="5" value="100" change="300"/> <!-- red value of first light box -->
<setvalue index="6" change="0"/> <!-- green value of first light box -->
<setvalue index="7" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="400">
<setvalue index="5" value="250" change="0"/> <!-- red value of first light box -->
<setvalue index="6" value="5" change="0"/> <!-- green value of first light box -->
<setvalue index="7" value="5" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="1000">
</timeblock>
<timeblock mseconds="500">
<setvalue index="5" value="100" change="300"/> <!-- red value of first light box -->
<setvalue index="6" change="0"/> <!-- green value of first light box -->
<setvalue index="7" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="400">
<setvalue index="5" value="250" change="0"/> <!-- red value of first light box -->
<setvalue index="6" value="5" change="0"/> <!-- green value of first light box -->
<setvalue index="7" value="5" change="0"/> <!-- blue value of first light box -->
</timeblock> <timeblock mseconds="1000">
</timeblock>
<timeblock mseconds="500">
<setvalue index="5" value="100" change="300"/> <!-- red value of first light box -->
<setvalue index="6" change="0"/> <!-- green value of first light box -->
<setvalue index="7" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="400">
<setvalue index="5" value="250" change="0"/> <!-- red value of first light box -->
<setvalue index="6" value="5" change="0"/> <!-- green value of first light box -->
<setvalue index="7" value="5" change="0"/> <!-- blue value of first light box -->
</timeblock> <timeblock mseconds="1000">
</timeblock>
<timeblock mseconds="500">
<setvalue index="5" value="100" change="300"/> <!-- red value of first light box -->
<setvalue index="6" change="0"/> <!-- green value of first light box -->
<setvalue index="7" change="0"/> <!-- blue value of first light box -->
</timeblock>
<timeblock mseconds="30000">
<setvalue index="5" value="250" change="0"/> <!-- red value of first light box -->
<setvalue index="6" value="5" change="0"/> <!-- green value of first light box -->
<setvalue index="7" value="5" change="0"/> <!-- blue value of first light box -->
</timeblock>
</event>
[Last edited Dec 23, 2012 13:07:11]
Login below to reply: