Skip to main content

Crate sim_lib_plugin_core

Crate sim_lib_plugin_core 

Source
Expand description

Common plugin descriptors, state, and graph adapters.

use sim_lib_plugin_core::{
    ParameterDescriptor, PluginDescriptor, PluginFormat, PluginState,
};

let descriptor = PluginDescriptor::audio_effect(
    PluginFormat::Sim,
    "org.sim.doc-gain",
    "Doc Gain",
    2,
)
.unwrap()
.with_parameter(ParameterDescriptor::new(0, "gain", "Gain", 0.0, 2.0, 1.0).unwrap());

assert_eq!(descriptor.parameter(0).unwrap().plain_to_normalized(1.0), 0.5);

let mut state = PluginState::new();
state.set_param(0, 1.0);
let rebuilt = PluginState::from_expr(&state.to_expr()).unwrap();
assert_eq!(rebuilt.param(0), Some(1.0));

Macros§

forward_plugin_instance
Implement PluginInstance for a $ty<P> newtype whose only relevant field is inner: ProcessorPlugin<P>, forwarding all six methods to it. The clap, lv2, and vst3 exported-processor adapters shared this forward block verbatim before OVERLAP6.15. Call it at each adapter, where Processor, ProcessBlock, and PrepareConfig (from sim_lib_audio_graph_core) and the plugin-core trait types are already in scope.

Structs§

CapabilitySet
Granted audio plugin capabilities for loader entry points.
HostedPluginProcessor
Adapts a PluginInstance into an audio-graph Processor.
ParameterDescriptor
A single automatable plugin parameter and its value range.
PluginDescriptor
A plugin’s full static description: identity, metadata, ports, parameters, and reported latency.
PluginDescriptorRecord
A runtime citizen wrapping a PluginDescriptor in its encoded Expr form.
PluginId
A plugin’s stable identity: its format paired with a backend-stable id.
PluginLoadSpec
A request to load a plugin through a specific backend format.
PluginState
A plugin’s persistable state: parameter values plus opaque keyed data.
ProcessorPlugin
Presents an audio-graph Processor as a PluginInstance.

Enums§

AudioPluginCapability
Privileged audio plugin operations exposed by host adapters.
ParameterKind
The value domain a parameter exposes.
PluginFormat
The host backend format a plugin is loaded through.

Traits§

PluginInstance
A live, format-agnostic plugin instance the host can prepare and run.

Functions§

install_plugin_core_lib
Installs the plugin-core surface pack into the runtime context.
plugin_core_symbols
Returns the qualified export symbols the plugin-core lib publishes.
plugin_descriptor_class_symbol
Returns the class symbol (plugin-core/PluginDescriptor) under which PluginDescriptorRecord is registered.