tpt-av-control

Rust

Pure-Rust, real-time safe studio protocol suite — OSC, MIDI 2.0 (UMP), DMX/Art-Net/sACN, and hardware control surface integration. Dual-licensed MIT/Apache-2.0.

0 stars0 forks0 watchersApache License 2.0

Languages

Rust83.4%C16.6%
README

tpt-av-control

A pure-Rust, real-time safe studio protocol suite. OSC, MIDI 2.0, DMX, and hardware control. The integration layer of the TPT AV stack.

License: MIT OR Apache-2.0 Status: Early-stage / Pre-1.0 Ecosystem: TPT Solutions Open Source


Overview

tpt-av-control is the protocol and hardware integration layer of the TPT AV Stack. It provides pure-Rust, real-time safe implementations of the studio control protocols used in audio, video, lighting, and live performance.

  • Unified protocol suite — OSC, MIDI 2.0 (UMP), DMX512, Art-Net, and sACN in one cohesive library.
  • Real-time safe — protocol parsing is allocation-free and lock-free where it matters; safe to feed results to audio callbacks.
  • MIDI 2.0 / UMP native — full support for Universal MIDI Packet with MIDI 1.0 backward compatibility.
  • Hardware control surfaces — a unified API for physical controllers (mixers, Stream Decks, generic MIDI).
  • Permissive licensing — dual MIT OR Apache-2.0, zero copyleft contamination, enforced via cargo-deny in CI.

Crates

CratePurpose
tpt-av-control-utilsShared types, errors, timecode, parameter mapping
tpt-av-control-oscOpen Sound Control 1.0/1.1: parse, encode, UDP server/client
tpt-av-control-midiMIDI 1.0 and MIDI 2.0 (UMP), device I/O, clock, MTC/MSC
tpt-av-control-dmxDMX512 universes, Art-Net, sACN/E1.31, fixture definitions
tpt-av-control-surfaceHardware control surfaces (generic MIDI, X32, Stream Deck)
tpt-av-control-webrtcWebRTC data channels for networked control (early)

Quick start

[dependencies]
tpt-av-control-osc = "0.1"
use tpt_av_control_osc::{OscClient, OscMessage, OscArg};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let target = "127.0.0.1:8000".parse()?;
    let mut client = OscClient::new(target)?;
    let msg = OscMessage::new("/track/1/volume", &[OscArg::Float(0.75)]);
    client.send(&msg)?;
    Ok(())
}

Each crate is independently useful — use just OSC, just MIDI, or just DMX.

Examples

Runnable demos live in the examples workspace member:

cargo run -p tpt-av-control-examples --example osc_server
cargo run -p tpt-av-control-examples --example midi_controller
cargo run -p tpt-av-control-examples --example dmx_lighting
cargo run -p tpt-av-control-examples --example control_surface

Real-time safety

Protocol parsing (parse_osc_message, parse_midi1, UMP handling) performs no heap allocation for fixed-size messages, and network I/O is kept off the real-time thread:

Network Thread (async, can allocate)   →  lock-free SPSC queue  →  Audio/Video Thread (zero allocation)
MIDI Thread (blocking, can allocate)   →  lock-free SPSC queue  →

License

Dual-licensed under either of

at your option. Dependencies are restricted to permissively licensed crates (MIT, Apache-2.0, BSD, ISC, Zlib); GPL/LGPL/AGPL/MPL are banned and enforced by deny.toml in CI.

See CONTRIBUTING.md for contribution terms.