Saturday, August 06, 2016

Sending a DMX Universe via USB MIDI

Resolume can output data to one or more LED arrays called fixtures. One or more fixtures reside in a Lumiverse, which is the same channel size as one DMX universe - i.e. 512 channels of data. For a set of RGB pixels, this translates into a maximum of 170 pixels (which equals 510 channels of RGB data).

This data can be cast via a WiFi or ethernet network using the Art-Net protocol. Max can be used to read up this data using the imp.dmx external package library. In particular, the imp.artnet.node object is used, and will present the 512 values as a list of 512 int elements. 

This data can then be converted to MIDI for easy USB-based transfer to a Teensy 3.2. In this case, a note-on event with pitch 60 and velocity 127 is used to signify the start of a DMX 512 frame.

A controller message is then used per byte. The first seven bits of the DMX channel byte is represented by the controller value. The eighth bit of the DMX channel byte is represented by the first bit of the controller number. The channel number is irrelevant.

A note-on event with pitch 60 and velocity 1 is used to signify the end of a DMX 512 frame, and update the RGB pixel array.

In this configuration, it is expected that all DMX data sent via MIDI is - at the very least - sent in lots of three (for RGB data) per RGB LED, and a full frame needs to be sent for every update. A frame size that is smaller than 512 can be sent by sending a pitch 60 velocity 1 message when all relevant data has been sent (i.e. less than 170 LED's worth).

Update rate from Resolume is 20 - 30 FPS with the full frame of 512 DMX channels.