Expression DMX Patching

In version 0.1.2a+

Expression DMX Patching allows you to create new DMX mappings in-place for simpler light fixtures.

Using constants (eg. 255) and variables (eg. R, G, B) delimeted by a comma you are able to express a DMX mapping in a single line.

How To Use

Use the expression, in the format below, as the Model name when setting an output/changing model.

NAME:EXPRESSION

Expression is made up of descriptions for individual DMX channels separated by a colon (,)

CH1,CH2,CH3,...

Each channel can be a full mathematical expression but you'll likely be just either entering a fixed DMX value (0-255) or referencing one of the available variables (see below for a list).

Caveats

All variables reference only the first pixel of a fixture. Currently there is no way to expand the DMX mapping to all available pixels.

You can still map multipixel fixtures by creating two fixtures - one using this Expression mapping and the other using one of the standard RGB mappings which do expand to cover all available pixels.

Example - RGBW Fixture

An RGBW fixture is available from the standard fixtures so this is only provided as an explanatory example.

RGBW:R,G,B,W

Example - Claypaky HY B-EYE

Given the following DMX chart:

We can write the following expression as the Model name:

Claypaky.HY B-EYE:R,r,G,g,B,b,W,w,O,0,S,255,255,P,p,T,t,0,0,Z,0,0

Available Variables

Uppercase variables yield standard value, lowercase give you the fine part for 16-bit mapping

Variable

Meaning

L

Dimmer, the Luminance of first pixel

R

Red content of first pixel

G

Green content of first pixel

B

Blue content of first pixel

C

Cyan content of first pixel

M

Magenta content of first pixel

Y

Yellow content of first pixel

O

CTO (Temperature)

P

Pan

T

Tilt

W

Yaw (Not Implemented)

Z

Zoom

F

Focus

I

Iris

S

Speed, use as Frequency for strobes for instance

D

Duration

Further Work

Functions

The expressions are evaluated using ncalc and thus should support all standard math functions, but on top there should certainly be:

map(X, from, to)

Remap the normalized input value to the given range

Others

More variables could be added to cover more scenarios - Suggest more!

Colorwheels, gobo selections and similar are not supported under this proposal. However this could be covered by adding special mapping functions.