Skip to main content

Introduction

Generators in HNode provide a powerful interface for creating and modifying DMX channel data programmatically. The generator system allows you to produce DMX signals from various sources including time-based effects, text, Twitch chat, subtitle files, and more.

IDMXGenerator Interface

All generators implement the IDMXGenerator interface, which extends IUserInterface\<IDMXGenerator\> and IConstructable:
public interface IDMXGenerator : IUserInterface<IDMXGenerator>, IConstructable
{
    void GenerateDMX(ref List<byte> dmxData);
}

Methods

GenerateDMX
void
Called every frame to generate or modify DMX channel data.Parameters:
  • dmxData (ref List<byte>): Reference to the list of DMX channel values (0-255)

Available Generators

Static Value

Set a range of channels to a constant value

Fade

Fade channels in or out over time

Strobe

Create strobe effects at configurable frequencies

Remap

Remap channel values with transformations

Remap On Demand

Conditionally remap channels based on toggle

Text

Render text to DMX channels

Time

Output current time to DMX channels

Twitch Chat

Display Twitch chat messages

DMX Packet

Inject raw DMX packet data

OnTime

Display show control data from OnTime software

Subtitle Formats

Display subtitles from SRT, LRC, and ASS files

Generator Execution Order

Generators are executed in the order they appear in the ShowConfiguration.Generators list. Each generator receives the current state of the DMX data and can modify it. This allows for powerful chaining effects.
Generators execute after ArtNet data is received, so they can override or modify incoming DMX values.

YAML Configuration

Generators are configured in the show configuration file:
generators:
  - !StaticValue
    channelStart: 1
    channelEnd: 10
    value: 255
  - !Strobe
    channel: 15
    frequency: 5.0
    valueOn: 255
    valueOff: 0

Build docs developers (and LLMs) love