Type: DmxUniverse

From Waltz
Jump to navigation Jump to search

The DmxUniverse type represents 512 channels of control with values in the range of 0 to 255. This type is designed to represents a single universe of DMX512 data for use with ArtNet, sACN, or other DMX transport methods.

DmxUniverse is technically a special-purpose type of Map which is keyed by a Number between 1 and 512 inclusive and who value is also always a Number between 0 and 255 inclusive.


There are no constructors exposed by this type. DmxUniverse objects can only be obtained from an ArtNet Input Node as part of a DmxMultiverse.

Collection Access

As DmxUniverse is based upon the Map type, it has the same special treatment for getting and setting values using the bracket notation.

To set channel 42 to 70% of universe you would write:

universe[42] = 179;

To print the values of universe 77 to the Console you would write:



There are no parameters exposed by this type.


Note: There are additional functions described for the Map type that technically work here, but can cause unpredictable results. For example, the ability to remove entries from a map will result in missing channels of data, the handling of which is undefined. It is therefor not safe to utilize those functions with DmxUniverse objects.

Arguments Returns Details
containsKey(chan) Number chan - The channel number for which to check. Boolean Checks to see if the universe contains the specified channel. This should always return true for channels 1 through 512, and false for all other channels.
containsValue(val) Number val - The value for which to check. Boolean Checks to see if any channel in the universe is set to the specified value.
get(chan) Number chan - The channel number for which to get the value. Number Gets the value for the given channel.
put(chan, val) Number chan - The channel number for which to set the value.

Number val - The value to assign to the specified channel.

Void Sets a specific channel to a specific value.
putAll(universe) DmxUniverse universe - The universe from which to set all values in this universe. Void Sets the values of this universe to the values of the provided universe.
replace(chan, oldVal, newVal) Number chan - The channel number for which to set the value.

Number oldVal - The old value of the channel. If the value is not currently this value, the new value is not replaced.

Number newVal - The new value to assign to the channel.

Boolean Sets a specific channel to a specific value only if the previous value for the channels matches the oldVal provided. Returns true if the value was replaced, otherwise false.
size() Number Returns the number channels in the universe. This should always be 512.
equals(universe) DmxUniverse universe - A point against which to compare equality. Boolean Compares two universes to determine if they contain identical values for all 512 channels.
Primitives Boolean · Number · String
Objects Color · Dimension · DmxMultiverse · DmxUniverse · LocalInterface · Material · Point · RemoteAddress/IP · Scene · Time · Touch
Node Specific NdiSource · WoControlCue · WoHitTestResult · WoTimeline
Collections List · List of Lists · Map · Varargs
Special Any · Consumer · Expression · Null · Void