Skip to main content

Introduction

Exporters in HNode provide a flexible interface for serializing channel data to various output formats and destinations. The exporter system allows you to send DMX channel data to MIDI devices, files, or other external systems.

IExporter Interface

All exporters implement the IExporter interface, which extends IUserInterface<IExporter> and IConstructable. This interface defines the core lifecycle methods for processing channel data:

Core Methods

SerializeChannel
void
Serializes a single channel from a raw byte representation.Parameters:
  • channelValue (byte): The DMX value for the channel (0-255)
  • channel (int): The channel number
InitFrame
void
Called at the start of each frame to reset any state.Parameters:
  • channelValues (ref List<byte>): Reference to the list of all channel values
CompleteFrame
void
Called after all channels have been serialized for the current frame. Can be used to generate CRC blocks, perform batch operations, or finalize the frame output.Parameters:
  • channelValues (ref List<byte>): Reference to the list of all channel values

Lifecycle Methods

Construct
void
Called when the exporter is initialized. Use this to set up connections, open files, or initialize resources.
Deconstruct
void
Called when the exporter is being destroyed. Clean up resources, close connections, and dispose of objects here.

Available Exporters

HNode includes several built-in exporters:

MIDIDMX

Exports DMX channel data to VRChat worlds via MIDI using the MIDIDMX protocol. Supports up to 16,384 channels across 8 banks. View MIDIDMX Documentation →

TextFileExporter

Exports channel data to text files for debugging, analysis, or archival purposes. Can filter to only export non-zero channels. View TextFileExporter Documentation →

TimeCodeExporter

Receives MIDI timecode and broadcasts it via UDP to synchronize external systems with time-based automation. View TimeCodeExporter Documentation →

Using Exporters in YAML

Exporters are configured in your HNode YAML configuration files:
exporters:
  - type: MIDIDMX
    midiDevice: "loopMIDI Port"
    channelsPerUpdate: 100
    idleScanChannels: 10
  
  - type: TextFileExporter
    onlyNonZeroChannels: true

Frame Processing Flow

  1. InitFrame - Called at the start of the frame
  2. SerializeChannel - Called for each channel (may not be used by all exporters)
  3. CompleteFrame - Called after all channels are processed
This architecture allows exporters to process data per-channel or in batch at the end of each frame.

Build docs developers (and LLMs) love