Lighting System
DMX and lighting control with mtrack
Lighting System
mtrack supports advanced lighting control through DMX (Digital Multiplex) using the Open Lighting Architecture (OLA). The system supports both a modern tag-based venue-agnostic approach and legacy MIDI-based DMX.
Overview
mtrack’s lighting system provides:
- Venue-Agnostic Songs: Songs use logical groups instead of specific fixture names
- Tag-Based Group Resolution: Fixtures are tagged with capabilities and roles
- Intelligent Selection: System automatically chooses optimal fixtures based on constraints
- Venue Portability: Same lighting show works across different venues
- Performance Optimization: Cached group resolutions for fast lookups
Architecture
The lighting system uses a three-layer architecture:
- Configuration Layer: Define logical groups with constraints in
mtrack.yaml - Venue Layer: Tag physical fixtures with capabilities in DSL files
- Song Layer: Reference
.lightDSL files in song YAML files, which use logical groups
Prerequisites
OLA Setup
mtrack requires OLA (Open Lighting Architecture) to be installed and running:
|
|
Follow the OLA tutorial to configure your DMX interfaces.
Configuration
Main Configuration (mtrack.yaml)
|
|
Fixture Type Definitions
Create fixture type definitions in lighting/fixture_types/:
fixture_type "RGBW_Par" {
channels: 4
channel_map: {
"dimmer": 1,
"red": 2,
"green": 3,
"blue": 4
}
special_cases: ["RGB", "Dimmer"]
}
fixture_type "MovingHead" {
channels: 16
channel_map: {
"dimmer": 1,
"pan": 2,
"pan_fine": 3,
"tilt": 4,
"tilt_fine": 5,
"color_wheel": 6,
"gobo_wheel": 7,
# ... more channels
}
special_cases: ["MovingHead", "Spot", "Dimmer", "Strobe"]
}
Venue Definitions
Create venue definitions in lighting/venues/:
venue "main_stage" {
fixture "Wash1" RGBW_Par @ 1:1 tags ["wash", "front", "rgb", "premium"]
fixture "Wash2" RGBW_Par @ 1:7 tags ["wash", "front", "rgb", "premium"]
fixture "Mover1" MovingHead @ 1:37 tags ["moving_head", "spot", "premium"]
fixture "Strobe1" Strobe @ 1:85 tags ["strobe", "front"]
}
Constraint Types
AllOf
All specified tags must be present:
|
|
AnyOf
Any of the specified tags must be present:
|
|
Prefer
Prefer fixtures with these tags:
|
|
MinCount / MaxCount
Specify minimum and maximum fixture counts:
|
|
FallbackTo
Fallback to another group if primary fails:
|
|
AllowEmpty
Allow group to be empty if no fixtures match:
|
|
Light Shows
Light shows are defined in .light files using the DSL format. Songs reference these files:
|
|
See the Light Shows documentation for details on creating shows.
Legacy MIDI-Based DMX
For existing MIDI-based lighting shows, you can still use the legacy format:
|
|
MIDI to DMX Conversion
MIDI events are converted to DMX as follows:
| MIDI Event | Outputs | Description |
|---|---|---|
| Note On/Off | key (u7), velocity (u7) | Key = DMX channel, velocity × 2 = value |
| Program Change | program (u7) | Dimming speed (0 = instant, others × modifier = duration) |
| Control Change | controller (u7), value (u7) | Controller = DMX channel, value × 2 = value |
Dimming Engine
The dimming engine is controlled by Program Change (PC) commands:
- PC value × dimming speed modifier = dimming duration
- PC 0 = instantaneous changes
- Subsequent note on/off events transition over the dimming duration
- Each channel dims independently
Verifying Light Shows
Validate your light show syntax:
|
|
Validate against your configuration:
|
|
This checks:
- Light show syntax validity
- All referenced fixture groups exist
- All referenced fixtures exist
Related Documentation
- Light Shows - Creating lighting shows
- Configuration - Complete configuration reference
- MIDI Control - MIDI integration