HIP-1413: Hanzo Audio — Real-Time DSP and Synchronization
Abstract
Hanzo Audio is the reusable real-time DSP, plugin-hosting, sample-clock and network synchronization library for Sound, DJ, Film, Clips and Effects. The designated public implementation repository is hanzoai/audio (planned; establish or reconcile it before implementation). This is the normative implementation target, not a claim of shipping.
Motivation
Audio deadlines are incompatible with blocking distributed workflow operations. A shared real-time core avoids inconsistent clocks, duplicate codec work and unsafe plugin execution.
Specification
The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as in RFC 2119.
Real-time processing
Use a portable Rust DSP graph with explicit channel layout, sample format, sample rate, block size, graph topology and declared processing latency. Audio callbacks MUST NOT allocate unbounded memory, block on locks, perform disk/network IO, wait for model inference or invoke durable task APIs. Use bounded preallocated buffers and nonblocking control/event queues; apply parameter and graph changes at safe boundaries with smoothing. Editor UI shells (HIP-0504) and generative UI panels (HIP-1415) MUST communicate with the DSP engine exclusively through these nonblocking parameter/command rings on the UI side; audio callbacks MUST NEVER wait on UI rendering, A2UI surface reconciliation, or agent calls. Support device enumeration, routing, capture, playback, monitoring, resampling, gain/pan, mixing, metering, EQ/dynamics, delay/reverb, time stretch/pitch and offline rendering using the same declared DSP semantics. Distinguish sample-accurate local playback from non-real-time processing in the API.
Time and network sync
Define an integer sample clock, monotonic timestamps, rational beat positions, tempo/meter maps, phase and transport snapshots, and conversions to the creative timeline. Network synchronization MUST support peer discovery, tempo/beat/phase exchange, explicit start/stop opt-in, bounded clock correction and graceful independent operation on peer loss. PCM streaming is an optional separate data path with explicit channel/sample-rate negotiation, jitter buffers, sequence/timestamp validation, loss handling and bounded latency. No microphone or stream sharing by default. Implement protocol interoperation only from appropriately licensed specifications/components and approved independent implementations; do not link GPL code into the permissive core. Validate sync against independently documented interoperability fixtures.
Plugins and hardware
Define versioned DSP/plugin ABI, capabilities, parameter schema, automation, state serialization, sidechain/channel negotiation and latency reporting. Untrusted native plugins MUST run out of process where supported, with watchdog, restricted privileges, bounded IPC, failure bypass and visible errors. Browser plugins require an approved sandbox and compatible ABI; native plugin support is not inferred from browser support. Use MIDI/HID device adapters without ambient privileges and test hotplug and clock drift. All SDKs expose identical control semantics. On unsupported hardware report unavailable rather than silently substituting another device.
Flow and Tasks boundary
Real-time engine and network sync are local runtime activities in the ordinary sense, not per-buffer durable activities. Flow authors offline analysis, transcription, separation, denoise, effects, mixing, scoring, mastering, batch conversion and export graphs. Tasks owns durable scheduling and recovery for those jobs; persist hashes, artifacts and receipts instead of PCM blocks in workflow history. The same library exposes headless offline rendering with pinned graph and assets.
Conformance
Publish a reproducible reference suite with impulse and sine fixtures, routing, latency compensation, sample-rate conversion, plugin crash, clock drift, peer join/loss, packet jitter/loss, hotplug, bounded queues and deterministic offline render. Initial target: zero underruns in a 30-minute reference session at 48 kHz/256 frames on declared supported hardware, and callback p99 below 50% of its deadline. Report actual hardware, OS, settings and measurement; no unsupported latency or sync claims.
Security Considerations
Validate all asset and project references against IAM, isolate untrusted media and code, bound CPU/memory/disk/time/network, pin dependencies and model licenses, and reject unsupported or unauthorized operations. No ambient credentials, silent cloud fallback or cross-tenant data leakage. Network peer discovery and PCM reception/transmission require explicit policy, bounded resource use, authenticated access where applicable, and no exposure of credentials or recording data.
References
- HIP-1406 — Hanzo Creative — Shared Standard Library
- HIP-0506 — Studio
- HIP-1064 — Flow
- HIP-1062 — Workflow
- HIP-0010 — MCP
- HIP-0504 — Unified Cross-Platform Design System
- HIP-1415 — Generative UI Protocol (A2UI 1.0)
Copyright
Released under CC0 1.0 Universal Public Domain Dedication.