Skip to main content

Parse MVR stage files and extract DMX fixture data organized by universe

Project description

StageParser

Parse MVR (My Virtual Rig) stage files and extract DMX fixture data, organized by universe. Built for automating venue configuration in TouchDesigner and Unreal Engine.

Uses python-mvr for MVR parsing and pygdtf for GDTF fixture data.

Installation

Requires Python 3.12+ and uv.

# Clone and install
git clone <repo-url>
cd StageParser
uv sync

CLI Usage

# Full JSON output (organized by universe)
stageparser venue.mvr

# Summary view
stageparser venue.mvr --summary

# YAML output
stageparser venue.mvr -f yaml

# Filter by universe
stageparser venue.mvr -u 1

# Save to file
stageparser venue.mvr -o output.json

Example Summary Output

{
  "mvr_file": "SimpleStage.mvr",
  "mvr_version": "1.6",
  "provider": "pymvr",
  "fixture_count": 1,
  "universes": [1],
  "fixtures": [
    {
      "name": "TB 1230 QW",
      "manufacturer": "ACME",
      "model": "ACME DOTLINE360 (TB-1230 QW)",
      "universe": 1,
      "address": 1,
      "channel_count": 57
    }
  ]
}

Programming API

from stageparser import Stage

stage = Stage("venue.mvr")

# List universes
stage.list_universes()          # [1, 2, 3]

# List fixtures (all or by universe)
stage.list_fixtures()           # all fixtures
stage.list_fixtures(universe=1) # fixtures in universe 1

# Get specific fixture
fixture = stage.get_fixture(universe=1, address=1)
fixture.name            # "TB 1230 QW"
fixture.manufacturer    # "ACME"
fixture.model           # "ACME DOTLINE360 (TB-1230 QW)"
fixture.channel_count   # 57
fixture.gdtf_mode       # "Mode 1 57 DMX"

# Find fixtures by name
stage.get_fixture_by_name("dotline")  # case-insensitive search
stage.get_fixture_by_uuid("30b410fb-...")

# Channel data
fixture.channels                # list of ChannelInfo
fixture.channel_map()           # {1: "Tilt", 2: "Tilt", 3: "PT Speed", ...}
fixture.channels_by_geometry()  # {"Head": [...], "Pixel 1": [...], ...}

# Shorthand channel queries
stage.get_channels(1, 1)              # channels for universe 1, address 1
stage.get_channel_map(1, 1)           # {offset: attribute} dict
stage.get_channels_by_geometry(1, 1)  # channels grouped by geometry

# Position & rotation
fixture.transform.x   # mm (MVR convention)
fixture.transform.y
fixture.transform.z
fixture.transform.rotation  # 3x3 rotation matrix

# Physical data
fixture.physical.weight_kg
fixture.physical.beams        # list of BeamInfo
fixture.physical.models       # list of ModelDimensions

# Beam properties
for beam in fixture.physical.beams:
    beam.luminous_flux       # lumens
    beam.beam_angle          # degrees
    beam.color_temperature   # Kelvin
    beam.power_consumption   # watts
    beam.lamp_type
    beam.beam_type

# Shorthand physical queries
stage.get_lumens(1, 1)     # total lumens across all beams
stage.get_weight(1, 1)     # weight in kg
stage.get_physical(1, 1)   # full PhysicalInfo
stage.get_beams(1, 1)      # list of BeamInfo

# Full export
stage.to_dict()   # complete data organized by universe
stage.summary()   # brief overview

Data Models

Model Description
StageData Top-level container with all fixtures
FixtureInfo Complete fixture: identity, DMX, channels, transform, physical
ChannelInfo Single DMX channel: offset, attribute, geometry, bit depth
DmxAddress Universe + address + break
Transform Position (mm) + 3x3 rotation matrix
PhysicalInfo Weight, beams, model dimensions
BeamInfo Lumens, beam angle, color temp, power, lamp/beam type
ModelDimensions Name, length, width, height (meters)

Channel Map

For the ACME DOTLINE360 in Mode 1 (57 DMX channels):

Offset Attribute Geometry Bit Depth
1-2 Tilt Head 16-bit
3 PT Speed Head 8-bit
4 Zoom Array 1 8-bit
5 Zoom Array 2 8-bit
6-7 Dimmer Head 16-bit
8 Shutter1 Head 8-bit
9-32 RGBW x 6 Pixel 1-6 8-bit each
33-56 RGBW x 6 Pixel 7-12 8-bit each
57 Function Head 8-bit

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stageparser-0.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stageparser-0.2.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file stageparser-0.2.0.tar.gz.

File metadata

  • Download URL: stageparser-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stageparser-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8d1c72ee6bf88c5888388fbe5d9d1752733eea756c18a416c49265f5a9ff2814
MD5 d24f3b5c5a23ad3ef14ee26cd9630ce9
BLAKE2b-256 54093da42203304d36c148c77dfeaeacaf9282c994384e09a0061e170292e273

See more details on using hashes here.

File details

Details for the file stageparser-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stageparser-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stageparser-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22523845094c397d082b2484e8a584f39fe36c939c70e5a0d1f1834207368e4c
MD5 341d178bfd60430290f10fc02afa0573
BLAKE2b-256 ccbfc7fa0a1650f691ae5ef019e268dd63279254592d8173f45275fbc024cbe4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page