Skip to content
nijaruPublic

About

Pre-alpha Rust audio framework with a CLAP plugin adapter.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Chassis

Chassis is a Rust DSP framework for building audio software.

The initial target is a complete, correct, and stable DSP execution core: buffers, timed controls/events, state, lifecycle, resources, and realtime/control communication. The same format-independent runtime serves effects, instruments, event processors, direct Rust embedding, and sequential offline processing. CLAP is the first deployment and qualification boundary, not the definition of a component.

The long-term goal is to give Rust developers the cross-platform audio infrastructure they might otherwise reach for JUCE to get, without matching every module. That includes plug-in deployment and standalone and embedded audio applications, from instruments and tools to the audio engine inside a DAW. Today Chassis provides the DSP runtime and CLAP export, not device I/O or a graph engine. Applications own their algorithms, documents, workflows, and visual design.

Pre-alpha / work in progress. The crates are unpublished, and the public APIs and CHSS state format are not stable. Pre-alpha APIs may be replaced aggressively when doing so produces a simpler, safer, more general design.

Build and test

Install Rust through rustup, then run from the repository root:

cargo test --workspace --locked
cargo build --release --workspace --locked

The repository selects the stable Rust toolchain and Edition 2024. CLAP dependencies use an audited, pinned Clack revision.

Use Chassis from another Cargo project

Pin a Chassis commit in your Cargo.toml. Use chassis-runtime for direct embedding; add chassis-clap at the same revision for CLAP deployment.

[dependencies]
chassis-runtime = { git = "https://github.com/nijaru/chassis", rev = "<commit SHA>" }
# For CLAP deployment, also add:
# chassis-clap = { git = "https://github.com/nijaru/chassis", rev = "<same commit SHA>" }

For a first direct embedding, use the stereo gain example from your pinned revision as your src/main.rs. It renders caller-owned buffers with a sample-timed gain change, then saves and restores that gain in a fresh instance. To try it from this checkout:

cargo run --locked -p chassis-runtime --example embedded_gain

To reuse the same DSP in an application and a plug-in, see the conformance example: the CLAP export supplies deployment metadata and constructs the runtime-only component. Follow the build and packaging steps to produce a loadable .clap. The adapter uses the audited Clack sources from the pinned checkout; you do not need Cargo [patch] entries. Keep your Cargo.lock for the rest of the dependency graph. A pin does not promise API or state compatibility across Chassis revisions.

The authoring guide explains which work belongs in setup, processing, and state handling.

Workspace

Crate Purpose
chassis-runtime Format-independent lifecycle, audio/event ports, process buffers, parameters, automation, state, and realtime communication contracts
chassis-clap CLAP deployment through Clack; mapped audio and coherent parameter/custom-state projection
clap-conformance One DSP library used in direct embedding and a CLAP export for parameter, automation, and state checks
clap-delayed-probe Fixed-delay component for latency/PDC qualification
clap-note-probe Output-only native-note instrument for ordering, expression, and voice-feedback qualification
clap-midi-probe Zero-audio MIDI 1/SysEx and MIDI 2/UMP processor for routing, ownership, and backpressure qualification

CLAP projects native notes/expression, opaque MIDI 1/SysEx, and four-word MIDI 2/UMP events. It preserves mixed parameter/note/MIDI ordering and shares bounded output including native voice-end feedback. Dialects are never converted implicitly; UMP transport does not imply protocol parsing or device compliance. Musical block-start transport preserves available timelines, tempo slope, meter/bar/loop information, and pre-roll without inventing missing host data; timestamped transport updates are not yet exposed. Complete parameter/custom state supports deferred resource reactivation. An optional main-thread product controller submits typed edits and gestures with reserved closure capacity and bounded, refusal-retaining host delivery. Accepted and deterministic rejected callbacks pass allocation checks; arbitrary boxed errors and DSP panics remain outside realtime qualification.

The roadmap defines the initial core boundary, stability gates, and possible later extensions. The execution plan orders the remaining core work. No graph, device backend, editor toolkit, media pipeline, or additional format is required to complete that initial surface. Package boundaries follow actual dependency, safety, optionality, or release needs.

The framework roadmap uses focused conformance fixtures rather than migration of an existing plugin as the completion gate. Existing product ports remain useful regression evidence where they exercise framework semantics.

Design

Component defines the schema, state policy, and processor factory. BoundComponent<C> keeps that definition and one immutable schema on the control side. InstanceRuntime<P> owns durable parameter and semantic state and coordinates activation. Processor owns active DSP history. The same processor model is usable through CLAP, directly inside another Rust application, and for sequential offline processing. A graph or standalone application can later compose that model without becoming a required Chassis subsystem.

DSP implements Process<S> with a borrowed ProcessBlock<'_, S>. Safe channel enum views support in-place, separate input/output, and cross-channel algorithms without callback-owned collections. Setup-resolved typed parameter handles provide base/effective trajectories from the block's consumed controls. Complete persistence belongs to the instance runtime. A ClapExport supplies a component factory and one ClapDescriptor without adding CLAP to the DSP library.

Product-facing core APIs contain no plugin-format, GUI-toolkit, device-backend, or operating-system types. Realtime callbacks have activation-defined resource and event bounds. The test suite checks callback allocations, lifecycle failures, concurrent state publication, f32/f64 processing, malformed state, and other runtime invariants. chassis_runtime::telemetry provides the first reusable bounded DSP-to-control snapshot primitive without adding locks or callback allocation.

Small DSP helpers can complement the runtime without forcing every filter or ramp into a full component. A comprehensive algorithm catalog is not an initial goal; substantial algorithms and integrations should reuse reviewed libraries rather than create unnecessary maintenance.

See the pre-release qualification scope for tested workflows and limits. The validation guide keeps real-host, performance, and conformance results separate.

License

AGPL-3.0-or-later, with an intended separate commercial license. Commercial terms are not yet available. Substantive outside code contributions are not accepted until contribution and relicensing terms are established; see licensing.

About

Pre-alpha Rust audio framework with a CLAP plugin adapter.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages