Soundry

Overview

Soundry is an experimental parser for the SFZ file format, written in Rust. Designed to handle both SFZ v1 and v2, it aims to implement the full opcode set across all standard headers and to expose a programmatic API flexible enough to support a wide range of audio tooling — from synthesizer plugins to sample library loaders. The project draws inspiration from the broader Rust audio ecosystem, including projects like Meadowlark, Rodio, and Glicol, and is built with an eye toward integration with Rust-native DAWs and plugin frameworks.

Motivation

SFZ is a widely used but loosely specified file format. What formal documentation exists is largely community-driven, and support varies considerably across players and DAWs. Soundry emerged from a desire to build a principled, correct-by-construction parser for this format in Rust — one that doesn’t just tokenize SFZ files, but validates opcode values against the specification using refinement types. The project is as much an exercise in understanding the SFZ ecosystem as it is in building practical tooling for it.

Features

Implementation Notes

Soundry’s parser is built around nom’s combinator model, which keeps parsing logic modular and testable. Each header and opcode maps to its own parsing function, composing upward into a full document parser.

The choice to prioritize <control> and <region> headers was deliberate: they carry the bulk of SFZ’s complexity and real-world usage. Remaining headers — such as <effect> (2–4 opcodes), <midi> (ARIA-engine-specific), and wrapper headers like <group>, <global>, and <master> — are structurally simpler or can be understood as hierarchical compositions of region-level logic. Implementing the hard parts first keeps the most important code well-exercised while the remaining surface area is filled in.

Value correctness is handled at parse time via refinement types, meaning invalid opcode values are rejected structurally rather than through scattered runtime checks. This keeps downstream consumers free from defensive validation logic.

Roadmap