Crate ravet_ plugin
Expand description
Product descriptions, format identities and versioned state for RAVET’s generic plug-in export layer (decision 0281).
A Product describes a plug-in once: names, plug-in ID, category, bus
layouts, notes, precision and parameters. Product::resolve validates it,
resolves permanent parameter IDs and derives every format’s identities. The
state module defines the one saved-state envelope all formats store, and
editor defines the message protocol between a plug-in and its web editor.
use ravet_plugin::{Category, Parameter, Product, StateFormat, state};
const PARAMETERS: &[Parameter] = &[
Parameter::linear("gain_db", "Gain", -60.0, 12.0, 0.0).with_unit("dB"),
Parameter::bypass("bypass", "Bypass"),
];
const PRODUCT: Product = Product::new(
"Example Gain",
"Example Audio",
"1.0.0",
"com.example.gain",
Category::Effect,
StateFormat { tag: *b"EXGAIN01", version: 1 },
)
.with_parameters(PARAMETERS);
let product = PRODUCT.resolve().unwrap();
let bytes = state::encode(&product, &[-6.0, 0.0], &[]).unwrap();
let restored = state::restore(&product, &bytes, &state::NoHooks).unwrap();
assert_eq!(restored.values, [-6.0, 0.0]);This crate is a prototype. It contains no format adapters yet; those follow in the export layer’s later steps. Everything here runs on control threads.
Re-exports§
pub use export::Edit;pub use export::EditQueue;pub use export::FnHooks;pub use export::ParameterCache;pub use export::PluginExport;pub use identity::Identities;pub use identity::IdentityOverrides;pub use policy::AutomationPolicy;pub use policy::BypassPolicy;pub use policy::PolicyProcessor;pub use product::AuxiliaryBus;pub use product::Category;pub use product::Editor;pub use product::EditorAsset;pub use product::MAXIMUM_BUS_NAME_BYTES;pub use product::MAXIMUM_EDITOR_ASSET_BYTES;pub use product::MAXIMUM_EDITOR_ASSETS;pub use product::MAXIMUM_EDITOR_ASSETS_TOTAL_BYTES;pub use product::MAXIMUM_EDITOR_HTML_BYTES;pub use product::MAXIMUM_KEY_BYTES;pub use product::MAXIMUM_PARAMETERS;pub use product::NotePorts;pub use product::Parameter;pub use product::ParameterRole;pub use product::Precision;pub use product::Product;pub use product::ProductError;pub use product::ResolvedProduct;pub use product::StateFormat;pub use product::derive_parameter_id;
Modules§
- clap
- Generic CLAP export of any
PluginExport. - editor
- The RAVET editor protocol: JSON text messages between a plug-in and its web editor, addressed by parameter key.
- export
- Format-independent parts of an export: the product’s processor trait and the shared parameter cache that every format adapter reads and writes.
- identity
- Format identities derived deterministically from the plug-in ID.
- native
- The generic C table behind the VST3, AUv2, AAX and LV2 adapters.
- policy
- Automation and bypass policies, applied once for every export format.
- product
- Product and parameter descriptions shared by every export format.
- state
- The versioned state envelope every export format stores.
- text
- Parameter value text shared by every export format.
Macros§
- export_
plugin - Export a
PluginExportas a plug-in from this library crate.